How ali-haris/litai works
LitAI is a teacher-and-student AI literacy platform. Teachers create topics and AI-generated quizzes, manage student enrollment, and review performance; students take timed quizzes, see results and progress, and use the Prompt Lab for prompt feedback. The React app routes users to role-specific views, while FastAPI exposes the corresponding domain endpoints. Supabase provides authentication and persistent records, and Gemini supports quiz generation, learning paths, and prompt evaluation. Some frontend-to-backend request wiring and several page implementations were not excerpted, so those links are omitted rather than inferred.
Main entry points: App.tsx App routing · auth.py Authentication and profiles · supabase.ts Supabase client · main.py FastAPI application
Components 28
Frontend experience
- App routing
frontend/src/App.tsx - Landing and signup entry
frontend/src/pages/Landing.tsx - Authentication views
frontend/src/pages/auth - Role access guard
frontend/src/components/ProtectedRoute.tsx - Supabase client
frontend/src/lib/supabase.ts
Teacher workflows
- Topic management
frontend/src/pages/teacher/TopicsList.tsx - Quiz authoring and review
frontend/src/pages/teacher/QuizCreate.tsx - Roster and student analytics
frontend/src/pages/teacher/StudentDetail.tsx - Teacher dashboard
frontend/src/pages/teacher/Dashboard.tsx
Student learning
- Quiz selection and start
frontend/src/pages/student/QuizzesList.tsx - Timed quiz viewport
frontend/src/pages/student/QuizWindow.tsx - Quiz results
frontend/src/pages/student/QuizResult.tsx - Progress analytics
frontend/src/pages/student/Progress.tsx - Prompt Lab
frontend/src/pages/student/PromptLab.tsx
Backend services
- FastAPI application
backend/main.py - Authentication and profiles
backend/core/auth.py - Topic endpoints
backend/routers/topics.py - Quiz generation and analytics
backend/routers/quizzes.py - Student quiz attempts
backend/routers/student_quizzes.py - Teacher student services
backend/routers/teacher_students.py - Prompt evaluation endpoint
backend/routers/prompt_lab.py - User endpoints
backend/routers/users.py - Gemini AI operations
backend/core/ai.py - Runtime configuration
backend/core/config.py
Domain schemas
- Pydantic domain schemas
backend/models
Other components
- Teacher or student
- Supabase PostgreSQL
- Google Gemini
Connections 47
- Teacher or student → App routing: opens
frontend/src/App.tsx - App routing → Landing and signup entry: routes to
frontend/src/App.tsx - App routing → Authentication views: routes to
frontend/src/App.tsx - App routing → Role access guard: protects routes
frontend/src/App.tsx - App routing → Topic management: routes to
frontend/src/App.tsx - App routing → Quiz authoring and review: routes to
frontend/src/App.tsx - App routing → Roster and student analytics: routes to
frontend/src/App.tsx - App routing → Teacher dashboard: routes to
frontend/src/App.tsx - App routing → Quiz selection and start: routes to
frontend/src/App.tsx - App routing → Timed quiz viewport: routes to
frontend/src/App.tsx - App routing → Quiz results: routes to
frontend/src/App.tsx - App routing → Progress analytics: routes to
frontend/src/App.tsx - App routing → Prompt Lab: routes to
frontend/src/App.tsx - Authentication views → Supabase client: uses
frontend/src/pages/auth/Login.tsx - Topic management → Supabase client: uses
frontend/src/pages/teacher/TopicsList.tsx - Quiz authoring and review → Supabase client: uses
frontend/src/pages/teacher/QuizCreate.tsx - Roster and student analytics → Supabase client: uses
frontend/src/pages/teacher/StudentDetail.tsx - Quiz selection and start → Supabase client: uses
- Timed quiz viewport → Supabase client: uses
frontend/src/pages/student/QuizWindow.tsx - Quiz results → Supabase client: uses
frontend/src/pages/student/QuizResult.tsx - Progress analytics → Supabase client: uses
frontend/src/pages/student/Progress.tsx - Prompt Lab → Supabase client: uses
frontend/src/pages/student/PromptLab.tsx - FastAPI application → Authentication and profiles: depends on
backend/main.py - FastAPI application → User endpoints: registers
backend/main.py - FastAPI application → Topic endpoints: registers
backend/main.py - FastAPI application → Quiz generation and analytics: registers
backend/main.py - FastAPI application → Student quiz attempts: registers
backend/main.py - FastAPI application → Teacher student services: registers
backend/main.py - FastAPI application → Prompt evaluation endpoint: registers
backend/main.py - Authentication and profiles → Runtime configuration: reads settings
backend/core/auth.py - Authentication and profiles → Supabase PostgreSQL: validates and reads profiles
backend/core/auth.py - Topic endpoints → Authentication and profiles: uses role checks
backend/routers/topics.py - Topic endpoints → Pydantic domain schemas: uses schemas
backend/routers/topics.py - Quiz generation and analytics → Authentication and profiles: uses role checks
backend/routers/quizzes.py - Quiz generation and analytics → Pydantic domain schemas: uses schemas
backend/routers/quizzes.py - Quiz generation and analytics → Supabase PostgreSQL: reads and writes
backend/routers/quizzes.py - Quiz generation and analytics → Gemini AI operations: generates questions
backend/routers/quizzes.py - Student quiz attempts → Authentication and profiles: uses role checks
backend/routers/student_quizzes.py - Student quiz attempts → Pydantic domain schemas: uses schemas
backend/routers/student_quizzes.py - Teacher student services → Authentication and profiles: uses role checks
backend/routers/teacher_students.py - Teacher student services → Gemini AI operations: creates learning paths
backend/routers/teacher_students.py - Prompt evaluation endpoint → Authentication and profiles: uses role checks
backend/routers/prompt_lab.py - Prompt evaluation endpoint → Gemini AI operations: evaluates prompts
backend/routers/prompt_lab.py - User endpoints → Authentication and profiles: uses role checks
backend/routers/users.py - Gemini AI operations → Runtime configuration: reads settings
backend/core/ai.py - Gemini AI operations → Google Gemini: requests generation
backend/core/ai.py - Quiz generation and analytics → Supabase PostgreSQL: reads topic context
backend/routers/quizzes.py