Spaces:
Paused
Paused
|
Download docs/ARCHITECTURE.md from nathycodes/presentercoach: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/docs/ARCHITECTURE.md
- Command line
-
hf download hf://spaces/nathycodes/presentercoach/docs/ARCHITECTURE.md
-
curl -L -o ARCHITECTURE.md https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/docs/ARCHITECTURE.md
1.37 kB
Architecture
System overview
Speech-Machine runs as a Next.js web app, a FastAPI API, PostgreSQL, Redis, and an arq worker.
Browser -> Next.js web -> FastAPI API -> PostgreSQL
|
v
Redis -> arq worker -> ffmpeg/faster-whisper
|
v
local or S3 storage
Request lifecycle
- The browser records or uploads a video and creates a session through the API.
- The API validates file size and magic bytes, stores the video, and marks transcription as queued.
- The API enqueues
transcribe_recordingin Redis and returns ajob_id. - The worker extracts audio, transcribes it, stores transcript segments, recomputes score data, and marks the session complete or failed.
- The frontend polls the session and can also poll
/jobs/{job_id}for background job state.
Security boundaries
- First-run setup creates the admin account; there are no default
admin/admincredentials. - Access tokens are short-lived and stored in memory. Refresh tokens are HttpOnly cookies and are rotated on use.
- CORS is allowlisted through
CORS_ORIGINS. - Uploads are bounded by
MAX_UPLOAD_MBand validated by content signature. - Docker runs Alembic migrations before the API starts.