How nikhil-4404/ai-exam-planner works
This is a browser-based exam preparation planner: users enter exam, subject, and study constraints, receive a generated strategy, and can save plans or export them as PDFs. The FastAPI application coordinates authentication, strategy generation, persistence, and exports; the browser handles forms and renders results. The README also documents theme switching and deterministic fallback behavior. The supplied excerpts show the API, models, database, PDF builder, and parts of the browser scripts; some UI behavior is documented but not fully sampled.
Main entry points: main.py FastAPI routes · planner.js Planner UI · ai.py Strategy engine · auth.js Login UI
Components 12
Browser interface
- Browser
- Login UI
app/static/auth.js - Planner UI
app/static/planner.js - Page templates
app/templates
API coordination
- FastAPI routes
app/main.py - Request and response models
app/models.py
Strategy generation
- Strategy engine
app/ai.py - Groq Chat Completions
Plans and exports
- PDF builder
app/pdf.py - SQLite access
app/db.py - Planner database
Other components
- Planner user
Connections 17
- Planner user → Browser: uses
- Browser → Login UI: loads
- Browser → Planner UI: loads
- FastAPI routes → Page templates: renders
- FastAPI routes → Browser: serves pages
- Browser → FastAPI routes: sends requests
- Login UI → FastAPI routes: authenticates
- Planner UI → FastAPI routes: requests strategy
- FastAPI routes → Strategy engine: generates strategy
- Strategy engine → Groq Chat Completions: requests completion
- Strategy engine → FastAPI routes: returns strategy
- FastAPI routes → Request and response models: uses models
- FastAPI routes → SQLite access: reads and writes
- SQLite access → Planner database: queries
- FastAPI routes → PDF builder: builds export
- FastAPI routes → Browser: streams PDF
- Planner UI → FastAPI routes: manages saved plans