How tianxingleo/acgti works
ACGTI is a browser-based MBTI-inspired anime-character quiz. Users answer 39 scenario questions, the client scores four MBTI dimensions and archetype weights, matches a character, then presents and shares the result. Optional services collect anonymous result and self-reported MBTI feedback, provide AI interpretation and aggregate statistics, and support offline calibration. The README documents these capabilities; sampled frontend code confirms quiz orchestration and scoring, while several backend and analysis relationships are documented but their implementation was not sampled.
Main entry points: useQuiz.ts Quiz state · ResultPage.vue Result page · submit.ts Result submission · statsReporter.ts Anonymous reporting
Components 23
Quiz experience
- Question flow
src/pages/QuizPage.vue - Quiz state
src/composables/useQuiz.ts - Scoring and matching
src/utils/quizEngine.ts - Quiz models
src/types/quiz.ts - Saved progress
src/utils/storage.ts
Results and content
- Result page
src/pages/ResultPage.vue - Archetype and character catalog
src/pages/CharactersPage.vue - Statistics dashboard
src/pages/StatsPage.vue - Share poster
src/components/SharePoster.vue - Rarity presentation
src/composables/useCharacterRarity.ts - Anonymous reporting
src/utils/statsReporter.ts - AI interpretation card
src/components/AiInsightCard.vue
API services
- Request safeguards
functions/_middleware.ts - API validation and limits
functions/api/_shared.ts - Result submission
functions/api/submit.ts - MBTI feedback intake
functions/api/feedback.ts - AI interpretation API
functions/api/insight.ts - Statistics endpoints
functions/api/stats - Scheduled maintenance
cron-worker/src/index.ts
Feedback calibration
- Offline analysis and calibration
analysis
Other components
- Quiz taker
- Cloudflare D1
- Workers AI
Connections 27
- Quiz taker → Question flow: answers questions
- Question flow → Quiz state: records answers
src/pages/QuizPage.vue - Quiz state → Scoring and matching: calculates result
src/composables/useQuiz.ts - Quiz state → Saved progress: persists progress
src/composables/useQuiz.ts - Scoring and matching → Quiz models: uses models
src/utils/quizEngine.ts - Quiz state → Result page: provides result
src/pages/ResultPage.vue - Result page → Share poster: renders poster
src/pages/ResultPage.vue - Share poster → Rarity presentation: uses rarity display
src/components/SharePoster.vue - Result page → Anonymous reporting: sends feedback and stats
src/pages/ResultPage.vue - Result page → AI interpretation card: shows interpretation
src/pages/ResultPage.vue - Quiz taker → Archetype and character catalog: browses characters
- Quiz taker → Statistics dashboard: views statistics
- Anonymous reporting → Result submission: submits result
- Anonymous reporting → MBTI feedback intake: submits self-assessment
- AI interpretation card → AI interpretation API: requests interpretation
- AI interpretation API → Workers AI: generates interpretation
- Statistics dashboard → Statistics endpoints: loads aggregates
- Request safeguards → Result submission: guards writes
- Request safeguards → MBTI feedback intake: guards writes
- Result submission → API validation and limits: uses shared checks
- AI interpretation API → API validation and limits: uses shared checks
functions/api/insight.ts - Statistics endpoints → Cloudflare D1: queries aggregates
- Result submission → Cloudflare D1: stores submissions
- MBTI feedback intake → Cloudflare D1: stores feedback
- Scheduled maintenance → Cloudflare D1: refreshes snapshots
- Offline analysis and calibration → Cloudflare D1: analyzes feedback history
- Offline analysis and calibration → Scoring and matching: informs weight updates