Reports
Neemias' reports module offers 11 types of analysis covering attendance, engagement, and data integrity. All computation runs on the client side — pure computeXxx() functions that consume data from IndexedDB (Dexie) via useLiveQuery. This ensures reports work fully offline, without server dependency.
Access to the reports page (/reports) requires the admin or relatorios roles. Reports are rendered in real time as local data is updated, and each type offers tabular and graphical views with CSV export option.
Report Types
| # | Report | Description |
|---|---|---|
| 1 | Summary | Aggregate statistics: total students, total calls, average attendance, absences in period |
| 2 | Timeline | Call events in chronological order, with filter by class and period |
| 3 | Sessions | Listing of all class sessions held, with presences and absences per session |
| 4 | Weekly | Attendance consolidated by week, comparative across classes and nuclei |
| 5 | Membership | Distribution of students by family membership status (member, attender, visitor) |
| 6 | Trend | Attendance evolution over time with trend line and projection |
| 7 | Class Engagement | Attendance rate per class, ranking and comparison across classes |
| 8 | Risk Dropout | Students with sharp attendance decline in recent weeks, signaling dropout risk |
| 9 | Call Coverage | Percentage of class slots that had calls effectively performed |
| 10 | Peak Frequency | Times and days of the week with highest concentration of presences |
| 11 | Audit | Full traceability of changes: who created, changed, or removed each record, with timestamps and justifications |
Client-Side Architecture
Each report is generated by a pure computeXxx() function located in app/src/modules/reports/. These functions receive raw data from IndexedDB — students, classes, slots, sessions, and attendance events — and return aggregated structures. Since computation is local, response time is under 100ms for typical volumes (~50 students, ~30 events per class), with no network latency. The Cloudflare Worker has no report routes; it acts exclusively as a sync sink, receiving offline events and persisting them to D1.
The decision to keep reports 100% client-side is documented in the worker report routes analysis and aligned with the offline continuity requirement in the PRD.
⚠️ Section under expansion.
Source: app/src/modules/reports/