How lstiffel/mathutrice works
MATHutrice is a web-based, LLM-assisted mathematics tutor. Students sign in, choose a notion, practise generated exercises, receive answer correction and feedback, and build per-competence scores used to recommend weaker areas; free chat is also available. Teachers and admins have separate pages, including PDF upload. The graph follows the documented route, generation, evaluation, and persistence responsibilities. Source excerpts are partial, so some feature links rely on README statements and the SOURCE INDEX rather than inspected route bodies.
Main entry points: app.py FastAPI routes · main.py Exercise orchestration · base_generator.py Generation core · referentiel.py Notions and competences
Components 23
Web application
- FastAPI routes
mathutrice/app.py - Web pages
mathutrice/templates - PDF upload
mathutrice/app.py
Learning workflow
- Practice sessions
mathutrice/fonctions_python/session_generator.py - Exercise orchestration
mathutrice/fonctions_python/main.py - Free chat
mathutrice/fonctions_python/chatbot.py
Exercise generation
- Multiple choice
mathutrice/fonctions_python/type_questions/qcm_generator.py - Open answer
mathutrice/fonctions_python/type_questions/qro_generator.py - Step-by-step
mathutrice/fonctions_python/type_questions/steps_generator.py - Fill-in exercises
mathutrice/fonctions_python/type_questions/trous_generator.py - Generation core
mathutrice/fonctions_python/base_generator.py - Math verification
mathutrice/fonctions_python/verifier.py
Reference and persistence
- Notions and competences
mathutrice/referentiel.py - Reference-data seeding
mathutrice/seed.py - Domain models
mathutrice/models.py - Database session
mathutrice/database.py
LLM and evaluation
- Competency diagnosis
mathutrice/lacune_evaluation/LLM_as_Evaluator.py - LLM client
mathutrice/llm_client.py
Other components
- Student
- Teacher / admin
- Microsoft Entra ID
- OpenAI-compatible endpoint
- Application database
Connections 36
- Student → FastAPI routes: uses
README.md - Teacher / admin → FastAPI routes: uses
README.md - FastAPI routes → Microsoft Entra ID: authenticates with
README.md - FastAPI routes → Web pages: renders
mathutrice/app.py - FastAPI routes → PDF upload: serves upload
mathutrice/app.py - FastAPI routes → Database session: gets sessions
mathutrice/app.py - Database session → Application database: connects to
mathutrice/database.py - FastAPI routes → Domain models: queries
mathutrice/app.py - FastAPI routes → Reference-data seeding: initializes data
mathutrice/app.py - Reference-data seeding → Domain models: inserts rows
mathutrice/seed.py - Reference-data seeding → Notions and competences: loads reference
mathutrice/seed.py - FastAPI routes → Practice sessions: starts practice
mathutrice/app.py - Practice sessions → Domain models: reads and writes
mathutrice/fonctions_python/session_generator.py - Practice sessions → Notions and competences: uses competencies
mathutrice/fonctions_python/session_generator.py - Practice sessions → Exercise orchestration: delegates generation
mathutrice/fonctions_python/session_generator.py - FastAPI routes → Exercise orchestration: generates exercises
mathutrice/app.py - Exercise orchestration → Multiple choice: dispatches to
mathutrice/fonctions_python/main.py - Exercise orchestration → Open answer: dispatches to
mathutrice/fonctions_python/main.py - Exercise orchestration → Step-by-step: dispatches to
mathutrice/fonctions_python/main.py - Exercise orchestration → Notions and competences: uses competencies
mathutrice/fonctions_python/main.py - Multiple choice → Generation core: uses
mathutrice/fonctions_python/type_questions/qcm_generator.py - Open answer → Generation core: uses
mathutrice/fonctions_python/type_questions/qro_generator.py - Step-by-step → Generation core: uses
mathutrice/fonctions_python/type_questions/steps_generator.py - Fill-in exercises → Generation core: uses
mathutrice/fonctions_python/type_questions/trous_generator.py - Multiple choice → Math verification: verifies answers
mathutrice/fonctions_python/type_questions/qcm_generator.py - Generation core → LLM client: calls
mathutrice/fonctions_python/base_generator.py - LLM client → OpenAI-compatible endpoint: sends requests
README.md - FastAPI routes → Free chat: handles chat
mathutrice/app.py - Free chat → LLM client: calls
mathutrice/fonctions_python/chatbot.py - FastAPI routes → Competency diagnosis: requests diagnosis
mathutrice/app.py - Exercise orchestration → Competency diagnosis: diagnoses answers
mathutrice/fonctions_python/main.py - Competency diagnosis → Notions and competences: uses competencies
mathutrice/lacune_evaluation/LLM_as_Evaluator.py - Competency diagnosis → LLM client: calls
mathutrice/lacune_evaluation/LLM_as_Evaluator.py - FastAPI routes → Notions and competences: serves notion choices
mathutrice/app.py - FastAPI routes → Domain models: stores scores and history
README.md - FastAPI routes → PDF upload: accepts teacher PDFs
README.md