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.
- Landing (
/) — hero, example type cards, integrations overview - Main test (
/test) — animated flow, progress, Zustand + local persistence - Results (
/result/[type]) — full type card, compatibility links, share payload, OG image - Compare (
/compare) — overlap/contradiction, “appearance vs reality” blurb, radar chart - Integrations (
/integrations,/integrations/[provider]) — registry of adapters - Dev JSON lab (
/dev/pack) — validate custom trait JSON - API —
POST /api/compare,GET /api/share?type=EOVA,GET /api/session - Persistence — Prisma + SQLite (dev); swap
DATABASE_URLfor Postgres in production
- Core test shape — ~31-question flow, includes hidden-branch style logic, optimized for 5–8 minutes
- Five core models — Self, Emotional, Attitude, Action Drive, Social
- 15-dimension mindset — model-backed scoring and mapping into personality outputs
- Cross-analysis direction — supports external personality systems and MBTI-style adapter mapping
- Privacy-first messaging — browser-local calculation style can be supported by client-only mode
| 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 →NormalizedTraitProfilemapToSBTI— usesmapNormalizedToSBTI(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.
- Copy
src/tests/registry/example-provider.template.ts. - Implement
normalizeResult+getResultLabel; reusemapNormalizedToSBTIfor mapping. - Call
registerPersonalityProvider(yourAdapter)from a small module imported bysrc/lib/providers/registry.ts(or a dedicatedregister-extra.ts). - Run
npm testand 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- Push this repo to GitHub and import into Vercel.
- Set
DATABASE_URLto a hosted Postgres URL (recommended for serverless). Runnpx prisma migrate deployin the build command or as a release step. - Set
NEXT_PUBLIC_SITE_URLto your production URL (Open Graph + metadata base). - SQLite file URLs are fine for local dev only—not ideal on serverless volumes.
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
- Optional Auth.js flows + account linking
- Server-side share PNG generation (beyond JSON download)
- More first-party “mini quizzes” per adapter
- Plugin hot-loading from
/src/tests/registrywithout editing core registry
See CONTRIBUTING.md. Licensed under MIT.