How codewithnimal/nexus-edu works
NEXUS is an education-learning application with a React frontend and FastAPI backend. Its main documented workflow is course-grounded AI assistance: users interact through authenticated screens; backend generation services retrieve course context through a shared RAG pipeline, then produce structured results through a centralized LLM service. The backend also exposes authentication, course, document, summary, analysis, and YouTube capabilities. The README provides no architecture detail, and several frontend and API-route implementations were not sampled, so those connections are shown only where documented or marked unverified.
Main entry points: pipeline.py RAG pipeline · v1 API routes · llm_service.py LLM gateway · youtube_service.py YouTube Q&A
Components 24
Web application
- Authenticated web UI
nexus-learnforge-main/src/routes/_authenticated.tsx - Frontend API client
nexus-learnforge-main/src/api/client.ts
Backend API
- FastAPI application
backend/app/main.py - API routes
backend/app/api/v1 - Authentication
backend/app/api/v1/auth.py
AI generation
- Chat generation
backend/app/services/chat/chat_generation_service.py - Lecture notes
backend/app/services/lecture/lecture_generation_service.py - Question papers
backend/app/services/question_paper/question_paper_generation_service.py - Presentations
backend/app/services/ppt/presentation_generation_service.py - Paper analysis
backend/app/services/analysis/paper_analysis_service.py - Summary generation
backend/app/services/analysis/summary_generation_service.py - LLM gateway
backend/app/ai/llm/llm_service.py - Model router
backend/app/ai/llm/router.py
Knowledge retrieval
- RAG pipeline
backend/app/ai/rag/pipeline.py - Document loaders
backend/app/ai/rag/loaders - Chunking
backend/app/ai/rag/chunking/recursive_chunker.py - Embeddings
backend/app/ai/rag/embeddings/embedding_service.py - Retrievers and reranker
backend/app/ai/rag/retrieval - Vector and lexical indexes
backend/app/ai/rag/indexing
Persistence and integrations
- YouTube Q&A
backend/app/services/youtube_service.py - Conversation repository
backend/app/repositories/conversation_repository.py - Relational database
backend/app/database/database.py - Domain models
backend/app/models
Other components
- Learner
Connections 35
- Learner → Authenticated web UI: uses
nexus-learnforge-main/src/routes/_authenticated.tsx - Authenticated web UI → Frontend API client: requests data
- Frontend API client → FastAPI application: calls API
- FastAPI application → API routes: registers routes
backend/app/main.py - FastAPI application → Authentication: registers
backend/app/main.py - API routes → Chat generation: dispatches
- API routes → Lecture notes: dispatches
- API routes → Question papers: dispatches
- API routes → Presentations: dispatches
- API routes → Paper analysis: dispatches
- API routes → Summary generation: dispatches
- Chat generation → RAG pipeline: retrieves context
backend/app/services/chat/chat_generation_service.py - Chat generation → LLM gateway: generates answer
backend/app/services/chat/chat_generation_service.py - Lecture notes → RAG pipeline: retrieves context
backend/app/services/lecture/lecture_generation_service.py - Lecture notes → LLM gateway: generates notes
backend/app/services/lecture/lecture_generation_service.py - Question papers → RAG pipeline: retrieves context
backend/app/services/question_paper/question_paper_generation_service.py - Question papers → LLM gateway: generates paper
backend/app/services/question_paper/question_paper_generation_service.py - Presentations → RAG pipeline: retrieves context
backend/app/services/ppt/presentation_generation_service.py - Presentations → LLM gateway: generates slides
backend/app/services/ppt/presentation_generation_service.py - Paper analysis → RAG pipeline: retrieves context
backend/app/services/analysis/paper_analysis_service.py - Paper analysis → LLM gateway: generates analysis
backend/app/services/analysis/paper_analysis_service.py - Summary generation → RAG pipeline: retrieves context
- Summary generation → LLM gateway: generates summary
- LLM gateway → Model router: selects model
backend/app/ai/llm/llm_service.py - RAG pipeline → Document loaders: loads documents
backend/app/ai/rag/pipeline.py - RAG pipeline → Chunking: chunks content
backend/app/ai/rag/pipeline.py - RAG pipeline → Embeddings: creates embeddings
backend/app/ai/rag/pipeline.py - RAG pipeline → Vector and lexical indexes: indexes and fetches
backend/app/ai/rag/pipeline.py - RAG pipeline → Retrievers and reranker: retrieves and reranks
backend/app/ai/rag/pipeline.py - YouTube Q&A → Chunking: chunks transcript
backend/app/services/youtube_service.py - YouTube Q&A → Embeddings: embeds transcript
backend/app/services/youtube_service.py - YouTube Q&A → Vector and lexical indexes: stores and searches
backend/app/services/youtube_service.py - YouTube Q&A → LLM gateway: answers questions
backend/app/services/youtube_service.py - Conversation repository → Domain models: uses models
backend/app/repositories/conversation_repository.py - Conversation repository → Relational database: reads and writes