How souleyraquib71-web/bootcamp-chatbot-backend works
RodiumAI is a FastAPI backend for a conversational Python tutor. The main workflow accepts a chat turn, validates the selected model, builds provider-facing history, streams the tutor response, and saves the completed turn and any extras. The API also exposes conversation history, notes, and model choices. Most application behavior is concentrated in main.py; the excerpts do not expose every route or helper implementation, so the graph keeps those responsibilities grouped and notes relationships only where documented or shown.
Main entry points: main.py Chat turn handler · db.py Session and engine · models.py Conversation and message models · system.md Tutor system prompt
Components 14
API and conversations
- FastAPI endpoints
main.py - Conversation history
main.py - Personal notes
main.py - Model selection
main.py
Tutor generation
- Chat turn handler
main.py - LLM history shaping
main.py - Response streaming
main.py - Quiz and summary
main.py - Tutor system prompt
prompts/system.md
Persistence
- Session and engine
database/db.py - Conversation and message models
database/models.py - SQLite or PostgreSQL
Other components
- Frontend user
- RodiumAI provider
Connections 19
- Frontend user → FastAPI endpoints: sends requests
README.md - FastAPI endpoints → Conversation history: serves history
main.py - FastAPI endpoints → Personal notes: adds notes
main.py - FastAPI endpoints → Model selection: lists models
main.py - FastAPI endpoints → Chat turn handler: handles chat
main.py - Chat turn handler → Model selection: validates model
main.py - Chat turn handler → LLM history shaping: builds context
main.py - Chat turn handler → Response streaming: streams reply
main.py - Chat turn handler → Quiz and summary: generates extras
main.py - Chat turn handler → Tutor system prompt: loads prompt
main.py - Response streaming → RodiumAI provider: requests generation
main.py - Quiz and summary → RodiumAI provider: requests extras
main.py - Response streaming → Frontend user: sends events
README.md - Conversation history → Session and engine: reads and writes
main.py - Personal notes → Session and engine: writes notes
main.py - Chat turn handler → Session and engine: saves completed turn
main.py - Session and engine → Conversation and message models: uses models
main.py - Conversation and message models → Session and engine: inherits base
database/models.py - Session and engine → SQLite or PostgreSQL: connects to
README.md