How darel-developer/hrattendancemanagerdesign works
HR Attendance Manager is a multi-company HR and attendance application. Employees and managers use the web app to authenticate, manage workforce records, record attendance or use the kiosk, handle leave and planning, and review reports; the client sends requests through a shared API layer to Express routes and PostgreSQL. The README documents additional capabilities, including geolocation, exports, document management, and super-admin controls. Those features are represented at their documented module paths; sampled source gives more detail for authentication and manager reports than for most other routes.
Main entry points: api.ts HTTP API client · server.js Express application · db.js Application database · App.tsx App shell
Components 18
Web application
- App shell
src/app/App.tsx - Page routing
src/app/routes.tsx - Session and identity
src/app/context/AuthContext.tsx - HTTP API client
src/app/services/api.ts
HR workflows
- HR pages
src/app/pages - Manager reports UI
src/app/components/ManagerReportsSection.tsx - Public kiosk
src/app/pages/KioskPage.tsx
Backend services
- Express application
server/server.js - Authentication routes
server/routes/auth.js - Workforce routes
server/routes - Reporting routes
server/routes/managerReports.js - Auth and tenant checks
server/middleware/auth.js - Application database
server/db.js - Push token endpoint
server/routes/auth.js
Notifications
- Push client
src/app/hooks/useFcm.ts - FCM delivery
server/services/fcm.js - Firebase Cloud Messaging
Other components
- Employee or manager
Connections 22
- Employee or manager → App shell: uses
- App shell → Page routing: hosts
- App shell → Session and identity: provides session
- Page routing → HR pages: routes to
- Employee or manager → Public kiosk: uses
- HR pages → HTTP API client: requests data
- Manager reports UI → HTTP API client: manages reports
- Session and identity → HTTP API client: authenticates via
- HTTP API client → Express application: sends requests
- Express application → Authentication routes: dispatches
- Express application → Workforce routes: dispatches
- Express application → Reporting routes: dispatches
- Authentication routes → Auth and tenant checks: checks tokens
- Reporting routes → Auth and tenant checks: checks access
- Authentication routes → Application database: reads and writes
- Reporting routes → Application database: reads and writes
- Workforce routes → Application database: reads and writes
- Push client → HTTP API client: registers token
- HTTP API client → Push token endpoint: sends token
- Push token endpoint → Application database: stores token
- Push client → Firebase Cloud Messaging: receives push
- FCM delivery → Firebase Cloud Messaging: sends push