How riemarseruelas/work-force works
This is a passcode-protected workforce monitoring dashboard. Authorized personnel review workforce totals and scans, then investigate daily attendance, compliance, population, and site-area distribution; administrators can configure map assignments. React pages use a shared Zustand store for workforce data requests and refresh checks, while the Express backend serves the API and uses PostgreSQL plus the People Accounting REST API. The README documents the backend integrations; some backend internals and page-to-store calls are not shown in source excerpts, so the graph avoids inferring their detailed implementation.
Main entry points: App.jsx App routing · server.js Workforce API · useWorkforceStore.js Workforce data store · AppShell.jsx Dashboard shell
Components 16
Access and navigation
- App routing
src/App.jsx - Passcode access
src/pages/PasscodePage.jsx - Route protection
src/components/ProtectedRoute.jsx - Dashboard shell
src/components/AppShell.jsx
Workforce monitoring
- Workforce overview
src/pages/WorkforceDashboardPage.jsx - Daily attendance
src/pages/WorkforceDailyRecordPage.jsx - Compliance review
src/pages/WorkforceCompliancePage.jsx - Population summaries
src/pages/WorkforcePopulationPage.jsx - Site workforce map
src/pages/WorkforceMapPage.jsx
Map administration
- Map shortcut
src/components/AdminMapShortcut.jsx - Map assignments
src/pages/WorkforceAdminPage.jsx
Data services
- Workforce data store
src/store/useWorkforceStore.js - Workforce API
server.js - PostgreSQL
- People Accounting API
Other components
- Authorized personnel
Connections 29
- Authorized personnel → App routing: opens dashboard
README.md - App routing → Passcode access: routes to
src/App.jsx - App routing → Route protection: protects pages
src/App.jsx - App routing → Workforce overview: routes to
src/App.jsx - App routing → Daily attendance: routes to
src/App.jsx - App routing → Compliance review: routes to
src/App.jsx - App routing → Population summaries: routes to
src/App.jsx - App routing → Site workforce map: routes to
src/App.jsx - App routing → Map assignments: routes to
src/App.jsx - App routing → Workforce API: requests usage log
src/App.jsx - App routing → Workforce API: requests warmup
src/App.jsx - Workforce overview → Dashboard shell: renders in
src/pages/WorkforceDashboardPage.jsx - Daily attendance → Dashboard shell: renders in
src/pages/WorkforceDailyRecordPage.jsx - Compliance review → Dashboard shell: renders in
src/pages/WorkforceCompliancePage.jsx - Population summaries → Dashboard shell: renders in
src/pages/WorkforcePopulationPage.jsx - Site workforce map → Dashboard shell: renders in
src/pages/WorkforceMapPage.jsx - Dashboard shell → Workforce data store: checks for updates
src/components/AppShell.jsx - Workforce overview → Workforce data store: reads workforce data
src/pages/WorkforceDashboardPage.jsx - Daily attendance → Workforce data store: reads and fetches records
src/pages/WorkforceDailyRecordPage.jsx - Compliance review → Workforce data store: reads compliance data
src/pages/WorkforceCompliancePage.jsx - Population summaries → Workforce data store: fetches population
src/pages/WorkforcePopulationPage.jsx - Site workforce map → Workforce data store: reads map data
src/pages/WorkforceMapPage.jsx - Workforce data store → Workforce API: requests workforce data
src/store/useWorkforceStore.js - Workforce API → PostgreSQL: reads and writes
README.md - Workforce API → People Accounting API: retrieves scan data
README.md - Site workforce map → Map shortcut: shows configuration shortcut
src/components/AdminMapShortcut.jsx - Map shortcut → Map assignments: navigates to
src/components/AdminMapShortcut.jsx - Map assignments → Workforce API: updates map assignments
src/pages/WorkforceAdminPage.jsx - Passcode access → Workforce API: validates passcode