How shivaay100/college-dispensary-management-system works
College Dispensary Management System serves public visitors, students, and dispensary staff through a React application and Express API backed by MongoDB. Visitors browse dispensary information; students register or log in and view their medical history; staff manage student records, medical visits, medicine stock, staff, facilities, nearby hospitals, gallery content, and event notifications. The backend route/controller layers connect those workflows to Mongoose models, with authentication protecting selected staff operations. The README documents these capabilities, but most individual controllers and page implementations were not sampled, so their detailed call wiring is not inferred.
Main entry points: App.jsx Application routing · user.js User API routes · index.js Express API entry · Admin Staff workspace
Components 26
Web application
- Application routing
frontendDispensary/src/App.jsx - Login and registration
frontendDispensary/src/pages/Login/login.jsx - Public information
frontendDispensary/src/pages/Home/home.jsx - Student dashboard
frontendDispensary/src/pages/Student/studentDashboard.jsx - Staff workspace
frontendDispensary/src/pages/Admin - Stock view
frontendDispensary/src/pages/Stock/stock.jsx - Events and logout
frontendDispensary/src/components/Header/header.jsx
API and domain
- Express API entry
backend/index.js - User API routes
backend/Routes/user.js - History routes
backend/Routes/history.js - Medicine routes
backend/Routes/medicine.js - Dispensary content routes
backend/Routes - Accounts and staff logic
backend/Controllers/user.js - Medical history logic
backend/Controllers/history.js - Medicine inventory logic
backend/Controllers/medicine.js - Facilities and public content
backend/Controllers
Persistence and identity
- JWT authorization
backend/Authentication/auth.js - User records
backend/Models/user.js - History records
backend/Models/history.js - Medicine records
backend/Models/medicine.js - Dispensary content records
backend/Models
Other components
- Visitor
- Student
- Admin / staff
- MongoDB
- Email service
Connections 35
- Visitor → Application routing: opens
- Student → Application routing: uses
- Admin / staff → Application routing: uses
- Application routing → Public information: renders
- Application routing → Login and registration: routes
- Application routing → Student dashboard: routes
- Application routing → Staff workspace: routes
- Application routing → Stock view: routes
- Login and registration → User API routes: HTTP requests
- Student dashboard → History routes: fetches history
- Staff workspace → User API routes: manages users
- Staff workspace → History routes: manages records
- Staff workspace → Medicine routes: manages stock
- Stock view → Medicine routes: fetches stock
- Public information → Dispensary content routes: loads public content
- Events and logout → Dispensary content routes: fetches events
- Express API entry → User API routes: mounts
- Express API entry → History routes: mounts
- Express API entry → Medicine routes: mounts
- Express API entry → Dispensary content routes: mounts
- User API routes → Accounts and staff logic: dispatches
- History routes → Medical history logic: dispatches
- Medicine routes → Medicine inventory logic: dispatches
- Dispensary content routes → Facilities and public content: dispatches
- User API routes → JWT authorization: protects selected routes
- Accounts and staff logic → User records: reads and writes
- Medical history logic → History records: reads and writes
- Medicine inventory logic → Medicine records: reads and writes
- Facilities and public content → Dispensary content records: reads and writes
- JWT authorization → User records: loads account
- User records → MongoDB: persists
- History records → MongoDB: persists
- Medicine records → MongoDB: persists
- Dispensary content records → MongoDB: persists
- Accounts and staff logic → Email service: sends account mail