How ahana1412/smart-campus-companion works
Project type and purpose
• This is a full-stack, demo-ready web application (“Smart Campus Companion”) for reporting campus issues, lost & found, and pushing awareness alerts.
• Frontend is a React single-page app (SPA). Backend is a Python service (venv present) exposing REST endpoints, which handles persistence, image uploads, and an ML-based auto-categorization.
Main components
a. Frontend (React SPA)
• Hosts components under frontend/src (forms, lists, dashboard, sidebar)
• Communicates via AJAX/Fetch to the backend API
b. Backend API Service
• Python application (Flask/Django/FastAPI implied by venv)
• Exposes endpoints for:
– ReportProblem (POST/GET)
– LostFound (POST/GET, image upload)
– Alerts (GET)
– Categorization trigger
c. Database
• Stores issues, lost-&-found records, alerts, user metadata, ML model outputs
• Likely PostgreSQL or MongoDB (select based on Python stack)
d. Object Storage / Blob Store
• Holds uploaded images (e.g., AWS S3 / Google Cloud Storage / local file store)
e. ML Categorization Service
• Could be embedded in the backend or a standalone microservice
• Takes incoming issue data, returns “IT/Hostel/Facilities” category
f. External Notification Channels (optional)
• Email / SMS / Push notifications for real-time campus alerts
Relationships & data flow
• Browser <–> Frontend React SPA
• SPA —(HTTP/HTTPS REST calls)→ Backend API
• Backend —(SQL/NoSQL queries)→ Database
• Backend —(PUT)→ Object Storage
• Backend —(RPC or in-process call)→ ML Categorization Service
• Backend —(triggers)→ Notification Channel
Architectural patterns & design principles
• Client-Server (React UI vs. REST API)
• Modular UI components for forms, lists, dashboard
• Separation of concerns:
• Presentation layer (React)
• Business logic + ML (Python)
• Data persistence (Database + Storage)
• Asynchronous handling of image uploads and ML classification
• Stateless API (scale horizontally)