How magnusinst84-sudo/edutrace works
EduTrace is an adaptive learning-path agent: learners choose a topic, complete a diagnostic, receive a level-tailored roadmap, then learn through stateful chat and week-end quizzes. The React client calls the authenticated FastAPI session API; agent handlers coordinate Gemini prompts, roadmap context, world state, and Firestore persistence. The README documents progress views, PDF export, teaching styles, and pacing as product capabilities. Some frontend and integration details are unsampled, so the graph shows only documented or excerpt-supported links.
Main entry points: handlers.py Learning handlers · client.js API client · session.py Session routes · Chat.jsx Learning chat
Components 23
Learner experience
- App routes
frontend/src/App.jsx - Auth context
frontend/src/context/AuthContext.jsx - Firebase client
frontend/src/firebase.js - Topic dashboard
frontend/src/pages/Landing.jsx - Learning chat
frontend/src/pages/Chat.jsx - Quiz panel
frontend/src/components/QuizPanel.jsx - Progress view
frontend/src/pages/Progress.jsx - Roadmap PDF export
frontend/src/utils/exportRoadmapPDF.js - API client
frontend/src/api/client.js
Session API
- FastAPI app
backend/main.py - Session routes
backend/routes/session.py - Token verification
backend/middleware/auth.py - Input validation
backend/middleware/sanitize.py
Learning agent
- Learning handlers
backend/agent/handlers.py - World state
backend/agent/state.py - Prompt templates
backend/agent/prompts.py - Roadmap context
backend/agent/loader.py - Gemini models
backend/agent/gemini.py
Identity and persistence
- Firebase initialization
backend/utils/firebase_init.py - Session persistence
backend/db/sessions.py - Firestore
- Firebase Auth
Other components
- Learner
Connections 30
- Learner → App routes: uses
frontend/src/App.jsx - App routes → Auth context: provides auth
frontend/src/App.jsx - Auth context → Firebase client: observes sign-in
frontend/src/context/AuthContext.jsx - Firebase client → Firebase Auth: authenticates
- Learner → Topic dashboard: chooses topic
- Topic dashboard → API client: starts session
frontend/src/pages/Landing.jsx - Learning chat → API client: calls API
frontend/src/pages/Chat.jsx - Quiz panel → API client: submits quiz
frontend/src/components/QuizPanel.jsx - Progress view → API client: loads progress
frontend/src/pages/Progress.jsx - Learning chat → Quiz panel: renders
frontend/src/pages/Chat.jsx - Learning chat → Roadmap PDF export: exports roadmap
frontend/src/pages/Chat.jsx - API client → FastAPI app: HTTP requests
- API client → Firebase Auth: gets ID token
frontend/src/api/client.js - FastAPI app → Firebase initialization: initializes
backend/main.py - FastAPI app → Session routes: mounts routes
backend/main.py - Session routes → Token verification: verifies user
backend/routes/session.py - Session routes → Input validation: validates topic
backend/routes/session.py - Session routes → Learning handlers: dispatches learning
backend/routes/session.py - Learning handlers → Input validation: sanitizes messages
backend/agent/handlers.py - Learning handlers → World state: hydrates state
backend/agent/handlers.py - Learning handlers → Prompt templates: builds prompts
backend/agent/handlers.py - Learning handlers → Roadmap context: loads grounding
backend/agent/handlers.py - Learning handlers → Gemini models: requests generation
backend/agent/handlers.py - Learning handlers → Session persistence: loads and saves
backend/agent/handlers.py - Session routes → Session persistence: persists sessions
backend/routes/session.py - Session persistence → Firestore: reads and writes
backend/db/sessions.py - Firebase initialization → Firebase Auth: initializes SDK
- Firebase initialization → Firestore: initializes SDK
- Learner → Learning chat: learns and adapts
- Learner → Progress view: reviews weeks