Context and goal
Students and staff at ENSA Béni Mellal need access to official FAQs, class timetables, and administrative information. Chatbot USMS was built as a two-person academic project to provide that information through a conversational interface in French, English, and Arabic. My recorded role was a general project contributor.
Architecture
The Next.js frontend sends questions to a FastAPI backend. The backend routes timetable questions to structured PostgreSQL queries and general university questions to a retrieval-augmented generation pipeline. Qdrant stores embeddings of curated source documents; GroqCloud supplies LLaMA 3.3-70B for generated answers. Redis caches repeated work, and responses stream to the browser with Server-Sent Events.
Engineering decisions
- Timetables use deterministic database queries so schedule answers come from structured data.
- FAQ answers retrieve relevant document chunks before generation, with a fallback when the vector store is unavailable.
- The application includes JWT-based access control, rate limiting, ownership checks, PII masking, audit logs, data export and erasure, and a retention cleanup job.
- Docker Compose runs the application services together for local development.
Outcome and limits
The repository documents a 64-test backend suite covering authentication, chat, administration, retrieval, persistence, and utilities. This is an educational system; the portfolio does not present it as a deployed university service or make an independent compliance claim.
