Analytics & reporting
Attendance Tracking (Education)
Indicative price, not an offer: €19/mo; QR check-in, absence alerts, absence patterns
Generated from docs/plan/paid/attendance-tracking/PLAN.md in the AstroBaaS repository. Nothing described below is implemented — it is the written plan for it.
A paid module for education/youth organizations to record daily attendance with QR check-in, pattern analysis, and automated compliance reporting for regulatory authorities. Core provides audit infrastructure; this pack adds attendance-specific data model, QR code generation, absence pattern detection, and audit exports for education authorities.
The problem
Schools manually record roll call on paper or spreadsheets, cannot prove to education authorities that they track attendance (compliance gap), miss patterns (chronic absenteeism), and waste 15 min/day on manual entry. When disputes arise (‘was my child absent on the 15th?’), there is no audit trail.
What it does
- Daily attendance check-in: mark present/absent/late/excused per student per day
- QR code check-in: generate unique QR per session, scan to auto-mark present, audit by QR scan timestamp
- Attendance pattern analysis: identify chronic absentees (>20% absent), flag for intervention
- Absence alerts: automated email when student absent, optionally escalate after N consecutive absences
- Compliance report export: CSV/PDF audit trail (date, student, status, recorded by, recorded at) for education authorities
- Bulk attendance entry: staff can upload CSV to record attendance in bulk (fallback for QR outage)
- Attendance dashboard: per-student absence rate, class absence rate, trend sparkline (last 30 days)
What it deliberately does NOT do
Each boundary carries its reason. A boundary without a reason gets crossed by the next person who reads this.
- Parental absence excuse submission—separate workflow owned by parent-portal module (not automating excuse validation)
- Integration with national absence registries—credential/per-country obligation; support team handles mapping
- Predictive intervention or truancy referral logic—owned by education data pack, not attendance-specific
- GPS/geolocation check-in—privacy complexity; QR is the check-in method
- Mobile app for parents to submit absence excuses—owned by mobile app builder, not this module
Data model
New entities: AttendanceSession (id, cohortId, date, type[daily|special], qrCode, createdAt); Attendance (id, sessionId, studentId, status[present|absent|late|excused], checkedInBy, checkedInAt, qrScanId). Links: AttendanceSession.cohortId → cohort from enrollment module. Migration: none (new data).
API
- POST /api/v1/attendance-sessions — create daily attendance session, generate QR code (staff only)
- POST /api/v1/attendance-sessions/{id}/qr-checkin — record QR scan as attendance (public, no auth if QR is valid)
- POST /api/v1/attendance — manual check-in (staff records present/absent/late/excused)
- GET /api/v1/attendance/{studentId} — attendance history for a student (staff/parent read own child)
- GET /api/v1/cohorts/{id}/attendance-analytics — class-level absence rate, chronic absentees list (staff only)
- POST /api/v1/attendance/export-compliance — generate audit trail CSV for authorities (staff only)
- GET /api/v1/attendance/absence-alerts — list students with >N consecutive absences (staff only)
Every route added here must also appear in src/pages/openapi.json.ts — a test
fails the build if it does not.
Admin
Staff dashboard: date picker → daily attendance session creation + QR display for scanning. Attendance card: today’s session, quick-entry form (mark present/absent/late), bulk CSV upload. Analytics card: class absence rate %, students >20% absent (red flag), absence trend sparkline. Compliance export button (download CSV with audit trail).
The seam — why this is paid
Core owns: audit logging (every attendance write), email infrastructure, role/permission system. Paid pack owns: Attendance/AttendanceSession entities, QR code generation, pattern detection (chronic absence flagging), compliance export format. Seam drawn here because education authorities in each country have specific compliance formats and timing—support team maps those, core cannot guarantee.
Support commitment: audit trail for education authority compliance, absence reporting
Dependencies
- student-enrollment-progress-tracking — Attendance relates to Students, cohorts must exist
- core:audit-log — every attendance write logged with who/when/previous value
- core:email — absence alerts email to parent on check-in
- core:roles-and-permissions — staff role required for manual entry, parent reads own child only
Acceptance checks
Each of these must be able to fail. Before claiming this is done, break the code deliberately and watch each one go red.
- A QR attendance session is created for a cohort on a date; the QR code is displayable and scannable
- Scanning the QR code (without auth) records the student as present with timestamp; no second scan by same student within 5 min is allowed
- A staff member manually marks a student absent for a date; the audit log records ‘staff-id marked student-id absent on 2026-09-03’
- A student with 5 consecutive absences (unexcused) triggers an automated email to parent: ‘Attendance Alert: [Student] has been absent 5 days in a row’
- A compliance export CSV includes: Date, StudentId, StudentName, Status, CheckedInBy, CheckedInAt; rows are in chronological order with no omissions
- A class attendance analytics card shows: total students, present today, absent today, % absent (last 30 days), with ‘last updated’ timestamp
- A staff member cannot record attendance for a student in a cohort they do not manage (role/cohort isolation enforced)
- A QR attendance session created on 2026-09-03 with code ‘ABC123’ is revoked; scanning ‘ABC123’ on 2026-09-04 does not record attendance
Risks
QR code reuse across days allows attendance gaming (scan today’s QR, claim it’s yesterday). Each session must have unique QR + date binding. Absence alerts at scale (1000 students) can trigger email storms—must batch and deduplicate. Pattern detection logic for ‘chronic absentee’ must clearly define the threshold (20% ≠ 15 days); document in acceptance. Compliance export format varies by country—if export is wrong format, regulators reject audit; support team must validate before first use.
Commercial context
| Suggested price | €19/mo; QR check-in, absence alerts, absence patterns |
| Rival anchor | Skyward: €25-50/mo; custom: €1500+ |
The anchor is what the nearest equivalent charges on Shopify or Magento today. It is context for a pricing decision, not the decision.
Generated from the commerce plan. See docs/COMMERCE-PLAN.md for the full
catalogue and ../../AI-GUIDE.md for how to work on this repository.