How thenabbu/opensrm works
OpenSRM is a self-hosted student dashboard that combines two independent SRM sources in one SQLite-backed web app. The main workflow is portal login and sync plus optional SCOPE sync, followed by rendering stored data into dashboard and feature views; push reminders are a separate capability. The README documents the two-source storage and major surfaces. Source excerpts show selected routing, parsing, storage, and view behavior; unsampled wiring is not asserted beyond documented relationships.
Main entry points: dashboard.py Dashboard assembly · routes_sync.py Sync routes · http_scraper.py Portal scraper · scope_sync.py SCOPE sync
Components 23
Web application
- Web app
app/app.py - Login and sessions
app/auth.py - Sync routes
app/routes_sync.py - Push API and tick
app/routes_push.py
Student Portal
- Portal scraper
app/http_scraper.py - Portal parsers
app/portal/parsers - Timetable parser
app/portal/parsers/timetable.py
SCOPE integration
- SCOPE sync
app/scope_sync.py - SCOPE operations
app/scope/ops.py - SCOPE client
app/scope/client.py
Student data
- SQLite student store
app/db.py - Push subscription store
app/push_store.py
Dashboard features
- Dashboard assembly
app/views/dashboard.py - Attendance views
app/views/attendance.py - Timetable views
app/views/timetable.py - Class ticker
app/views/ticker.py - Academics views
app/views/academics.py - Fees views
app/views/fees.py - Reminder calculation
app/push_calc.py - Push delivery
app/push_send.py
Other components
- Student
- Student Portal
- SCOPE backend
Connections 23
- Student → Web app: uses
- Web app → Login and sessions: authenticates
app/app.py - Web app → Sync routes: routes requests
app/app.py - Sync routes → Portal scraper: runs portal sync
app/routes_sync.py - Portal scraper → Student Portal: scrapes HTML
- Portal scraper → Portal parsers: parses responses
- Portal scraper → Timetable parser: parses timetable
- Sync routes → SCOPE sync: starts SCOPE sync
app/routes_sync.py - SCOPE sync → SCOPE operations: selects operations
app/scope_sync.py - SCOPE sync → SCOPE client: uses client
- SCOPE client → SCOPE backend: calls SOAP API
- Sync routes → SQLite student store: stores sync data
app/routes_sync.py - SCOPE sync → SQLite student store: stores SCOPE data
app/scope_sync.py - Dashboard assembly → SQLite student store: reads student data
app/views/dashboard.py - Dashboard assembly → Attendance views: uses view model
app/views/dashboard.py - Dashboard assembly → Academics views: builds academics view
app/views/dashboard.py - Dashboard assembly → Fees views: builds fees view
app/views/dashboard.py - Dashboard assembly → Timetable views: renders timetable
app/views/dashboard.py - Timetable views → Class ticker: uses ticker helpers
app/views/timetable.py - Push API and tick → Reminder calculation: calculates reminders
app/routes_push.py - Push API and tick → Push subscription store: reads and records
app/routes_push.py - Push API and tick → Push delivery: sends notifications
app/routes_push.py - Push delivery → Student: delivers reminders