How themoldymustard/sentinelquiz works
SentinelQuiz turns imported quiz JSON into configurable practice sessions across identification, multiple-choice, and multiple-select modes, then scores answers and presents a breakdown. The shown home page also saves and manages quizzes in browser IndexedDB. The README documents Supabase tables, row-level security, and authentication, but the sampled app code does not show those services wired into the workflow; they are represented as a documented, separate capability. Edges reflect sampled calls and SOURCE INDEX references; no Supabase runtime connection is inferred.
Main entry points: QuizEngine.tsx Quiz orchestrator · page.tsx Import and setup · ImportModule.tsx JSON import UI · fsm.ts Quiz state machine
Components 20
Import and library
- Import and setup
app/page.tsx - JSON import UI
components/ImportModule.tsx - Schema validation
lib/schemas/quiz.ts - Content sanitization
lib/sanitize.ts - Saved quiz library
lib/storage.ts - Browser quiz store
lib/storage.ts
Session experience
- Session runner page
app/quiz/page.tsx - PWA manifest
public/manifest.json
Quiz engine
- Quiz orchestrator
components/QuizEngine.tsx - Identification mode
components/IdentificationMode.tsx - Multiple choice mode
components/MultipleChoiceMode.tsx - Multiple select mode
components/MultipleSelectMode.tsx - Results display
components/ScoreDisplay.tsx - Multiple-select UI
components/MultipleSelectMode.tsx
Shared logic
- Quiz state machine
lib/fsm.ts - Answer matching
lib/answers.ts - Quiz types and scoring
types/quiz.ts
Documented backend
- Supabase clients
lib/supabase/client.ts - Database schema and RLS
supabase/migrations/001_initial.sql
Other components
- Learner
Connections 22
- Learner → Import and setup: imports quiz
- Import and setup → JSON import UI: renders
app/page.tsx - JSON import UI → Schema validation: validates JSON
components/ImportModule.tsx - JSON import UI → Content sanitization: sanitizes items
components/ImportModule.tsx - JSON import UI → Import and setup: returns items
components/ImportModule.tsx - Import and setup → Saved quiz library: loads and manages
app/page.tsx - Saved quiz library → Browser quiz store: reads and writes
lib/storage.ts - Import and setup → Quiz types and scoring: uses quiz types
app/page.tsx - Session runner page → Quiz orchestrator: renders session
app/quiz/page.tsx - Session runner page → Quiz types and scoring: uses session types
app/quiz/page.tsx - Quiz orchestrator → Quiz state machine: dispatches and selects
components/QuizEngine.tsx - Quiz orchestrator → Identification mode: renders mode
components/QuizEngine.tsx - Quiz orchestrator → Multiple choice mode: renders mode
components/QuizEngine.tsx - Quiz orchestrator → Multiple select mode: renders mode
components/QuizEngine.tsx - Quiz orchestrator → Results display: renders results
components/QuizEngine.tsx - Quiz orchestrator → Answer matching: normalizes answers
components/QuizEngine.tsx - Quiz state machine → Answer matching: checks answers
lib/fsm.ts - Quiz state machine → Quiz types and scoring: uses state and scoring types
lib/fsm.ts - Multiple choice mode → Answer matching: uses answer matching
components/MultipleChoiceMode.tsx - Multiple select mode → Answer matching: uses answer matching
components/MultipleSelectMode.tsx - Results display → Quiz state machine: uses final stats
components/ScoreDisplay.tsx - Results display → Quiz types and scoring: uses answer records
components/ScoreDisplay.tsx