How sampreethg/ai-teacher-hackathon works
AI Teacher combines a learning studio and classroom with a Python teaching API and a separate live-avatar experience. The student-facing path runs from studio/classroom interaction through lesson, chat, or answer evaluation to the teaching engine’s adaptive response; the avatar path establishes a session and speaks lesson text. The tree and excerpts support key API-to-engine calls and avatar-session wiring, but not every UI-to-API request or persistence mechanism, so those links are omitted rather than inferred.
Main entry points: main.py Teaching API · page.tsx Lesson studio · App.tsx Avatar experience · liveAvatarSession.ts Session controller
Components 22
Learning experience
- Lesson studio
app/studio/page.tsx - AI classroom
app/classroom/page.tsx - Source upload
components/dashboard/AddSourceModal.tsx - Authentication
components/AuthCard.tsx - Profile menu
components/navigation/UserProfileMenu.tsx
Teaching API
- Chat endpoint
app/api/chat/route.ts - Lesson endpoint
app/api/generate-lesson/route.ts - Upload endpoint
app/api/upload/route.ts - Teaching API
AI_Teacher/AI_Teacher/api/main.py
Teaching engine
- Lesson generation
AI_Teacher/AI_Teacher/ai_engine/lesson_generator.py - Question generation
AI_Teacher/AI_Teacher/ai_engine/question_generator.py - Answer evaluation
AI_Teacher/AI_Teacher/ai_engine/answer_evaluator.py - Adaptive decisions
AI_Teacher/AI_Teacher/ai_engine/adaptive_engine.py
Live avatar
- Avatar experience
ai-teacher-avatar/src/App.tsx - Session controller
ai-teacher-avatar/src/services/liveAvatarSession.ts - Avatar API client
ai-teacher-avatar/src/services/avatarApi.ts - Avatar routes
ai-teacher-avatar/backend/routes/avatar.js - Avatar server
ai-teacher-avatar/backend/server.js - Voice configuration
lib/config/voices.ts - Avatar display
ai-teacher-avatar/src/components/AITeacherAvatar.tsx
Other components
- Student / teacher
- LiveAvatar service
Connections 22
- Student / teacher → Lesson studio: works in
app/studio/page.tsx - Student / teacher → AI classroom: learns in
app/classroom/page.tsx - Student / teacher → Authentication: signs in
components/AuthCard.tsx - Lesson studio → Source upload: opens
app/studio/page.tsx - Lesson studio → Lesson endpoint
- Lesson studio → Chat endpoint
- AI classroom → Teaching API
- Source upload → Upload endpoint
- Lesson endpoint → Teaching API
- Chat endpoint → Teaching API
- Teaching API → Lesson generation: generates lesson
AI_Teacher/AI_Teacher/api/main.py - Teaching API → Answer evaluation: evaluates answer
AI_Teacher/AI_Teacher/api/main.py - Teaching API → Adaptive decisions: chooses next step
AI_Teacher/AI_Teacher/api/main.py - Teaching API → Question generation: generates questions
AI_Teacher/AI_Teacher/api/main.py - Avatar experience → Session controller: starts and controls
ai-teacher-avatar/src/App.tsx - Avatar experience → Avatar display: renders
ai-teacher-avatar/src/App.tsx - Avatar experience → Voice configuration
- Session controller → Avatar API client: requests session
ai-teacher-avatar/src/services/liveAvatarSession.ts - Avatar API client → Avatar routes
- Avatar server → Avatar routes: mounts routes
ai-teacher-avatar/backend/server.js - Avatar routes → LiveAvatar service
- Session controller → LiveAvatar service: starts session
ai-teacher-avatar/src/services/liveAvatarSession.ts