Official website: https://www.sbti.ai/en
SBTI is an internet-native personality experience focused on entertainment: around 30 questions (plus a hidden branch trigger), cross-analysis across five core models and fifteen dimensions, and shareable personality outcomes.
This repository is the open-source codebase for the SBTI web app and integration architecture.
Disclaimer: For entertainment and self-reflection only—not scientific diagnosis, education, or hiring. This project is an original parody with its own identity; it is not affiliated with any similarly named organization or website.
Screenshots: add PNGs under docs/screenshots/ (see docs/screenshots/README.md) and embed them here for GitHub.
/) — hero, example type cards, integrations overview /test) — animated flow, progress, Zustand + local persistence /result/[type]) — full type card, compatibility links, share payload, OG image /compare) — overlap/contradiction, “appearance vs reality” blurb, radar chart /integrations, /integrations/[provider]) — registry of adapters /dev/pack) — validate custom trait JSON POST /api/compare, GET /api/share?type=EOVA, GET /api/session DATABASE_URL for Postgres in production | Area | Location |
|---|---|
| SBTI questions & axis scoring | src/lib/sbti/ |
| Normalized trait graph (0–100) | src/lib/traits/schema.ts |
| Provider adapters | src/lib/providers/adapters/ |
| Registry + validation | src/lib/providers/registry.ts, validate.ts |
| Rules engine (normalized → SBTI letters) | src/lib/providers/rules-engine.ts |
| Comparison | src/lib/comparison/engine.ts |
| Public API surface | src/lib/functions.ts |
| Provider templates & docs | src/tests/registry/ |
Four axes are derived from weighted answers (E/I, O/L, V/M, A/P), each on a 0–100 scale. The four letters are chosen by whether each score is ≥ 50. The 16 type codes are the Cartesian product of those dichotomies; copy and metadata live in src/lib/sbti/types-catalog.ts.
Each adapter implements PersonalityTestAdapter:
normalizeResult — maps manual / quiz / JSON input → NormalizedTraitProfile mapToSBTI — uses mapNormalizedToSBTI (shared rules engine) getResultLabel — human-readable summary for history rows Built-in examples: Four-Letter Compass (style), Ocean Five (style), Nine Archetype Map (style), Custom JSON trait pack.
src/tests/registry/example-provider.template.ts. normalizeResult + getResultLabel; reuse mapNormalizedToSBTI for mapping. registerPersonalityProvider(yourAdapter) from a small module imported by src/lib/providers/registry.ts (or a dedicated register-extra.ts). npm test and exercise /compare + /dev/pack.npm install
cp .env.example .env
npx prisma migrate dev
npm run db:seed # optional demo user + sample comparisons
npm run dev
npm test
npm run build
DATABASE_URL to a hosted Postgres URL (recommended for serverless). Run npx prisma migrate deploy in the build command or as a release step. NEXT_PUBLIC_SITE_URL to your production URL (Open Graph + metadata base). Next.js (App Router) · TypeScript · Tailwind CSS · shadcn/ui (Base UI) · Framer Motion · Zustand · Zod · Prisma 6 · Vitest · Recharts
Optional: Auth.js is listed in dependencies for future email/OAuth; the app ships with anonymous cookie sessions via /api/session.
Implemented in src/lib/functions.ts:
takeSBTITest, scoreSBTIResult, generateSBTIType, saveSubmission, importExternalPersonalityResult, normalizeExternalTestResult, comparePersonalitySystems, registerPersonalityProvider, getAvailablePersonalityProviders, compareWithProvider, generateShareCardPayload, exportUserProfile
/src/tests/registry without editing core registry See CONTRIBUTING.md. Licensed under MIT.