How divit-s07/bus_fee_check works
Bus Fee Check is a local college transport-fee administration system. Admins manage students and buses, register student faces, and scan boarding passengers; the backend matches faces through the local AI service, checks fee status, records unpaid trips and repeat offenses, and pushes live events to the dashboard. Receipt OCR can update fee/student records, while reports and analytics support oversight. The README documents several capabilities whose implementation was not sampled; those branches are included at subsystem level, with uncertain internal wiring omitted.
Main entry points: server.js Express API · App.jsx React app · models Domain records · face.controller.js Scan and fee decision
Components 21
Admin application
- React app
frontend/src/App.jsx - Student management
frontend/src/pages/Students.jsx - Face scan
frontend/src/pages/FaceScan.jsx - Travel views
frontend/src/pages/TravelRecords.jsx - Unpaid alerts
frontend/src/pages/UnpaidTravels.jsx - Reports and dashboard
frontend/src/pages/Reports.jsx
API and domain
- Express API
backend/server.js - JWT and role checks
backend/middleware/auth.js - Student and bus admin
backend/controllers/student.controller.js - Scan and fee decision
backend/controllers/face.controller.js - Receipt OCR workflow
backend/controllers/receipt.controller.js - Receipt extraction
backend/services/receipt.service.js - Travel services
backend/services/travel.service.js - Reports and analytics
backend/controllers/report.controller.js - Socket events
backend/sockets/index.js - AI HTTP client
backend/services/faceAI.service.js
Face recognition
- Local face matching
ai-service/main.py
Persistent records
- Domain records
backend/models
Other components
- College admin
- MongoDB
- Uploaded receipts
Connections 28
- College admin → React app: uses
README.md - React app → Student management: routes to
frontend/src/App.jsx - React app → Face scan: routes to
frontend/src/App.jsx - React app → Travel views: routes to
frontend/src/App.jsx - React app → Unpaid alerts: routes to
frontend/src/App.jsx - React app → Reports and dashboard: routes to
frontend/src/App.jsx - React app → Express API: calls
README.md - Student management → Express API: requests data
frontend/src/pages/Students.jsx - Express API → JWT and role checks: verifies requests
- Express API → Student and bus admin: routes requests
backend/server.js - Student and bus admin → Domain records: reads and writes
backend/controllers/student.controller.js - Face scan → Express API: sends scan
README.md - Express API → Scan and fee decision: routes scan
- Scan and fee decision → AI HTTP client: requests match
backend/controllers/face.controller.js - AI HTTP client → Local face matching: sends image
- Local face matching → MongoDB: reads students
README.md - Scan and fee decision → Domain records: reads and writes
backend/controllers/face.controller.js - Scan and fee decision → Socket events: emits events
backend/controllers/face.controller.js - Receipt OCR workflow → Receipt extraction: extracts receipt
backend/controllers/receipt.controller.js - Receipt OCR workflow → Domain records: updates students
backend/controllers/receipt.controller.js - Receipt OCR workflow → Uploaded receipts: reads uploads
backend/controllers/receipt.controller.js - Travel services → Domain records: reads and writes
backend/services/travel.service.js - Travel services → Socket events: emits events
backend/services/travel.service.js - Reports and dashboard → Express API: requests summaries
- Express API → Reports and analytics: routes reports
- Unpaid alerts → Express API: requests unpaid trips
- Socket events → Travel views: pushes updates
- Domain records → MongoDB: persists in