TypeMe is a bilingual 16-type personality assessment app. It combines a structured MBTI-style scale with short open-ended prompts, then generates a clearer type profile with supporting evidence, adjacent possibilities, and a more personal interpretation.
Live demo: https://typeme-beta.vercel.app
- 50 scale questions across EI, SN, TF, JP, and AT dimensions
- Dynamic open-ended prompts selected from borderline or high-signal dimensions
- Open-answer quality gating that blocks repeated, random, or low-information input before AI analysis
- Browser-local progress recovery with graceful continuation when storage is unavailable
- Type landing with confidence, adjacent candidates, and dimension coordinates
- AI-assisted profile synthesis with fallback behavior when AI is unavailable
- Chinese and English UI and AI-result localization
- Bounded score/analysis payloads, short duplicate-request caching, and best-effort process-local analysis throttling
- Type library for browsing the 16 base types
- Vercel deployment with a small Flask serverless adapter
- The scale test estimates an initial type and identity variant.
- The scoring endpoint identifies close dimensions and candidate adjacent types.
- Five open prompts collect real-life decision, pressure, and relationship context.
- The analysis endpoint combines scale data and written answers into a Type Profile.
The result is intended as a reflective profile, not a clinical diagnosis.
- Normal answers are stored locally in the browser unless explicitly submitted.
- API keys are read from environment variables and are not committed.
mbti/config.jsonis ignored and should only be used for local development.- Vercel production keys should be configured in the Vercel dashboard.
- Successful analysis responses may remain in short-lived process memory for up to two minutes to prevent accidental duplicate LLM requests; they are not written to a new cache table.
The deployed Vercel app includes the protected Studio shell:
//api/questions/api/score/api/analyze/studio/api/studio/*/api/samples
Studio uses Supabase Auth for login and server-side Supabase REST calls for admin data. To enable it on Vercel, configure these environment variables:
SUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYSTUDIO_ADMIN_EMAILSSTUDIO_COOKIE_SECRETrecommendedCRON_SECRETrandom string of at least 16 characters
Run supabase/schema.sql in the Supabase SQL editor before using the dashboard, content tables, analysis logs, or anonymous sample storage. The service-role key is used only inside api/index.py; never expose it in frontend code.
If the main Studio tables already exist but the dashboard reports PGRST205 for persona_response_samples, run the smaller patch instead:
-- Supabase SQL editor
-- see supabase/studio_samples_patch.sqlAfter configuring Vercel and Supabase, verify the deployed wiring locally:
python scripts/check-remote-studio.pyvercel.json schedules /api/cron/supabase-keepalive once per day. The route
uses the server-side service-role key to make three read-only, one-row probes
against existing Studio tables. It does not insert or update data.
Set CRON_SECRET for the Production environment before enabling the job. Vercel
automatically sends it as a bearer token when invoking the cron route; requests
without a matching token are rejected. Cron delivery is best effort, so this
reduces the likelihood of inactivity pausing but does not replace a paid uptime
guarantee.
Install dependencies:
pip install -r requirements.txtRun the Vercel Flask adapter locally:
python api/index.pyFor the full local development app, use the main workspace version under D:\Code\1123\mbti.
This repository is adapted for Vercel:
api/index.pyis the Flask serverless entry point.api/templates/index.htmlserves the TypeMe app shell.public/index.htmlmirrors the app shell for static inspection. Frontend shell changes must update both HTML copies; production/readsapi/templates/index.html.public/typeme-app.cssandpublic/typeme-app.jsprovide the active UI layer.questions.jsonis loaded from the project root by the serverless function.public/studio.htmlis served through the/studiorewrite.supabase/schema.sqldefines the current Studio/admin tables.vercel.jsondefines the protected daily Supabase keepalive cron.request_guard.pycontains additive payload validation, short-lived deduplication, and process-local rate limiting for public score/analysis routes.
Do not copy the stdlib BaseHTTPRequestHandler server from the local workspace into api/index.py; the Vercel deployment uses Flask.
- Frontend: vanilla JavaScript, CSS, Tailwind CDN
- Backend: Python Flask on Vercel Serverless Functions
- AI: OpenAI-compatible chat completion endpoint, configured via environment variables
- Data: JSON question bank, optional Supabase-backed Studio/admin tables
MIT