How pranjal1-1/eers works
EERS is an employee performance and recognition web application. Employees and managers use the web app to view workforce and attendance information, submit reviews and KPI results, and administer attendance; managers then finalize performance and manage awards and rewards. The repository also includes employee, department, access-control, audit, and management-dashboard capabilities. The sampled routes show direct PostgreSQL access, while scoring modules provide an internal calculation layer. Several listed capabilities have no sampled implementation, so their wiring is not inferred.
Main entry points: api-auth.ts Request identity · authorization.ts Role rules · attendance/route.ts Attendance endpoints · import/route.ts CSV attendance import
Components 27
Access and workforce
- Employee workspace
apps/web/src/app/employees/page.tsx - Login
apps/web/src/app/login/page.tsx - Employee endpoints
apps/web/src/app/api/employees/route.ts - Request identity
apps/web/src/lib/api-auth.ts - Role rules
apps/web/src/lib/authorization.ts
Attendance management
- Attendance workspace
apps/web/src/app/attendance/page.tsx - Attendance import UI
apps/web/src/app/management/attendance-import.tsx - Attendance endpoints
apps/web/src/app/api/attendance/route.ts - CSV attendance import
apps/web/src/app/api/attendance/import/route.ts
Performance measurement
- Attendance scoring
apps/web/src/lib/attendance-score.ts - KPI endpoints
apps/web/src/app/api/kpis/route.ts - KPI assignments
apps/web/src/app/api/kpi-assignments/route.ts - KPI results
apps/web/src/app/api/kpi-results/route.ts - KPI scoring
apps/web/src/lib/kpi.ts - Performance snapshot
apps/web/src/lib/performance-engine.ts - Cycle configuration
apps/web/src/lib/performance-cycle.ts - Monthly performance
apps/web/src/lib/monthly-performance.ts - Monthly calculator
apps/web/src/lib/monthly-performance-calculator.ts - Cycle finalization
apps/web/src/app/api/performance/monthly/finalize/route.ts - Management reviews
apps/web/src/app/api/performance/reviews/route.ts - Weighted scoring
apps/web/src/lib/scoring.ts
Recognition and oversight
- Management dashboard
apps/web/src/app/api/dashboard/management/route.ts - Monthly awards
apps/web/src/app/api/awards/eom/route.ts - Certificate rewards
apps/web/src/app/api/rewards/certificate/route.ts - Reward services
apps/web/src/lib/rewards-server.ts
Other components
- PostgreSQL
- Employee or manager
Connections 31
- Employee or manager → Attendance import UI: uploads CSV
- CSV attendance import → Request identity: checks identity
apps/web/src/app/api/attendance/import/route.ts - CSV attendance import → Role rules: checks role
apps/web/src/app/api/attendance/import/route.ts - CSV attendance import → PostgreSQL: writes records
apps/web/src/app/api/attendance/import/route.ts - Attendance endpoints → Request identity: requires user
apps/web/src/app/api/attendance/route.ts - Attendance endpoints → Role rules: checks role
apps/web/src/app/api/attendance/route.ts - Attendance endpoints → PostgreSQL: reads and writes
apps/web/src/app/api/attendance/route.ts - KPI endpoints → Request identity: checks role
apps/web/src/app/api/kpis/route.ts - KPI endpoints → Role rules: checks role
apps/web/src/app/api/kpis/route.ts - KPI endpoints → PostgreSQL: reads and writes
apps/web/src/app/api/kpis/route.ts - KPI assignments → PostgreSQL: reads and writes
apps/web/src/app/api/kpi-assignments/route.ts - KPI results → PostgreSQL: reads and writes
apps/web/src/app/api/kpi-results/route.ts - Performance snapshot → Attendance scoring: calculates attendance
apps/web/src/lib/performance-engine.ts - Performance snapshot → KPI scoring: calculates KPI
apps/web/src/lib/performance-engine.ts - Performance snapshot → Cycle configuration: uses weights
apps/web/src/lib/performance-engine.ts - Cycle configuration → Attendance scoring: uses score
apps/web/src/lib/performance-cycle.ts - Cycle configuration → KPI scoring: uses KPI definitions
apps/web/src/lib/performance-cycle.ts - Monthly performance → Weighted scoring: uses scoring
apps/web/src/lib/monthly-performance.ts - Cycle finalization → Monthly calculator: calculates cycle
apps/web/src/app/api/performance/monthly/finalize/route.ts - Cycle finalization → Request identity: checks identity
apps/web/src/app/api/performance/monthly/finalize/route.ts - Cycle finalization → Role rules: checks role
apps/web/src/app/api/performance/monthly/finalize/route.ts - Management reviews → Request identity: checks identity
apps/web/src/app/api/performance/reviews/route.ts - Management reviews → PostgreSQL: stores reviews
apps/web/src/app/api/performance/reviews/route.ts - Management dashboard → Request identity: checks identity
apps/web/src/app/api/dashboard/management/route.ts - Management dashboard → Role rules: checks role
apps/web/src/app/api/dashboard/management/route.ts - Management dashboard → PostgreSQL: queries metrics
apps/web/src/app/api/dashboard/management/route.ts - Monthly awards → Request identity: checks identity
apps/web/src/app/api/awards/eom/route.ts - Monthly awards → Role rules: checks role
apps/web/src/app/api/awards/eom/route.ts - Monthly awards → PostgreSQL: reads and writes
apps/web/src/app/api/awards/eom/route.ts - Certificate rewards → Request identity: checks identity
apps/web/src/app/api/rewards/certificate/route.ts - Certificate rewards → Reward services: uses service
apps/web/src/app/api/rewards/certificate/route.ts