How benjaminarielkatani-eng/unilia-chatbot works
UNILIA AI Helpdesk is a student-facing university chatbot with document management and a FastAPI backend. The documented chat workflow accepts a question, finds or creates a session, stores the question, requests an answer through the AI service, saves the response and returns it; students can also retrieve session history. Staff can upload, list, update and soft-delete knowledge-base documents. The repository shows a placeholder AI response, while the README describes the RAG engine as in progress. The frontend and AI directories contain no implementation in the supplied tree, so their runtime connections remain unverified.
Main entry points: database.py Database access · main.py FastAPI application · chat.py Chat API · documents.py Document API
Components 17
API and workflows
- FastAPI application
backend/main.py - Health endpoint
backend/routers/health.py - Chat API
backend/routers/chat.py - Chat schemas
backend/schemas/chat.py
Knowledge management
- Document API
backend/routers/documents.py - Document schemas
backend/schemas/document.py - Document records
backend/models/document.py - Uploaded files
backend/uploads
Chat and persistence
- Chat sessions
backend/models/chat.py - User accounts
backend/models/user.py - Answer feedback
backend/models/feedback.py - Database access
backend/database/database.py - Application database
Answer generation
- AI service
backend/services/ai_service.py - RAG engine
ai
Other components
- Student
- Staff
Connections 21
- Student → FastAPI application: sends requests
README.md - Staff → FastAPI application: manages documents
README.md - FastAPI application → Health endpoint: registers
backend/main.py - FastAPI application → Document API: registers
backend/main.py - FastAPI application → Chat API: registers
backend/main.py - Document API → Document records: queries and updates
backend/routers/documents.py - Document API → Document schemas: validates and returns
backend/routers/documents.py - Document API → Uploaded files: writes files
backend/routers/documents.py - Chat API → Chat schemas: validates and returns
backend/routers/chat.py - Chat API → Chat sessions: reads and writes
backend/routers/chat.py - Chat API → AI service: requests answer
backend/routers/chat.py - AI service → RAG engine: planned integration
- AI service → Chat API: returns answer
backend/routers/chat.py - Document API → Database access: uses sessions
backend/routers/documents.py - Chat API → Database access: uses sessions
backend/routers/chat.py - Database access → Application database: connects
backend/database/database.py - FastAPI application → Database access: creates tables
backend/main.py - Chat sessions → Database access: inherits base
backend/models/chat.py - Document records → Database access: inherits base
backend/models/document.py - User accounts → Database access: inherits base
backend/models/user.py - Answer feedback → Database access: inherits base
backend/models/feedback.py