How calculusrabbit/smart_campus_assistant works
Smart Campus Assistant is a student-facing campus information platform with a web UI, FastAPI backend, PostgreSQL-backed campus data, event recommendations, and a document-based chatbot. The main interaction runs from a student page through frontend API calls to backend endpoints, which retrieve campus records or produce recommendations and chat responses. The repository also includes professor reviews and a RAG content-collection/retrieval capability. Some subsystem relationships are documented in the README or imports but not fully visible in the excerpts; those uncertain links are omitted or marked unverified.
Main entry points: App.jsx Page navigation · api.js API client · main.py REST API and routing · pipeline.py Chat answer pipeline
Components 24
Student interface
- Page navigation
frontend/src/App.jsx - API client
frontend/src/api.js - Campus dashboard
frontend/src/pages/Dashboard.jsx - Login and signup
frontend/src/pages/Login.jsx - Signup form
frontend/src/pages/SignUp.jsx - Student profile
frontend/src/pages/Profile.jsx - Interest options
frontend/src/interests.js - Professor reviews
frontend/src/pages/Reviews.jsx - Professor details
frontend/src/pages/ProfessorPage.jsx - Navigation bar
frontend/src/components/NavBar.jsx
API and domain services
- REST API and routing
main.py - Event recommendations
services/event_recommender.py - Interest matching
services/recommendation_service.py
Campus data
- Campus data access
database.py - PostgreSQL
Chat and campus knowledge
- Chat answer pipeline
services/rag/pipeline.py - Semantic retrieval
services/rag/retriever.py - RAG configuration
services/rag/config.py - Ollama inference
- Answer prompts
services/rag/processing/prompt.py
Knowledge collection
- Campus web scrapers
services/rag/scrapers - Document ingestion
services/rag/processing/ingest.py - Document chunking
services/rag/processing/chunker.py
Other components
- Student
Connections 30
- Student → Page navigation: uses
frontend/src/App.jsx - Page navigation → Campus dashboard: routes to
frontend/src/App.jsx - Page navigation → Login and signup: routes to
frontend/src/App.jsx - Page navigation → Signup form: routes to
frontend/src/App.jsx - Page navigation → Student profile: routes to
frontend/src/App.jsx - Page navigation → Professor reviews: routes to
frontend/src/App.jsx - Page navigation → Professor details: routes to
frontend/src/App.jsx - Campus dashboard → API client: requests data
frontend/src/pages/Dashboard.jsx - Login and signup → API client: authenticates via
frontend/src/pages/Login.jsx - Signup form → API client: creates account via
frontend/src/pages/SignUp.jsx - Student profile → API client: reads interests
frontend/src/pages/Profile.jsx - Student profile → Interest options: uses choices
frontend/src/pages/Profile.jsx - Signup form → Interest options: uses choices
frontend/src/pages/SignUp.jsx - Professor reviews → API client: loads reviews
frontend/src/pages/Reviews.jsx - Professor reviews → Page navigation: opens professor
frontend/src/pages/Reviews.jsx - Professor details → API client: reads and updates
frontend/src/pages/ProfessorPage.jsx - Navigation bar → API client: reads user
frontend/src/components/NavBar.jsx - API client → REST API and routing: sends HTTP requests
frontend/src/api.js - REST API and routing → Campus data access: calls data access
main.py - Campus data access → PostgreSQL: reads and writes
README.md - REST API and routing → Event recommendations: requests event matches
main.py - REST API and routing → Chat answer pipeline: may invoke chat
main.py - REST API and routing → Interest matching: may use interest matching
main.py - Chat answer pipeline → Semantic retrieval: embeds and searches
services/rag/pipeline.py - Chat answer pipeline → Ollama inference: sends generation request
services/rag/pipeline.py - Chat answer pipeline → RAG configuration: loads settings
services/rag/pipeline.py - Semantic retrieval → RAG configuration: loads model settings
services/rag/retriever.py - Campus web scrapers → Document ingestion: may provide source content
- Document ingestion → Document chunking: may prepare chunks
- Chat answer pipeline → Answer prompts: may compose prompt