How muhammadfahd/ai-mentor works
AI Mentor is an MVP for asking learning questions, receiving AI explanations, and tracking topics. The documented workflow runs from the user-facing Next.js app to a FastAPI chat endpoint, which calls AI generation and saves progress; the response returns through the API to the app. The README also describes a three-interaction history display, but frontend source is not included in the supplied excerpts, so its implementation and data flow cannot be verified. Edges reflect the shown backend calls or documented architecture.
Main entry points: main.py Chat endpoint · ai_logic.py AI and progress logic · frontend Chat and history UI
Components 6
Learning interface
- Chat and history UI
frontend
Chat API
- Chat endpoint
backend/main.py
AI and persistence
- AI and progress logic
backend/ai_logic.py
Other components
- Learner
- Groq LLaMA
- Supabase progress
Connections 7
- Learner → Chat and history UI: asks questions
README.md - Chat and history UI → Chat endpoint: sends chat
README.md - Chat endpoint → AI and progress logic: calls ask_ai
backend/main.py - AI and progress logic → Groq LLaMA: generates response
backend/ai_logic.py - Chat endpoint → AI and progress logic: calls save_progress
backend/main.py - AI and progress logic → Supabase progress: saves topic
backend/ai_logic.py - Chat endpoint → Chat and history UI: returns response
README.md