How fakhrihuseynov/python-platform works
PyCoach is a local-first Python learning web app. Learners browse micro-lessons, run code in the practice playground, review scheduled flashcards, and ask an optional local Ollama coach; the Learn area also provides document and folder management. The graph follows sampled Flask route calls into core logic and documented capabilities. Learning-log behavior is documented, but its route-level wiring was not sampled, so it is shown as a separate capability without an inferred caller. Some route implementations and templates are represented at their exact tree paths.
Main entry points: __init__.py Flask app factory · learn.py Learn and docs routes · practice.py Practice route · flashcards.py Flashcard routes
Components 21
Web application
- Flask app factory
app/web/__init__.py - Home route
app/web/routes/home.py - Learn and docs routes
app/web/routes/learn.py - Practice route
app/web/routes/practice.py - Flashcard routes
app/web/routes/flashcards.py - Coach route
app/web/routes/coach.py - Learn and docs views
app/web/templates/learn.html - Practice view
app/web/templates/practice.html - Flashcards view
app/web/templates/flashcards.html - Coach view
app/web/templates/coach.html
Learning and practice
- Lesson registry
core/lessons.py - Code execution
core/practice.py - Learning documents
core/docs.py
Review and tracking
- Flashcard management
core/flashcards.py - SM-2 scheduling
core/srs.py - Learning log
core/log.py
Local data and AI
- YAML and JSONL storage
core/storage.py - Card data
data - Document data
data/docs - Local Ollama
Other components
- Learner
Connections 23
- Learner → Flask app factory: uses web app
- Flask app factory → Home route: registers routes
- Flask app factory → Learn and docs routes: registers routes
- Flask app factory → Practice route: registers routes
- Flask app factory → Flashcard routes: registers routes
- Flask app factory → Coach route: registers routes
- Learner → Learn and docs routes: requests lessons and docs
- Learn and docs routes → Lesson registry: loads lessons
- Learn and docs routes → Learning documents: manages documents
- Learn and docs routes → Learn and docs views: renders view
- Learning documents → Document data: reads and writes
- Learner → Practice route: submits code
- Practice route → Code execution: runs code
- Practice route → Practice view: renders feedback
- Learner → Flashcard routes: reviews and grades
- Flashcard routes → Flashcard management: loads and grades cards
- Flashcard routes → Flashcards view: renders cards
- Flashcard management → SM-2 scheduling: updates schedule
- Flashcard management → YAML and JSONL storage: reads and writes cards
- YAML and JSONL storage → Card data: reads and writes JSONL
- Learner → Coach route: asks question
- Coach route → Local Ollama: requests generation
- Coach route → Coach view: renders reply