security
- Argon2id hashing
- PyJWT, alg pinned
- cookie sessions + rotation
Prompt → deterministic DSP → downloadable WAV / Vital preset / ZIP pack. A Next.js 16 frontend and a layered FastAPI backend sit behind an nginx TLS proxy, over PostgreSQL and a disk asset store. Generation is local, offline, and reproducible — no external AI dependency.
Next.js client — Studio / Library / Packs / Presets / Settings. Session via HttpOnly cookies; mutating requests carry X-Requested-With: patchlab.
Terminates TLS · forces HTTP→HTTPS 301 · HSTS · large header buffers (16k/8×32k) · security headers · trusts X-Real-IP from itself only. Routes / → web, /v1 & /api → api.
Standalone server. Token-only styling (globals.css), typed API client mapping RFC 9457 errors to fields, SVG waveform preview, dark-default theme.
REST under /v1, health at /api/health. Runs alembic upgrade head on boot. Layered router → service → repository.
users · refresh_tokens · sounds · packs. SQLite used for tests/dev.
Generated WAV / ZIP files. Traversal-safe resolver; per-user quota; anon TTL cleanup.
Allow-list keyword → params. Untrusted text, never eval'd. INV-2
NumPy/SciPy oscillators, ADSR, filter, distortion, reverb → soundfile PCM WAV. Seeded & reproducible; caps before allocation.
N seeded takes · Vital .vital JSON · bounded-budget ZIP (zip-bomb guard).