How codewithjoee/quiz-app works
This is a role-based classroom and quiz application: teachers and administrators manage users, rooms, invitations, and quizzes; students join rooms, take timed quizzes, and review results, while teachers grade essay responses. The documented product also includes attempt history, profile-photo review, account deletion/restore, dashboard monitoring, and installable PWA support. Supabase provides authentication and persisted application data. The graph follows documented workflows and sampled source calls; several feature implementations were not sampled, so uncertain internal wiring is omitted.
Main entry points: route.ts Create user API · login/page.tsx Login · [quizId]/page.tsx Quiz authoring · QuizRunner.tsx Quiz attempt
Components 26
Identity and access
- Login
src/app/[locale]/(auth)/login/page.tsx - Auth and profile
lib/auth.ts - Server client
lib/supabase/server.ts - Create user API
src/app/api/admin/create-user/route.ts
Classroom management
- Rooms and invitations
src/app/[locale]/(dashboard)/rooms/[roomId]/page.tsx
Quiz and assessment
- Quiz authoring
src/app/[locale]/(dashboard)/quiz/[quizId]/page.tsx - Quiz spreadsheet import
src/app/[locale]/(dashboard)/quiz/[quizId]/ExcelImport.tsx - Quiz attempt
src/app/[locale]/(dashboard)/quiz/[quizId]/QuizRunner.tsx - Anti-cheat monitor
lib/quiz/useAntiCheat.ts - Attempt handling
lib/quiz/attempts.ts - Quiz scoring
lib/quiz/scoring.ts - Essay grading
src/app/[locale]/(dashboard)/quiz/[quizId]/attempts/[attemptId]/grade/page.tsx - Quiz results
src/app/[locale]/(dashboard)/quiz/[quizId]/result/page.tsx - Attempt history
src/app/[locale]/(dashboard)/history/page.tsx
Administration and profiles
- Dashboard
src/app/[locale]/(dashboard)/admin/dashboard/page.tsx - Student management
src/app/[locale]/(dashboard)/students/page.tsx - Bulk student import
src/app/[locale]/(dashboard)/students/BulkImportModal.tsx - Profile and photos
src/app/[locale]/(dashboard)/profile/page.tsx - Photo approvals
src/app/[locale]/(dashboard)/pending-photos/page.tsx
Shared experience
- Role-based help
src/app/[locale]/(dashboard)/help/content.ts - Installable app
public/sw.js - Navigation badges
components/useBadgeCounts.ts
Other components
- Teacher
- Student
- Super admin
- Supabase
Connections 40
- Student → Login: signs in
- Teacher → Login: signs in
- Super admin → Login: signs in
- Login → Auth and profile: checks identity
- Auth and profile → Server client: creates client
- Server client → Supabase: reads profile
- Teacher → Create user API: creates accounts
- Super admin → Create user API: creates accounts
- Create user API → Server client: checks session
- Create user API → Supabase: creates auth user
- Teacher → Dashboard: monitors activity
- Super admin → Dashboard: monitors activity
- Teacher → Student management: manages students
- Student management → Bulk student import: imports roster
- Bulk student import → Supabase: creates students
- Teacher → Rooms and invitations: manages classes
- Student → Rooms and invitations: joins invitations
- Rooms and invitations → Supabase: stores membership
- Teacher → Quiz authoring: authors quizzes
- Quiz authoring → Quiz spreadsheet import: imports questions
- Quiz authoring → Supabase: stores quiz
- Student → Quiz attempt: takes quiz
- Quiz attempt → Anti-cheat monitor: monitors conduct
- Quiz attempt → Attempt handling: submits answers
- Attempt handling → Supabase: stores attempt
- Attempt handling → Quiz scoring: scores answers
- Teacher → Essay grading: grades essays
- Essay grading → Supabase: saves grades
- Student → Quiz results: reviews result
- Quiz results → Supabase: reads attempt
- Student → Attempt history: reviews progress
- Attempt history → Supabase: reads attempts
- Student → Profile and photos: manages profile
- Teacher → Photo approvals: reviews photos
- Super admin → Photo approvals: reviews photos
- Profile and photos → Supabase: updates profile
- Teacher → Role-based help: consults guidance
- Student → Role-based help: consults guidance
- Super admin → Role-based help: consults guidance
- Navigation badges → Supabase: counts pending items