mirror of
https://github.com/corazoncp/zoom-sched-poc.git
synced 2026-12-01 04:50:31 +00:00
- app/schemas.py: add Pydantic v2 request/response models with SecretStr for transient Zoom client_secret - app/db.py: add SQLite WAL persistence for payment_pending and confirmed appointments without storing credentials - app/zoom.py: add Zoom Server-to-Server OAuth token, slot conflict check, meeting creation, and cleanup helpers - app/__init__.py: wire Flask app factory, ProxyFix, Flask-Limiter brute-force rate limits, and idempotent pay endpoint - app/templates/index.html & static/style.css: build 3-screen smooth-scroll presentation UI matching mockup - Dockerfile, pyproject.toml, tests/test_app.py: package single-container Gunicorn image and 5 passing pytest cases
31 lines
1.2 KiB
Markdown
31 lines
1.2 KiB
Markdown
# 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 in memory (`SecretStr` in Pydantic; never persisted to SQLite or disk).
|
|
2. **Solicitar una Cita (Como cliente):** Checks Zoom upcoming meetings for conflicts (`GET /v2/users/me/meetings`), then creates a `payment_pending` appointment in SQLite and returns `session_id` + `payment_id`.
|
|
3. **Buscar Sesión:** Looks up `session_id` or `payment_id`, simulates payment confirmation, provisions the Zoom meeting (`POST /v2/users/me/meetings`), and displays session links idempotently on repeat lookups.
|
|
- **Brute-force protection:** `Flask-Limiter` per-IP rate limits (with `ProxyFix` for Traefik) and 40-bit random `ses_`/`pay_` IDs.
|
|
|
|
## Local Development
|
|
|
|
```bash
|
|
uv sync
|
|
uv run flask --app "app:create_app()" run --debug --port 8000
|
|
```
|
|
|
|
Run tests:
|
|
|
|
```bash
|
|
uv run pytest
|
|
```
|
|
|
|
## Single-Container Docker Run
|
|
|
|
```bash
|
|
docker build -t zoom-sched-poc .
|
|
docker run -p 8000:8000 -v zoom_sched_data:/app/data zoom-sched-poc
|
|
```
|