Skip to content

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

#ReportDescription
1SummaryAggregate statistics: total students, total calls, average attendance, absences in period
2TimelineCall events in chronological order, with filter by class and period
3SessionsListing of all class sessions held, with presences and absences per session
4WeeklyAttendance consolidated by week, comparative across classes and nuclei
5MembershipDistribution of students by family membership status (member, attender, visitor)
6TrendAttendance evolution over time with trend line and projection
7Class EngagementAttendance rate per class, ranking and comparison across classes
8Risk DropoutStudents with sharp attendance decline in recent weeks, signaling dropout risk
9Call CoveragePercentage of class slots that had calls effectively performed
10Peak FrequencyTimes and days of the week with highest concentration of presences
11AuditFull 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/

Distributed under MIT License.