Architecture
ExplanationImplemented
System Architecture
High-level C4 System Context and Container architecture of the Attendrix platform.
System Architecture
Attendrix is designed as an offline-first, event-driven university companion platform. It reconciles high-frequency mobile client interactions with an authoritative PostgreSQL relational core and asynchronous background workers.
C4 Level 1: System Context
The System Context diagram illustrates how university students, campus staff, and external third-party services interact with the Attendrix ecosystem.
C4 Level 1: System Context Diagram
High-level boundary of Attendrix, student users, and external SaaS providers.
C4 Level 1
Rendering architecture diagram...
C4 Level 2: Container Architecture
The Container diagram breaks down Attendrix into its major runtime environments: the Flutter client runtime, the Supabase managed cloud tier, asynchronous Deno isolates, and relational persistence.
C4 Level 2: Container Architecture Diagram
Runtime containers, protocols, and persistent storage layers.
C4 Level 2
Rendering architecture diagram...
Architectural Invariants Enforced
| Invariant | Target Subsystem | Formal Contract |
|---|---|---|
INV-ATT-01 | Attendance Engine | Absences are explicitly recorded in public.absences. Presence is derived dynamically. |
INV-ATT-02 | Client Attendance Cache | Client-side aggregated percentages must equal server calculation within ±0.0% after cache expiry. |
INV-SCH-01 | Timetable Engine | No two active slot occurrences may occupy the same physical building room for overlapping time windows. |
INV-GCAL-01 | Calendar Sync | Calendar reconciliation triggers fire at the SQL statement level, coalescing bulk changes into single PGMQ jobs. |
INV-ROUT-01 | Pedestrian Routing | Lookups between any campus building nodes resolve in time with zero runtime network requests. |
INV-SEC-01 | Storage Boundary | Students cannot access or mutate records outside their auth.uid(), verified by PostgreSQL RLS. |
INV-SEC-02 | Queue Isolation | public.notification_queue and public.gcal_sync_queue must never be exposed to PostgREST anon or authenticated roles. |
Was this page helpful?
Your feedback directly guides the engineering documentation roadmap.