CH 22BasicElite

Analytics, Business Intelligence & AI Copilot Platform

The intelligence layer of NexusOne: executive and module dashboards, a KPI framework, rule-based alerting, and a report builder are Basic tier. Gemini-powered predictive analytics and the conversational AI Copilot are Elite tier, following the platform's "AI features are Elite" rule.

Implementation note: dashboards aggregate directly from each module's existing collections (DailyAttendance, ReportCard, StudentFeeAccount, AdmissionLead, Payroll, Asset, MaintenanceTicket, CompetencyRecord, Course, Notice, DriverTrip, etc.) rather than a separate data warehouse. The AI Copilot and Predictive Analytics controllers use their own Gemini helper (utils/geminiHelper.js) so the existing aiInsightController.js from earlier chapters is left untouched. Cross-school benchmarking and full Data Governance / Data Quality tooling (BRD §22.53-54) are scoped out of this pass as fast-follow items.

Features

Executive & Module Dashboards

Basic
  • Executive dashboard: composite School Health Score (0-100) across academics, attendance, admissions, finance, engagement and operations pillars
  • Ten module dashboards: Academic, Attendance, Finance, Admissions, HR, Facilities, Growth Passport, LMS, Communication, Transport
  • All aggregations computed live from existing MongoDB collections (no separate data warehouse) via getSchoolFilter-scoped pipelines
  • Web UI: /dashboard/admin/analytics and its module sub-pages

KPI Framework

Basic
  • Seven categories: academic, financial, operational, admissions, engagement, workforce, development
  • Target, warning threshold, critical threshold per KPI, with automatic status computation (on_target / warning / critical)
  • Web UI: /dashboard/admin/analytics/kpis

Alert Management

Basic
  • Rule-based (non-AI) nightly scan across attendance, academic, fee and operational risk categories
  • De-duplicated per ongoing condition, routed to admins via the existing NotificationService
  • Acknowledge / resolve workflow with full audit trail on the Alert record itself
  • Web UI: /dashboard/admin/alerts

Report Builder

Basic
  • On-demand export to PDF, Excel or CSV for any supported module
  • Optional recurring schedule (daily/weekly/monthly/quarterly) with email delivery via the existing email service
  • Report creation and every export is written to AuditLog
  • Web UI: /dashboard/admin/reports

Predictive Analytics Engine

Elite
  • Six forecasting domains: academic risk, attendance risk, financial (fee defaulters), admissions forecast, workforce attrition, facility replacement
  • Gemini-generated risk narrative and recommendations over real aggregated data, with a statistical fallback when the AI service is unavailable
  • Web UI: /dashboard/admin/analytics/predictions

AI Copilot

Elite
  • Conversational natural-language queries over a role-scoped data snapshot (financial data excluded for teacher/student/parent roles)
  • Every query logged to CopilotQueryLog for audit, including which data categories were accessed
  • One shared chat UI reused across admin, teacher, parent and student portals — web and mobile
  • Web UI: /dashboard/admin/copilot (and the teacher/parent/student equivalents)

API Reference — Chapter 22

Dashboards & Benchmarking (Basic)

GET/api/analytics/dashboard/executive

School Health Score, KPI summary, active alerts

GET/api/analytics/dashboard/:module

academic | attendance | finance | admissions | hr | facilities | growth-passport | lms | communication | transport

GET/api/analytics/drill-down

School → grade → section → student attendance drill-down

GET/api/analytics/benchmarks

Compare by term, academic year or campus

GET/api/analytics/my/performance

Student self-service performance view

GET/api/analytics/my/child/:studentId

Parent view of a linked child's performance

KPIs, Alerts & Reports (Basic)

GET/POST/PATCH/DELETE/api/analytics/kpis

KPI framework CRUD

GET/api/analytics/alerts

List alerts, filterable by status/category/priority

PATCH/api/analytics/alerts/:alertId/acknowledge

Acknowledge an alert

PATCH/api/analytics/alerts/:alertId/resolve

Resolve an alert

GET/POST/DELETE/api/analytics/reports

Report Builder definitions

GET/api/analytics/reports/:reportId/export

?format=pdf|excel|csv on-demand export

Predictions & AI Copilot (Elite)

GET/api/analytics/predictions/at-risk

Academic risk prediction

GET/api/analytics/predictions/attendance-risk

Chronic absenteeism / dropout risk

GET/api/analytics/predictions/fee-defaulters

Financial / fee collection prediction

GET/api/analytics/predictions/enrollment

Admissions forecast

GET/api/analytics/predictions/workforce

Workforce attrition & hiring forecast

GET/api/analytics/predictions/facility

Asset replacement & maintenance demand forecast

POST/api/analytics/copilot/query

Natural-language query, role-scoped data snapshot

GET/api/analytics/copilot/history

Audit log of past Copilot queries

Frontend Pages

PathRoleDescriptionTier
/dashboard/admin/analyticsAdmin / Super AdminExecutive dashboardBasic
/dashboard/admin/analytics/{module}Varies by moduleAcademic, attendance, finance, admissions, HR, facilities, growth-passport, LMS, communication, transportBasic
/dashboard/admin/analytics/benchmarksAdmin / Super AdminTerm / year / campus comparisonBasic
/dashboard/admin/analytics/kpisAdmin / Super AdminKPI framework managementBasic
/dashboard/admin/alertsAdmin, Teacher, HR, Facilities, AccountantAlert centerBasic
/dashboard/admin/reportsAdmin / Super AdminReport builderBasic
/dashboard/admin/analytics/predictionsAdmin / Super AdminPredictive analyticsElite
/dashboard/admin/copilotAdmin / Super AdminAI Copilot chatElite
/dashboard/teacher/copilot, /dashboard/parent/copilot, /dashboard/student/copilotTeacher / Parent / StudentRole-scoped AI Copilot chatElite

Mobile

Under app/(admin)/:analytics.tsx (executive summary),alerts.tsx (alert center with acknowledge/resolve), and ai-copilot.tsx(Elite). The same Copilot screen is reused under app/(teacher)/,app/(parent)/ andapp/(student)/ via a sharedcomponents/analytics/CopilotChat.tsxcomponent, following the same requiresElite sentinel pattern used by the existing AI Parent Assistant.