How gerobankenz-beep/security-management-system works
SM-SYS is a security-guard operations platform: staff use a web console to manage sites, staffing, attendance, incidents and business reporting, while guards use a mobile app for shifts and checkpoint scans. The backend provides authenticated, role-restricted API modules backed by PostgreSQL. The graph preserves the principal operational domains and the mobile sync path. Evidence is limited to the supplied excerpts and SOURCE INDEX; unsampled runtime connections are omitted rather than inferred.
Main entry points: App.js Mobile navigation · response.js API response helpers · sites/routes.js Clients and sites · auth/routes.js Authentication and users
Components 24
Web console
- Web routing
web/src/App.jsx - Operations pages
web/src/pages - Client management
web/src/pages/Clients.jsx - Web authentication
web/src/auth/AuthContext.jsx - Web API access
web/src/api
Guard mobile
- Mobile navigation
mobile/App.js - Shift and scan
mobile/src/screens - Mobile authentication
mobile/src/auth/AuthContext.jsx - Offline sync
mobile/src/sync/SyncContext.jsx - Mobile API client
mobile/src/api/client.js
Operations API
- API application
backend/src/app.js - Authentication and users
backend/src/modules/auth/routes.js - Clients and sites
backend/src/modules/sites/routes.js - Roster planning
backend/src/modules/roster - Attendance tracking
backend/src/modules/attendance - Patrol rounds
backend/src/modules/patrol - Incidents and anomalies
backend/src/modules/incidents - Guards and payroll
backend/src/modules/guards - Dashboard and reports
backend/src/modules/dashboard
Platform services
- PostgreSQL
backend/src/config/db.js - Request controls
backend/src/middleware - API response helpers
backend/src/utils/response.js
Other components
- Staff and clients
- Guards
Connections 23
- Staff and clients → Web routing: uses
web/src/App.jsx - Guards → Mobile navigation: uses
mobile/App.js - Web routing → Operations pages: routes to
web/src/App.jsx - Operations pages → Client management: includes
web/src/App.jsx - Client management → Web API access: calls client APIs
web/src/pages/Clients.jsx - Web authentication → Web API access: uses
web/src/auth/AuthContext.jsx - Mobile navigation → Mobile authentication: provides auth
mobile/App.js - Mobile navigation → Offline sync: provides sync
mobile/App.js - Mobile navigation → Shift and scan: navigates to
mobile/App.js - Mobile authentication → Mobile API client: uses endpoints
mobile/src/auth/AuthContext.jsx - Offline sync → Mobile API client: submits sync
mobile/src/sync/SyncContext.jsx - API application → Authentication and users: mounts routes
- Clients and sites → PostgreSQL: queries
backend/src/modules/sites/routes.js - Clients and sites → Request controls: checks access
backend/src/modules/sites/routes.js - Clients and sites → API response helpers: formats results
backend/src/modules/sites/routes.js - Authentication and users → Request controls: uses controls
backend/src/modules/auth/routes.js - Authentication and users → API response helpers: formats results
backend/src/modules/auth/routes.js - Roster planning → PostgreSQL: queries
backend/src/modules/roster/routes.js - Attendance tracking → API response helpers: formats results
backend/src/modules/attendance/routes.js - Patrol rounds → Request controls: uses controls
backend/src/modules/patrol/routes.js - Incidents and anomalies → PostgreSQL: queries
backend/src/modules/incidents/routes.js - Guards and payroll → API response helpers: formats results
backend/src/modules/guards/routes.js - Dashboard and reports → Operations pages: shown in