The Analytics module transforms raw activity data into actionable workforce intelligence. Each role receives a purpose-built dashboard that surfaces the metrics most relevant to their responsibilities, all backed by the same underlying data pipeline of attendance sessions, time logs, daily statistics, and performance metrics. Reports can be pulled on-demand for any date range, and team performance data is exportable to CSV.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Paramount-Intelligence/HR_Monitoring_System/llms.txt
Use this file to discover all available pages before exploring further.
- Admin
- Manager
- Employee
Admin Dashboard
The Admin dashboard gives org-wide visibility across all active employees, projects, and operational exceptions. It is served by two endpoints:GET /dashboard/admin returns live headcount KPIs, and GET /dashboard/admin/analytics returns the full analytics view powered by AdminDashboardService.Summary KPIs
Workforce Headcount
Total users, active users, employees checked in today, WFH vs. office split, and pending approvals count.
Open Alerts
Count of unresolved system alerts (
AlertStatus.OPEN) surfaced directly on the dashboard for immediate action.Active Projects
Count of projects with
ACTIVE or APPROVED status, alongside the org-wide overdue task count.Analytics View (/dashboard/admin/analytics)
The full analytics payload (AdminAnalyticsDashboard) bundles:| Field | Description |
|---|---|
kpis | total_employees, total_projects, pending_approvals, attendance_rate, checked_in_today, late_today, wfh_today |
attendance_trend | Daily series of checked_in, late, and absent counts |
task_statistics | Breakdown by status: total, completed, in_progress, on_hold, pending, rejected |
project_statistics | Breakdown by status: total, approved, pending, rejected, active |
department_comparison | Per-department employee_count, attendance_rate, completed_tasks, pending_approvals |
people_exceptions | Employees flagged for missing check-ins, overdue tasks, or attendance anomalies |
recent_activity | Timestamped activity log entries for audit-trail awareness |
Additional Admin Analytics Tabs
| Endpoint | Schema | Scope |
|---|---|---|
GET /dashboard/admin/users-analytics | UsersAnalyticsDashboard | Employee roster, role/dept distribution, performance metrics |
GET /dashboard/admin/communication-analytics | CommunicationAnalyticsDashboard | Unread messages, meeting counts, support tickets |
GET /dashboard/admin/projects-tasks-analytics | ProjectsTasksAnalyticsDashboard | Project progress, task status distribution |
All admin analytics endpoints require the
admin or hr_operations role. The base /dashboard/admin requires admin only.Risk Visibility
Thepeople_exceptions list in the analytics response flags employees with persistent low utilization, missing checkouts, or overdue tasks. Top performers (by productivity score) are surfaced alongside employees needing attention, giving Admins a balanced view without manually filtering.Data Sources and Aggregation
All dashboard and report data originates from four primary sources:DailyStats
A summary table updated asynchronously by the Celery worker. Aggregates total minutes, tasks, and breaks per user per day. Used for trend charts and performance scoring.
Attendance Sessions
Raw presence data. Each session records
check_in_at, check_out_at, work_mode, and session_status. Used for the attendance feed, WFH/office split, and correction workflows.Time Logs
Timer-based productive time. Each log has
started_at, duration_minutes, a status (ACTIVE or completed), and a log_type (timer vs. manual). Feeds the productive_time_today KPI.Performance Metrics
A dedicated scoring engine computes
Utilization, Consistency, and Output scores from weighted combinations of the sources above. Exposed via the analytics endpoints documented below.Reports
The Reports API generates date-range aggregations across individuals and teams.Report Endpoints
| Endpoint | Auth | Description |
|---|---|---|
GET /reports/employee?start_date=&end_date= | All users | Personal WeeklyReportRead for the authenticated user |
GET /reports/manager?start_date=&end_date= | Manager / Admin / HR | WeeklyReportRead for each direct report |
GET /reports/team-performance | Manager / Admin / HR | Paginated TeamPerformanceResponse with filtering |
GET /reports/team-performance/export | Manager / Admin / HR | CSV download of team performance data |
GET /reports/hr?start_date=&end_date= | HR / Admin | Org-wide WeeklyReportRead list |
GET /reports/admin?start_date=&end_date= | Admin only | Org-wide WeeklyReportRead list |
Team Performance Report
TheGET /reports/team-performance endpoint supports rich filtering:
GET /reports/team-performance/export) produces columns for Employee Name, Email, Role, Department, Designation, Hours, Tasks Worked On, Completed Tasks, Late/Early/WFH/Absence counts, and EOD Status.
Analytics Endpoints
| Endpoint | Permission | Response |
|---|---|---|
GET /analytics/best-performers | analytics.view_org | Top performers ranked by score, completed tasks, and attendance consistency |
GET /analytics/workload-balance | analytics.view_org or analytics.view_team | Per-user active task count and overload flag |
GET /analytics/burnout-risks | analytics.view_org | Users with high consecutive-high-hour-day streaks and a risk level label |
GET /analytics/productivity-trend/{user_id} | Authenticated + access check | Daily productivity score series for a specific user |
Leave and Correction Impact on Reporting
Approved leave directly affects how “Expected Hours” is calculated in reports. An employee on approved leave is never flagged as under-utilized for that period. When an attendance correction is approved, the correspondingDailyStats row and performance scores are automatically recalculated by the background worker, ensuring historical reports remain accurate.
Known Limitations
Incomplete sessions: If an employee forgets to check out, their session remains open.
total_time_today is based on the closed session duration; an unclosed session shows check_out_at: null and duration_minutes: null.