kiskaadee 4b5936f617 fix(zoom): format create_meeting start_time with seconds (yyyy-MM-ddTHH:mm:ss)
- 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)
2026-11-21 20:21:41 -05:00
2026-11-21 21:24:46 +00:00

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:
    1. Configuración (Servidor): Validates Zoom Server-to-Server OAuth credentials (POST /api/zoom/verify-credentials) using SecretStr in Pydantic; credentials stay strictly in browser tab memory and are never persisted to SQLite or disk.
    2. Solicitar una Cita (Como cliente): Checks Zoom upcoming meetings for time overlaps (GET /v2/users/me/meetings, paginated up to 20 pages), persists a payment_pending appointment (including duration_minutes) in SQLite, and returns session_id + payment_id.
    3. Buscar Sesión: Looks up session_id or payment_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.
  • Security & concurrency invariants:
    • Unauthenticated GET /api/appointments/<lookup_id> omits zoom_start_url (host ZAK token); zoom_start_url is returned only by POST /pay after verifying Zoom credentials.
    • Atomic payment_processing claim/release prevents duplicate Zoom meetings on concurrent /pay requests, and DELETE returns 409 Conflict while 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 random ses_/pay_ IDs.

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

S
Description
No description provided
Readme Unlicense
131 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 74.6%
HTML 18.7%
CSS 5.8%
Dockerfile 0.9%