Commit graph

4 commits

Author SHA1 Message Date
3c30cbe40d feat: add Sparrow frontend scaffold (Vue 3 + Vite + TypeScript)
Stack: Vue 3 + Pinia + WaveSurfer.js + TypeScript, proxied to FastAPI on :8513

Components
- ChainSidebar: chain list, create/delete, active chain highlight
- ChainTree: spine row (committed nodes) + branch row, upload drop zone, export buttons
- NodeCard: status dot + label, duration, commit/discard actions, generating spinner
- BranchPanel: WaveSurfer waveform + branch form (prompt, duration, cfg, prompt window)
- WavePlayer: WaveSurfer.js waveform with play/pause and time display

State & SSE
- Pinia chain store: REST for tree, SSE patch for live node status updates
- useNodeSSE composable: EventSource per active chain, auto-reconnects on error
- applyStatusEvent(): merges node-status SSE events into store without full refetch

UX
- Dark theme by default, light theme via prefers-color-scheme
- CSS custom properties throughout for easy theming
- Responsive: sidebar + main split, compact at <640px

manage.sh updated: start/stop both API (:8513) and frontend (:8514) together
2026-04-17 15:35:03 -07:00
a6f60c9e07 feat: implement Sparrow backend (v0.1.0)
Full FastAPI backend for the AI music continuation editor:

Services
- chain.py: chain + node CRUD, commit/discard, recursive CTE spine query
- musicgen.py: MusicGenClient with cf-orch allocation + mock mode (CF_MUSICGEN_MOCK=1)
- stems.py: Demucs 4-stem separation subprocess wrapper + mock mode
- export.py: ffmpeg concat demuxer to stitch committed spine into WAV/MP3

API endpoints
- chains: CRUD, multipart audio upload (WAV/MP3/FLAC/OGG/M4A/AIFF)
- nodes: branch creation (202 + BackgroundTasks), commit, discard, audio stream
- gpu: cf-orch capacity status; session allocation stubbed pending cf-orch#43
- stems: Paid-tier stem separation (Demucs, gated via tiers.py)
- export: POST /{chain_id}/export → FileResponse download
- events: SSE stream (node-status events) per chain via asyncio Queue pub/sub

Infrastructure
- lifespan: reads SPARROW_DB_PATH/DATA_DIR at startup (not import time)
- events_store: subscribe/unsubscribe/broadcast pattern for SSE
- CORS: open in dev, SPARROW_CORS_ORIGINS in production
- Background generation opens its own DB connection (WAL-safe)

Tests: 30/30 passing across service units and API integration
2026-04-17 15:22:37 -07:00
c3e18e83e5 feat: db migrations and store 2026-04-16 14:11:53 -07:00
dd7f19ccec feat: scaffold sparrow project 2026-04-16 14:07:07 -07:00