-
Notifications
You must be signed in to change notification settings - Fork 46
Description
π Summary
Add a Performance Analytics Dashboard to visualize key employee metrics such as productivity, department growth, retention, and turnover. The dashboard will provide managers and HR teams with actionable insights beyond the current CRUD and simple stats.
π― Motivation
Right now, the system provides only basic CRUD for employees/departments and some visualizations. Real-world enterprises need analytics to drive decisions:
- Which departments are growing fastest?
- Which employees are high performers?
- Whatβs the monthly hiring vs attrition trend?
This feature will make the app a data-driven management tool instead of just a record keeper.
β Acceptance Criteria
-
New backend endpoints under
/api/analyticsto expose aggregated data:- Employee count by department
- New hires per month
- Turnover rate per quarter
- Average tenure
-
Frontend charts (using
react-chartjs-2) to visualize:- Line chart: employee growth over time
- Pie chart: employees by department
- Bar chart: hires vs exits
-
Dashboard page restricted to Managers and HR roles (ties in with RBAC).
-
Unit & integration tests for new backend endpoints.
-
Ensure responsiveness and dark mode support.
π Implementation Notes
-
Backend (Spring Boot)
- Use
Spring Data JPAaggregate queries (COUNT,GROUP BY,DATE_TRUNC) for stats. - Add
AnalyticsController.javato expose REST endpoints.
- Use
-
Frontend (React)
- Create
AnalyticsDashboard.jscomponent. - Fetch data via
axiosfrom/api/analytics/*. - Display in a grid layout with charts and KPI cards.
- Create
π Security
- Endpoints should check user role before returning sensitive analytics.
- Ensure no PII (e.g., salary, personal details) is leaked unless explicitly allowed.
Metadata
Metadata
Assignees
Labels
Projects
Status