How quitlightfe/kahoot works
This is a React/TypeScript frontend for role-based, live quizzes. Users register or sign in; students join a quiz, answer timed questions, and review results, while teachers create quizzes, host games, and inspect results. The app routes through role-protected pages, which call a shared Axios client for backend data. The README describes only a Vite template, so product capabilities are inferred from the source index and sampled pages; unsampled page behavior and backend internals are not expanded.
Main entry points: api.ts HTTP client · ProtectedRoute.tsx Role guard · App.tsx Route app · quiz.ts Quiz models
Components 20
App and access
- Route app
src/App.tsx - Role guard
src/components/ProtectedRoute.tsx - Sign in
src/pages/Login.tsx - Registration
src/pages/Register.tsx
Student experience
- Student dashboard
src/pages/StudentDashboard.tsx - Join quiz
src/pages/StudentJoinQuiz.tsx - Student lobby
src/pages/StudentLobby.tsx - Answer questions
src/pages/StudentGame.tsx - Student results
src/pages/StudentResults.tsx - Result detail
src/pages/StudentResult.tsx
Teacher experience
- Quiz management
src/pages/TeacherDashboard.tsx - Teacher lobby
src/pages/TeacherLobby.tsx - Host live game
src/pages/TeacherGame.tsx - Teacher results
src/pages/TeacherResult.tsx
Shared client and models
- HTTP client
src/services/api.ts - Auth models
src/types/auth.ts - Quiz models
src/types/quiz.ts
Other components
- Student
- Teacher
- Quiz backend
Connections 36
- Student → Route app: opens app
src/App.tsx - Teacher → Route app: opens app
src/App.tsx - Route app → Sign in: routes to
src/App.tsx - Route app → Registration: routes to
src/App.tsx - Route app → Role guard: protects routes
src/App.tsx - Role guard → Student dashboard: routes students
src/App.tsx - Role guard → Join quiz: routes students
src/App.tsx - Role guard → Student lobby: routes students
src/App.tsx - Role guard → Answer questions: routes students
src/App.tsx - Role guard → Student results: routes students
src/App.tsx - Role guard → Quiz management: routes teachers
src/App.tsx - Role guard → Teacher lobby: routes teachers
src/App.tsx - Role guard → Host live game: routes teachers
src/App.tsx - Role guard → Teacher results: routes teachers
src/App.tsx - Student dashboard → Join quiz: navigates to
src/pages/StudentDashboard.tsx - Sign in → HTTP client: requests auth
src/pages/Login.tsx - Registration → HTTP client: requests registration
src/pages/Register.tsx - Student dashboard → HTTP client: loads history
src/pages/StudentDashboard.tsx - Join quiz → HTTP client: joins quiz
src/pages/StudentJoinQuiz.tsx - Student lobby → HTTP client: loads lobby
src/pages/StudentLobby.tsx - Answer questions → HTTP client: loads and submits
src/pages/StudentGame.tsx - Student results → HTTP client: loads results
src/pages/StudentResults.tsx - Result detail → HTTP client: loads result data
src/pages/StudentResult.tsx - Quiz management → HTTP client: manages quizzes
src/pages/TeacherDashboard.tsx - Teacher lobby → HTTP client: loads lobby
src/pages/TeacherLobby.tsx - Host live game → HTTP client: updates game
src/pages/TeacherGame.tsx - Teacher results → HTTP client: loads results
src/pages/TeacherResult.tsx - HTTP client → Quiz backend: sends HTTP requests
src/services/api.ts - Sign in → Auth models: uses models
src/pages/Login.tsx - Registration → Auth models: uses models
src/pages/Register.tsx - Role guard → Auth models: checks role
src/components/ProtectedRoute.tsx - Answer questions → Quiz models: uses models
src/pages/StudentGame.tsx - Student results → Quiz models: uses models
src/pages/StudentResults.tsx - Quiz management → Quiz models: uses models
src/pages/TeacherDashboard.tsx - Host live game → Quiz models: uses models
src/pages/TeacherGame.tsx - Teacher results → Quiz models: uses models
src/pages/TeacherResult.tsx