mirror of
https://github.com/corazoncp/zoom-sched-poc.git
synced 2026-11-30 20:50:31 +00:00
4b5936f61762ca2d76cf402bca69d82f8821df4d
- Normalize start_time_local in create_meeting to %Y-%m-%dT%H:%M:%S (converting aware datetimes to tz_name) so Zoom's Create Meeting API honors the requested time instead of falling back to now - Add test_pay_appointment_formats_start_time_with_seconds_for_zoom verifying outgoing Zoom payload - Verified with .venv/bin/pytest -v (85 passed)
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
Documentation
Languages
Python
74.6%
HTML
18.7%
CSS
5.8%
Dockerfile
0.9%