Winter Arc (vantoicalis.com) — End-to-End Runtime Architecture
Six-beat animated C4 container diagram showing how an athlete 04:30 AM wakeup check-in and Deep Work timer session travel from the Next.js mobile PWA and IndexedDB offline outbox through Cloudflare Edge HMAC time-proof verification and Caddy 2 on Contabo VPS to the NestJS API on port 3001, dual-writing into Valkey 8 O(log N) sorted sets and PostgreSQL 17 with pgBackRest WAL archiving.
Winter Arc (vantoicalis.com) — End-to-End Runtime Architecture
Offline-First Mobile PWA · Cloudflare Edge Time-Proof · Contabo VPS Dual-Network · Valkey O(log N) Leaderboard & PG 17
Client PWA
Offline Queue
Edge CDN
Origin Service
Data Store
ATHLETE DEVICE & CLOUDFLARE EDGE
CONTABO VPS · OPS_BRIDGE DMZ (172.23.0.0/16)
VT-INFRA PRIVATE SUBNET
vantoi-pwa enqueues offline check-ins into idb-outbox
HTTPS 04:30 AM check-in request to Cloudflare Edge
Origin TLS request with signed TIME_PROOF token
Background POST /sync retry draining offline outbox
Reverse proxy routes to vantoi_api:3001 on ops_bridge
Atomic ZADD score update into Valkey 8 sorted sets
Prisma ACID transaction persisted to PostgreSQL 17
vantoi-pwa — Next.js 16 athlete mobile PWA recording 04:30 AM wakeups and Deep Work timers
Văn Tới PWA
04:30 AM · Zustand
idb-outbox — IndexedDB offline outbox queue with stuck-SYNCING auto-recovery
IDB Outbox
offline queue
cloudflare-edge — Cloudflare Edge CDN serving 103 Early Hints and signing HMAC TIME_PROOF tokens
Cloudflare Edge
TIME_PROOF HMAC
caddy-proxy — Caddy 2 reverse proxy on Contabo VPS answering CORS OPTIONS in 1ms
Caddy 2
TLS · 1ms CORS
vantoi-api — NestJS API container on port 3001 verifying HMAC tokens and enforcing daily XP caps
vantoi-api :3001
25 XP · 15h · 4h
valkey-zset — Valkey 8 sorted sets ranking today and all-time leaderboards in O(log N)
Valkey 8 ZSET
O(log N) · TTL 48h
postgres-db — PostgreSQL 17 primary database with pgBackRest continuous WAL archive
PostgreSQL 17
WAL · pgBackRest
enqueue
04:30 AM
HMAC proof
POST /sync
ops_bridge :3001
ZADD · O(log N)
ACID · WAL
vantoi-pwa
records 04:30 AM check-ins;
idb-outbox
queues offline sessions for retry.
cloudflare-edge
signs TIME_PROOF tokens;
caddy-proxy
answers CORS OPTIONS in 1ms.
vantoi-api
on port 3001 verifies HMAC tokens and enforces 25 XP wakeup caps.
valkey-zset
ranks athletes in O(log N) with TTL 48h;
postgres-db
archives WAL.
Full Winter Arc flow: offline-safe mobile PWA to O(log N) Valkey leaderboard.