How coffee1337/ai-python-mentor works
AI Python Mentor is a full-stack learning platform: learners use the web app to study lessons, complete checks and Python exercises, receive feedback, and build progress toward career goals. The FastAPI modular monolith exposes learning, account, AI, practice, review, career, and project capabilities backed by PostgreSQL. User-code execution runs in a separate isolated Runner service; AI tutoring uses a gateway and lesson knowledge base. The README documents broader integrations and capabilities not fully shown in sampled source, so those links are cited to the README rather than inferred from filenames.
Main entry points: main.py FastAPI application · page.tsx Learning workspace · learning.py Learning orchestration · practice.py Python practice
Components 26
Learner experience
- Next.js app
apps/web/app/page.tsx - Learning workspace
apps/web/app/learning/page.tsx - API client
apps/web/app/lib/api.ts
Learning services
- Learning orchestration
apps/api/app/learning.py - Curriculum and lessons
apps/api/app/curriculum.py - Checks and assessment
apps/api/app/assessment.py - Python practice
apps/api/app/practice.py - Exercise hints
apps/api/app/exercise_hints.py - Spaced reviews
apps/api/app/reviews_api.py - AI mentor
apps/api/app/mentor.py - Lesson knowledge base
apps/api/app/knowledge_base.py - Career matching
apps/api/app/vacancies.py - Project practice
apps/api/app/projects.py
Platform services
- FastAPI application
apps/api/app/main.py - Authentication
apps/api/app/auth.py - Account services
apps/api/app/account_services.py - PostgreSQL
apps/api/app/db/session.py
Code execution
- Runner dispatch
apps/api/app/runner.py - Isolated Runner
apps/runner/runner_worker/server.py - Execution engine
apps/runner/runner_worker/execution.py
External integrations
- LLM gateway
apps/api/app/ai_gateway.py - AI provider
- Telegram
- Email delivery
Other components
- Learner
- Browser
Connections 28
- Learner → Browser: uses
- Browser → Next.js app: opens
- Next.js app → Learning workspace: opens learning
apps/web/app/learning/page.tsx - Learning workspace → API client: requests data
apps/web/app/learning/page.tsx - API client → FastAPI application: calls
- FastAPI application → Authentication: registers routes
apps/api/app/main.py - FastAPI application → Learning orchestration: registers routes
apps/api/app/main.py - FastAPI application → AI mentor: registers routes
apps/api/app/main.py - FastAPI application → Python practice: registers routes
apps/api/app/main.py - FastAPI application → Checks and assessment: registers routes
apps/api/app/main.py - FastAPI application → Career matching: registers routes
apps/api/app/main.py - Learning orchestration → Curriculum and lessons: uses curriculum
apps/api/app/learning.py - Learning orchestration → Exercise hints: uses hints
apps/api/app/learning.py - Learning orchestration → LLM gateway: requests AI
apps/api/app/learning.py - Learning workspace → Spaced reviews: loads reviews
apps/web/app/learning/page.tsx - Learning workspace → AI mentor: opens mentor chat
apps/web/app/learning/page.tsx - Learning workspace → Python practice: submits practice
apps/web/app/learning/page.tsx - AI mentor → Lesson knowledge base: retrieves context
- LLM gateway → AI provider: calls provider
- FastAPI application → PostgreSQL: persists data
apps/api/app/main.py - Python practice → Runner dispatch: dispatches execution
- Runner dispatch → Isolated Runner: submits jobs
- Isolated Runner → Execution engine: runs code
apps/runner/runner_worker/server.py - FastAPI application → Telegram: integrates
- FastAPI application → Email delivery: sends notifications
- FastAPI application → Account services: uses account controls
- FastAPI application → Project practice: serves projects
apps/api/app/main.py - FastAPI application → Spaced reviews: serves reviews
apps/api/app/main.py