How aki-008/prepai works
Project type and purpose
• This is a full-stack web application: a React/TypeScript frontend (under Frontend/) and a FastAPI backend (under Backend/) providing a Student Management System with authentication, PostgreSQL storage, and vector-embedding/LLM capabilities.
• README confirms the core functionality: async FastAPI student API with login/registration, CRUD on student records, JWT-based security, plus CLI runner and health checks.
File structure
• Top level:
• Backend/ – FastAPI service
• Frontend/ – React app (Vite + Tailwind + TypeScript)
• ai/ – STT notebook for speech-to-text experiments
• chroma_store/ & Backend/chroma_store – persistent vector store files
• Backend/app/api/v1/endpoints – grouped REST endpoints (auth, prompts, quiz, students).
• Backend/app/core, config.py, security.py – central configuration & security logic (JWT, password hashing).
• Backend/app/database.py, vector_db.py, llm.py – data layer: SQLAlchemy async/PostgreSQL + Chroma vector database + LLM orchestration.
• Frontend/src/api – API client, src/components/pages/routes – UI components, protected routes & context for authentication.
Extract architecture insights from README
• FastAPI app uses async SQLAlchemy + asyncpg to talk to PostgreSQL
• Pydantic models for validation
• JWT + HTTPBearer for protected endpoints
• CORS middleware opens API to frontend
• On startup, DB tables created; on shutdown, connections closed
• Endpoints are grouped by tags (Authentication, Students, Health)
Detail
• Dependency flow: FastAPI startup → create tables → serve requests → shutdown → dispose engine.
• Optionally, show separate environment (development vs. production) with reload vs. gunicorn.