Architecture
ExplanationImplemented
Container Architecture
Detailed specification of Attendrix runtime containers, inter-process communication, and isolation boundaries.
Container Architecture
The Attendrix platform is divided into four decoupled container tiers: Client, Gateway, Persistence, and Serverless Compute.
1. Client Tier: Flutter Mobile Container
- Runtime: Flutter 3.x with Dart 3 on Android and iOS.
- Framework: FlutterFlow visual architecture combined with handwritten custom actions and structs.
- Key Modules:
FFAppState: Global reactive in-memory state tree.OfflineRoutingCache: In-memory storage of the 152k-pair pedestrian distance matrix.FlutterSecureStorage: Encrypted storage for Supabase JWT refresh tokens.syncAppData.dart: Tiered data synchronization engine managing cache invalidation.
2. Gateway & Authentication Tier: Supabase Kong & GoTrue
- Reverse Proxy: Kong API Gateway running on port 443 with TLS 1.3 termination.
- Authentication: GoTrue issuing signed RS256 / HS256 JWTs containing the user's
sub(UUID) and role (authenticated). - PostgREST: High-performance HTTP-to-SQL translation engine converting REST calls directly into parameterized PostgreSQL queries.
3. Serverless Compute Tier: Deno Edge Isolates
- Runtime: Deno runtime on V8 isolates with sub-20ms cold-start latency.
- Security Context: Authenticated with the internal
SUPABASE_SERVICE_ROLE_KEY, giving Edge Functions audited administrative access to Vault and PGMQ queues. - Workers:
google-calendar-sync-worker: Reconciles calendar events using deterministic IDs.notify-worker: Dispatches multi-tone push alerts via OneSignal.notify-scheduled-evaluator: Cron-triggered batch evaluator for upcoming events.google-calendar-auth: PKCE OAuth URL generation and code exchange.google-calendar-disconnect: Revocation and secondary calendar deletion.fetch-apod: Nightly NASA APOD ingestion.
4. Persistence Tier: PostgreSQL 17
- Engine: PostgreSQL 17 running on AWS EC2 instances in
ap-south-1. - Extensions Active:
pg_net: Asynchronous HTTP requests from within PostgreSQL.pgmq: Lightweight transactional message queuing.postgis&postgis_raster: Spatial geometry and geography support.pgrouting: Graph traversal and shortest-path calculation.pg_stat_statements: Real-time query performance monitoring.pgcrypto&supabase_vault: AES-256 secret encryption.
Was this page helpful?
Your feedback directly guides the engineering documentation roadmap.