How zapataisra/homeschool-backend works
HomeschoolAI is a family-oriented homeschool learning platform: adults create family and child profiles, children use guided curriculum chat, and the application retrieves SEP curriculum material to ground learning sessions. The runtime also includes search, critical math evaluation and XP, family progress, authentication, and Stripe billing. A separate Python adapter set supports curriculum ingestion and RAG preparation. The main runtime flow is supported by sampled chat and search code; several API routes and Python integrations are unsampled, so their links are left unasserted.
Main entry points: Program.cs API host · SearchService.cs Search orchestration · ChatService.cs Chat orchestration · App.tsx Web application
Components 24
Learning experience
- Web application
web/src/App.tsx - Learning session UI
web/src/features/chat/useLearningSession.ts - Chat API
HomeschoolAI.Api/Endpoints/AgentEndpoints.cs - Chat orchestration
HomeschoolAI.Application/Chat/ChatService.cs - LLM completion
HomeschoolAI.Adapters/SemanticKernel/SemanticKernelAgentCompletionService.cs - Critical evaluation
HomeschoolAI.Application/Evaluation/CriticalEvaluationService.cs - Math validation and XP
HomeschoolAI.Application/Validation/MathValidator.cs
Curriculum retrieval
- Search API
HomeschoolAI.Api/Endpoints/SearchEndpoints.cs - Search orchestration
HomeschoolAI.Application/Search/SearchService.cs - Query embeddings
HomeschoolAI.Adapters/Embedding/OnnxQueryEmbedder.cs - Hybrid retrieval
HomeschoolAI.Adapters/Persistence/EmbeddingRepository.cs - Curriculum vectors
HomeschoolAI.Domain/Entities/EmbeddingChunk.cs - Curriculum ingestion
app/adapters/ingestion.py
Family and progress
- Family dashboard
web/src/features/family/FamilyDashboard.tsx - Family API
HomeschoolAI.Api/Endpoints/FamilyEndpoints.cs - Identity and families
HomeschoolAI.Adapters/Identity/IdentityAuthService.cs - Family service
HomeschoolAI.Adapters/Identity/IdentityFamilyService.cs - Learning and progress
HomeschoolAI.Adapters/Learning/ChildLearningRepository.cs - Family database
HomeschoolAI.Adapters/Identity/AppDbContext.cs
Runtime and integrations
- API host
HomeschoolAI.Api/Program.cs - Stripe payments
HomeschoolAI.Adapters/Payments/StripePaymentService.cs - Payment API
HomeschoolAI.Api/Endpoints/PaymentEndpoints.cs - Email delivery
HomeschoolAI.Adapters/Email/SmtpEmailSender.cs
Other components
- Learner
Connections 26
- Learner → Web application: uses
- Web application → Learning session UI: renders
web/src/App.tsx - Learning session UI → Chat API: requests sessions
- Chat API → Chat orchestration: dispatches
- Chat orchestration → LLM completion: requests completion
HomeschoolAI.Application/Chat/ChatService.cs - Chat orchestration → Search orchestration: retrieves curriculum
HomeschoolAI.Application/Chat/ChatService.cs - Chat orchestration → Learning and progress: records activity
HomeschoolAI.Application/Chat/ChatService.cs - Critical evaluation → LLM completion: requests assessment
HomeschoolAI.Application/Evaluation/CriticalEvaluationService.cs - Critical evaluation → Math validation and XP: validates and scores
- Search API → Search orchestration: dispatches
- Search orchestration → Query embeddings: embeds query
HomeschoolAI.Application/Search/SearchService.cs - Search orchestration → Hybrid retrieval: searches
HomeschoolAI.Application/Search/SearchService.cs - Hybrid retrieval → Curriculum vectors: queries
HomeschoolAI.Adapters/Persistence/EmbeddingRepository.cs - Curriculum ingestion → Curriculum vectors: populates
- Web application → Family dashboard: renders
web/src/App.tsx - Family dashboard → Family API: requests family data
- Family API → Family service: dispatches
- Family service → Family database: reads family data
HomeschoolAI.Adapters/Identity/IdentityFamilyService.cs - Identity and families → Family database: reads and writes
HomeschoolAI.Adapters/Identity/IdentityAuthService.cs - Learning and progress → Family database: reads and writes progress
HomeschoolAI.Adapters/Learning/ChildLearningRepository.cs - API host → Search orchestration: registers
HomeschoolAI.Api/Program.cs - API host → Query embeddings: registers
HomeschoolAI.Api/Program.cs - API host → Hybrid retrieval: registers
HomeschoolAI.Api/Program.cs - API host → Stripe payments: registers
HomeschoolAI.Api/Program.cs - Payment API → Stripe payments: dispatches
- API host → Email delivery: configures
HomeschoolAI.Api/Program.cs