Files
kiskaadee f2616f890f docs: decouple architecture and ADR from Traefik/homelab deployment assumptions
- Remove Traefik reverse-proxy node and stale branch reference from ARCHITECTURE.md so the topology describes only what the repo contains (Flask + Gunicorn + SQLite + Zoom API)
- Remove Authelia and homelab server references from docs/adr/0001-transient-credentials-and-gated-host-url.md
2026-11-22 12:00:37 -05:00

2.8 KiB

Architecture — zoom-sched-poc

Canonical present-state architecture for the zoom-sched-poc proof-of-concept.

System Topology

Single-container Flask + Gunicorn (--workers 1 --threads 4) application serving both the static 3-screen presentation UI and the JSON REST API, with ProxyFix enabled for standard X-Forwarded-* headers when run behind an optional reverse proxy.

flowchart LR
  Browser["Browser (3-Screen SPA)<br/>Credentials in tab memory"] -->|HTTP / HTTPS| Flask["Flask + Gunicorn (ProxyFix + Limiter)<br/>MAX_CONTENT_LENGTH: 64 KiB"]
  Flask --> DB[("SQLite WAL<br/>/app/data/appointments.db")]
  Flask -->|HTTPS Bearer / Basic| Zoom["Zoom REST & OAuth API"]

Module Responsibilities

Module Responsibility
app/__init__.py App factory (create_app), ProxyFix, Flask-Limiter (memory://), _resolve_appointment, HTTP routes, and error handlers (413, 429, ZoomAPIError).
app/schemas.py Pydantic v2 request/response models; ZoomCredentials.client_secret uses SecretStr.
app/db.py SQLite WAL initialization (init_db) and atomic state transitions (create_appointment, claim_appointment_for_payment, release_payment_claim, mark_appointment_confirmed, delete_appointment).
app/zoom.py Zoom Server-to-Server OAuth token exchange, paginated slot conflict detection (max_pages=20), meeting creation, and meeting deletion.
app/templates/index.html & static/style.css 3-screen smooth-scroll presentation UI with escapeHtml() and safeHttpUrl() (http:/https: only).

Appointment State Machine

stateDiagram-v2
  [*] --> payment_pending: "POST /api/appointments (slot free)"
  payment_pending --> payment_processing: "POST /pay atomic claim"
  payment_processing --> payment_pending: "Zoom create_meeting fails (release)"
  payment_processing --> confirmed: "Zoom meeting created"
  payment_pending --> [*]: "DELETE (no Zoom call)"
  confirmed --> [*]: "DELETE (deletes Zoom meeting)"

Trust Boundaries & Rate Limits

  • Zoom credentials (account_id, client_id, client_secret) are never written to SQLite, cookies, or disk; they are validated per request on /api/zoom/verify-credentials, /api/appointments, /pay, and DELETE.
  • Host ZAK link (zoom_start_url) is omitted on unauthenticated GET /api/appointments/<lookup_id> and returned only by POST /pay after credential verification.
  • Brute-force rate limits (Flask-Limiter memory:// in a single Gunicorn worker): 60/min default, 10/min on /verify-credentials, /pay, and DELETE, 15/min on POST /api/appointments, 20/min on GET /api/appointments/<lookup_id>.