How etcharlarevanthrao/cs_assistant works
CS Assistant is a cross-platform study and productivity assistant: learners use web, desktop, or mobile clients to access AI chat, learning tools, and exam practice through a FastAPI backend. A typical chat request travels from a client API to a backend route, where retrieval-augmented generation can provide an answer; the backend also supports PYQ practice, research, planning, and other study features. Firebase authentication and Firestore-backed user data support the product. Several feature routes are unsampled, so their internal calls are not drawn; broader client-to-backend connectivity is documented in the README.
Main entry points: main.py FastAPI entry · chat.py AI chat · rag.py RAG engine · resume.py Resume builder
Components 18
Client apps
- Web app
frontend-web/src/App.tsx - Web API client
frontend-web/src/services/api.ts - Mobile app
frontend-mobile/src/navigation/AppNavigator.tsx - Mobile API client
frontend-mobile/src/services/api.ts
API and AI
- FastAPI entry
backend/app/main.py - AI chat
backend/app/routes/chat.py - RAG engine
backend/app/core/rag.py - Vector retrieval
backend/app/core/vectorstore.py
Study features
- Learning tools
backend/app/routes/learning.py - Exam practice
backend/app/routes/pyq.py - Research
backend/app/routes/research.py - Resume builder
backend/app/routes/resume.py - Other study features
backend/app/routes
Identity and data
- Client identity
frontend-web/src/context/AuthContext.tsx - Token verification
backend/app/core/auth.py - User data
backend/app/core/firestore_service.py - Usage limits
backend/app/core/usage_service.py
Other components
- Learner
Connections 21
- Learner → Web app: uses
README.md - Learner → Mobile app: uses
README.md - Web app → Web API client: requests via
- Mobile app → Mobile API client: requests via
- Web API client → FastAPI entry: calls API
README.md - Mobile API client → FastAPI entry: calls API
README.md - FastAPI entry → AI chat: registers
backend/app/main.py - FastAPI entry → Learning tools: registers
backend/app/main.py - FastAPI entry → Exam practice: registers
backend/app/main.py - FastAPI entry → Research: registers
backend/app/main.py - FastAPI entry → Resume builder: registers
backend/app/main.py - FastAPI entry → Other study features: registers routes
backend/app/main.py - AI chat → RAG engine: invokes
backend/app/routes/chat.py - RAG engine → Vector retrieval: retrieves from
backend/app/core/rag.py - AI chat → Token verification: verifies user
backend/app/routes/chat.py - AI chat → Usage limits: checks limits
backend/app/routes/chat.py - Usage limits → User data: reads and writes
backend/app/core/usage_service.py - Research → RAG engine: uses retrieval
backend/app/routes/research.py - Resume builder → RAG engine: uses retrieval
backend/app/routes/resume.py - Resume builder → User data: persists data
backend/app/routes/resume.py - Client identity → Web app: provides identity
frontend-web/src/App.tsx