How git-me-harish/mentora works
Mentora is an adaptive AI learning platform. A learner uses the web app to access the FastAPI service; the documented tutoring flow routes questions, retrieves cited learning content, and returns an AI response. Other major branches personalize learning through mastery, spaced repetition, recommendations, and adaptive paths, and support documents, collaboration, analytics, and beta/PWA features. The graph combines README-documented capabilities with source-index references; links to unsampled subsystems are limited to documented relationships.
Main entry points: main.py FastAPI app · rag_service.py RAG retrieval · adaptive.py Adaptive API · tutor_pipeline.py Tutor orchestration
Components 29
Learner app
- Web app
frontend/src/app/(app)/chat/page.tsx - API client
frontend/src/lib/api/client.ts
API and identity
- FastAPI app
ai_service/main.py - Identity
ai_service/routers/auth.py - Security
ai_service/core/security.py - Observability
ai_service/core/observability.py - Chat API
ai_service/routers/chat.py
Adaptive learning
- Adaptive API
ai_service/routers/adaptive.py - BKT mastery
ai_service/engines/bkt_engine.py - DKT mastery
ai_service/engines/dkt_engine.py - Spaced repetition
ai_service/engines/sm2_engine.py - Path optimizer
ai_service/engines/dqn_optimizer.py - Recommendations
ai_service/services/recommendation_service.py
Tutoring and content
- Tutor orchestration
ai_service/pipelines/tutor_pipeline.py - Query routing
ai_service/pipelines/query_router.py - Query transform
ai_service/pipelines/query_transform.py - RAG retrieval
ai_service/services/rag_service.py - Embeddings
ai_service/services/embedding_service.py - Vector store
- Document processing
ai_service/workers/document_worker.py - Object storage
ai_service/services/storage_service.py
Community and operations
- Social sessions
ai_service/routers/study_sessions.py - Live sessions
ai_service/services/livekit_service.py - Audit and consent
ai_service/services/audit_log_service.py - Learning analytics
ai_service/services/analytics_service.py - Beta and offline
ai_service/routers/pwa_sync.py - Social background tasks
ai_service/workers/tasks/social_tasks.py - Email delivery
ai_service/services/email_service.py
Other components
- Learner
Connections 30
- Learner → Web app: uses
- Web app → API client: requests
- API client → FastAPI app: calls API
- FastAPI app → Identity: registers routes
ai_service/main.py - FastAPI app → Chat API: registers routes
ai_service/main.py - FastAPI app → Adaptive API: registers routes
ai_service/main.py - Identity → Security: uses
ai_service/routers/auth.py - Chat API → RAG retrieval: calls
ai_service/routers/chat.py - Chat API → Tutor orchestration: orchestrates
- Tutor orchestration → Query routing: routes queries
ai_service/pipelines/tutor_pipeline.py - Query routing → Query transform: reuses helper
ai_service/pipelines/query_router.py - Tutor orchestration → Query transform: transforms queries
ai_service/pipelines/tutor_pipeline.py - Tutor orchestration → RAG retrieval: retrieves context
- RAG retrieval → Embeddings: embeds queries
ai_service/services/rag_service.py - RAG retrieval → Query transform: expands queries
ai_service/services/rag_service.py - RAG retrieval → Vector store: searches vectors
- Document processing → Object storage: fetches uploads
ai_service/workers/document_worker.py - Document processing → RAG retrieval: indexes chunks
ai_service/workers/document_worker.py - Adaptive API → BKT mastery: updates mastery
ai_service/routers/adaptive.py - Adaptive API → Spaced repetition: schedules reviews
ai_service/routers/adaptive.py - Adaptive API → Path optimizer: optimizes paths
- Adaptive API → DKT mastery: estimates mastery
- Learner → Social sessions: joins sessions
- Social sessions → Live sessions: creates rooms
- Social sessions → Social background tasks: schedules tasks
ai_service/routers/study_sessions.py - FastAPI app → Observability: configures telemetry
ai_service/main.py - FastAPI app → Audit and consent: enforces compliance
- FastAPI app → Learning analytics: serves dashboards
- FastAPI app → Beta and offline: registers routes
ai_service/main.py - Social background tasks → Email delivery: sends notices