How annaskhadafi/hero works
HERO is an employee-management and operations platform. A typical user signs in, enters the dashboard or mobile experience, completes a domain task—such as attendance, an HR request, learning, or safety reporting—and receives a recorded result or approval. The repository exposes these capabilities through App Router pages, API routes, and server actions, with PostgreSQL and shared approval logic underneath. The README documents the platform and database stack; sampled source confirms several route-to-service interactions, but not all module wiring, so uncertain links are omitted.
Main entry points: dashboard/page.tsx Web dashboard · route.ts Attendance APIs · scheduling-timesheet/page.tsx Scheduling and timesheets · summary-engine.ts APD summaries
Components 23
Access and experience
- Web dashboard
app/dashboard/page.tsx - Mobile experience
app/mobile/dashboard/page.tsx - Authentication
app/api/auth/[...all]/route.ts
People operations
- HR operations
app/dashboard/hc/page.tsx - Recruitment
app/dashboard/hc/recruitment/page.tsx - Employee records
app/dashboard/hc/employee/page.tsx - Contracts and letters
app/dashboard/hc/contract-review/page.tsx
Work and safety
- Attendance
app/dashboard/attendance/page.tsx - Scheduling and timesheets
app/dashboard/scheduling-timesheet/page.tsx - HSE and safety
app/dashboard/hse/page.tsx - Warehouse and repair
app/dashboard/warehouse-repair/page.tsx
Learning and activity
- Learning management
app/dashboard/chitralearning-lms/page.tsx - Activity hub
app/dashboard/activity-hub/page.tsx - Activity documents
app/api/activity-sessions/[sessionId]/pdf/route.ts
Shared services
- Approval engine
lib/approval-engine.ts - Legacy approvals
lib/legacy-approval-engine.ts - APD summaries
lib/summary-engine.ts - Attendance APIs
app/api/mobile/face-attendance/route.ts - Face verification
app/api/mobile/face-verification/route.ts - PostgreSQL
Other components
- Employee
- Raray Vision
- Email and push
Connections 41
- Employee → Authentication: signs in
- Authentication → Web dashboard: grants access
- Authentication → Mobile experience: grants access
- Employee → Web dashboard: uses
- Employee → Mobile experience: uses
- Web dashboard → HR operations: opens
- Web dashboard → Recruitment: opens
- Web dashboard → Employee records: opens
- Web dashboard → Contracts and letters: opens
- Web dashboard → Attendance: opens
- Web dashboard → Scheduling and timesheets: opens
- Web dashboard → HSE and safety: opens
- Web dashboard → Warehouse and repair: opens
- Web dashboard → Learning management: opens
- Web dashboard → Activity hub: opens
- Mobile experience → Attendance APIs: submits attendance
- Attendance APIs → PostgreSQL: writes records
- Attendance APIs → Raray Vision: checks liveness
- Attendance APIs → Scheduling and timesheets: syncs attendance
- Face verification → PostgreSQL: reads and writes
- Face verification → Raray Vision: checks liveness
- Face verification → Scheduling and timesheets: syncs attendance
- Attendance → PostgreSQL: reads records
- Scheduling and timesheets → PostgreSQL: reads schedules
- HR operations → PostgreSQL: manages records
- Recruitment → PostgreSQL: manages candidates
- Employee records → PostgreSQL: reads records
- Contracts and letters → PostgreSQL: reads requests
- Contracts and letters → Legacy approvals: uses approvals
- Legacy approvals → PostgreSQL: stores approval state
- Legacy approvals → Email and push: sends updates
- HSE and safety → PostgreSQL: records safety work
- Warehouse and repair → PostgreSQL: reads and updates stock
- Learning management → PostgreSQL: manages learning
- Activity hub → PostgreSQL: manages sessions
- Activity documents → PostgreSQL: loads session data
- Activity documents → Employee: returns PDF
- Approval engine → PostgreSQL: resolves approval context
- APD summaries → PostgreSQL: manages summaries
- APD summaries → Email and push: notifies approvers
- APD summaries → Approval engine: uses approval configuration