How lrondal/mathutrice works
MATHutrice is a web-based mathematics tutor for EPF first-year students. Students sign in, choose a notion, practise generated exercises, receive answer feedback, and build competence scores that inform recommendations; free chat is also available. Teachers and admins have separate pages, including PDF upload. The map distinguishes session orchestration, question formats, evaluation, and persistence. Edges are limited to relationships shown in excerpts, SOURCE INDEX references, or README statements; some route-level details and PDF processing are not sampled.
Main entry points: app.py FastAPI routes · main.py Exercise workflow · session_generator.py Session orchestration · base_generator.py Shared generation
Components 24
Web application
- FastAPI routes
mathutrice/app.py - Web pages
mathutrice/templates - Sign-in flows
mathutrice/app.py - Teacher PDF upload
mathutrice/app.py
Practice and sessions
- Free chat
mathutrice/fonctions_python/chatbot.py - Session orchestration
mathutrice/fonctions_python/session_generator.py - Exercise workflow
mathutrice/fonctions_python/main.py - Shared generation
mathutrice/fonctions_python/base_generator.py - 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 blanks
mathutrice/fonctions_python/type_questions/trous_generator.py
Assessment and guidance
- Answer checking
mathutrice/fonctions_python/verifier.py - Competence gap evaluation
mathutrice/lacune_evaluation/LLM_as_Evaluator.py - Weakness recommendations
mathutrice/fonctions_python/session_generator.py
Reference and persistence
- Notions and competences
mathutrice/referentiel.py - Reference data seeding
mathutrice/seed.py - Domain models
mathutrice/models.py - SQL database
mathutrice/database.py
External services
- Microsoft Entra ID
- LLM endpoint
- Shared LLM client
mathutrice/llm_client.py
Other components
- Student
- Teacher / admin
Connections 34
- Student → FastAPI routes: uses
README.md - Teacher / admin → FastAPI routes: uses
README.md - FastAPI routes → Web pages: renders
README.md - FastAPI routes → Sign-in flows: handles sign-in
mathutrice/app.py - Sign-in flows → Microsoft Entra ID: authenticates
README.md - FastAPI routes → Teacher PDF upload: routes uploads
mathutrice/app.py - Student → Session orchestration: chooses notion
README.md - FastAPI routes → Session orchestration: requests sessions
mathutrice/app.py - Session orchestration → Exercise workflow: uses training logic
mathutrice/fonctions_python/session_generator.py - Exercise workflow → Multiple choice: generates QCM
mathutrice/fonctions_python/main.py - Exercise workflow → Open answer: generates open answers
mathutrice/fonctions_python/main.py - Exercise workflow → Step-by-step: generates steps
mathutrice/fonctions_python/main.py - Exercise workflow → Fill blanks: generates blanks
mathutrice/fonctions_python/main.py - Multiple choice → Shared generation: uses shared generation
mathutrice/fonctions_python/type_questions/qcm_generator.py - Open answer → Shared generation: uses shared generation
mathutrice/fonctions_python/type_questions/qro_generator.py - Step-by-step → Shared generation: uses shared generation
mathutrice/fonctions_python/type_questions/steps_generator.py - Fill blanks → Shared generation: uses shared generation
mathutrice/fonctions_python/type_questions/trous_generator.py - Multiple choice → Answer checking: verifies answers
mathutrice/fonctions_python/type_questions/qcm_generator.py - Open answer → Shared LLM client: judges answers
- Shared generation → Shared LLM client: calls
mathutrice/fonctions_python/base_generator.py - Shared LLM client → LLM endpoint: sends requests
README.md - FastAPI routes → Free chat: serves chat
mathutrice/app.py - Free chat → Shared LLM client: calls
mathutrice/fonctions_python/chatbot.py - FastAPI routes → Competence gap evaluation: requests diagnosis
mathutrice/app.py - Exercise workflow → Competence gap evaluation: diagnoses answers
mathutrice/fonctions_python/main.py - Competence gap evaluation → Shared LLM client: calls
mathutrice/lacune_evaluation/LLM_as_Evaluator.py - Session orchestration → Weakness recommendations: selects next practice
mathutrice/fonctions_python/session_generator.py - Session orchestration → Notions and competences: reads competences
mathutrice/fonctions_python/session_generator.py - Competence gap evaluation → Notions and competences: reads competences
mathutrice/lacune_evaluation/LLM_as_Evaluator.py - FastAPI routes → SQL database: opens sessions
mathutrice/app.py - FastAPI routes → Domain models: queries domain records
mathutrice/app.py - Session orchestration → Domain models: reads and updates scores
mathutrice/fonctions_python/session_generator.py - Reference data seeding → Domain models: inserts records
mathutrice/seed.py - Reference data seeding → Notions and competences: loads reference data
mathutrice/seed.py