mirror of
https://github.com/corazoncp/zoom-sched-poc.git
synced 2026-11-30 20:50:31 +00:00
- README.md: document gated zoom_start_url, payment_processing guard, 64 KiB cap, single-worker Docker note, and doc links - ARCHITECTURE.md: document component responsibilities, SQLite appointment state machine, and trust boundaries - docs/adr/0001-transient-credentials-and-gated-host-url.md: record decision for browser-memory-only credentials and gated host URL
2.3 KiB
2.3 KiB
zoom-sched-poc
Interactive 3-screen presentation proof-of-concept for El Corazón como Portal demonstrating Zoom Server-to-Server OAuth scheduling gated by payment confirmation.
Features
- 3-screen presentation flow with automatic smooth scrolling:
- Configuración (Servidor): Validates Zoom Server-to-Server OAuth credentials (
POST /api/zoom/verify-credentials) usingSecretStrin Pydantic; credentials stay strictly in browser tab memory and are never persisted to SQLite or disk. - Solicitar una Cita (Como cliente): Checks Zoom upcoming meetings for time overlaps (
GET /v2/users/me/meetings, paginated up to 20 pages), persists apayment_pendingappointment (includingduration_minutes) in SQLite, and returnssession_id+payment_id. - Buscar Sesión: Looks up
session_idorpayment_id(GET /api/appointments/<lookup_id>), lets the presenter confirm mock payment (POST /api/appointments/<lookup_id>/pay) to provision the Zoom meeting (POST /v2/users/me/meetings), and handles repeat lookups idempotently.
- Configuración (Servidor): Validates Zoom Server-to-Server OAuth credentials (
- Security & concurrency invariants:
- Unauthenticated
GET /api/appointments/<lookup_id>omitszoom_start_url(host ZAK token);zoom_start_urlis returned only byPOST /payafter verifying Zoom credentials. - Atomic
payment_processingclaim/release prevents duplicate Zoom meetings on concurrent/payrequests, andDELETEreturns409 Conflictwhile a payment is in flight. ProxyFix+Flask-Limiter(memory://, single Gunicorn worker--workers 1 --threads 4),MAX_CONTENT_LENGTH(64 KiB),safeHttpUrl()link scheme validation, and 40-bit randomses_/pay_IDs.
- Unauthenticated
Local Development
uv sync
uv run flask --app "app:create_app()" run --debug --port 8000
Run tests:
uv run pytest -v
Single-Container Docker Run
The container runs as non-root appuser with --workers 1 --threads 4 (required for authoritative in-memory rate limiting) and a built-in HEALTHCHECK on /health.
docker build -t zoom-sched-poc .
docker run -p 8000:8000 -v zoom_sched_data:/app/data zoom-sched-poc