How afzalzada2026/hr-dashboard works
HR-Dashboard is a workforce data and HR analytics application. Users load or select workforce datasets, explore dashboards and employee views, and manage reports and access. Its client store prepares and filters employee data, while storage supports browser-local operation and an optional PostgreSQL-backed server mode. The tree and source index document additional directory, mapping, organizational-chart, security, and reporting capabilities. Several page and view implementations were not sampled, so their internal interactions are not inferred; edges cite sampled files or source-index references.
Main entry points: data.ts Workforce state · AnalyticsView.tsx Analytics view · route.ts Server API routes · DataView.tsx Dataset management
Components 26
Dashboard experience
- Overview page
src/app/(dashboard)/page.tsx - Analytics page
src/app/(dashboard)/analytics/page.tsx - Overview view
src/components/views/OverviewView.tsx - Analytics view
src/components/views/AnalyticsView.tsx - Employee directory
src/components/views/DirectoryView.tsx - Workforce map
src/components/views/MapView.tsx - Organization chart
src/components/org/Organogram.tsx
Workforce data
- Dataset management
src/components/views/DataView.tsx - Workforce state
src/store/data.ts - Field mapping
src/lib/mapping.ts - Row normalization
src/lib/normalize.ts - Workforce filters
src/lib/filters.ts
Analysis and reporting
- Report management
src/components/views/ReportsView.tsx - Analytics calculations
src/lib/analytics.ts - Workforce insights
src/lib/insights.ts - Data and report exports
src/lib/exporters.ts
Identity and access
- Security management
src/components/views/SecurityView.tsx - UI and session state
src/store/ui.ts - Session and permissions
src/lib/rbac.ts - Server session and audit
src/lib/server.ts
Server and persistence
- Storage adapters
src/lib/storage.ts - Browser dataset store
src/lib/storage.ts - Server API routes
src/app/api/datasets/route.ts - PostgreSQL data
src/db/schema.ts - Schema bootstrap
src/db/ensure.ts
Other components
- HR user
Connections 31
- HR user → Overview page: opens
src/app/(dashboard)/page.tsx - Overview page → Overview view: renders
src/app/(dashboard)/page.tsx - Analytics page → Analytics view: renders
src/app/(dashboard)/analytics/page.tsx - Overview view → Workforce state: reads workforce state
src/components/views/OverviewView.tsx - Overview view → Analytics calculations: uses calculations
src/components/views/OverviewView.tsx - Overview view → Workforce insights: uses insights
src/components/views/OverviewView.tsx - Analytics view → Workforce state: reads workforce state
src/components/views/AnalyticsView.tsx - Analytics view → Analytics calculations: uses calculations
src/components/views/AnalyticsView.tsx - Analytics view → Workforce insights: uses insights
src/components/views/AnalyticsView.tsx - Dataset management → Workforce state: updates dataset state
src/components/views/DataView.tsx - Workforce state → Field mapping: maps columns
src/store/data.ts - Workforce state → Row normalization: normalizes rows
src/store/data.ts - Workforce state → Workforce filters: applies filters
src/store/data.ts - Workforce state → Storage adapters: loads and saves
src/store/data.ts - Storage adapters → Browser dataset store: reads and writes
src/lib/storage.ts - Dataset management → Field mapping: uses mapping
src/components/views/DataView.tsx - Dataset management → Row normalization: uses normalization
src/components/views/DataView.tsx - Dataset management → Data and report exports: uses exports
src/components/views/DataView.tsx - Analytics view → Data and report exports: exports results
- Organization chart → Workforce state: uses employee data
- Employee directory → Workforce state: uses employee data
- Workforce map → Workforce state: uses employee data
- Report management → Server API routes: manages reports
- Security management → Server API routes: manages access data
- UI and session state → Session and permissions: encodes session
src/store/ui.ts - Workforce state → Session and permissions: checks permissions
src/store/data.ts - Server API routes → Server session and audit: authenticates requests
src/app/api/datasets/route.ts - Server API routes → Schema bootstrap: ensures schema
src/app/api/datasets/route.ts - Server API routes → PostgreSQL data: reads and writes records
src/app/api/datasets/route.ts - Server session and audit → Session and permissions: decodes session
src/lib/server.ts - Schema bootstrap → PostgreSQL data: creates tables
src/db/ensure.ts