Carve web client, mobile app, and e2e specs out into dedicated repositories. This repo keeps the FastAPI backend, shared types, and docs. Compose trimmed to the backend service.
1.6 KiB
1.6 KiB
Music App — Server
FastAPI backend for a self-hosted music streaming application: mood radio, lofi channels, SharePlay, and internet radio. Handles ffmpeg transcoding (OGG conversion), metadata extraction, Genius lyrics, and a SQLite catalog.
This is the server of the Music App project. The front ends live in companion repositories:
| Repo | What it is |
|---|---|
| music-web | React web client (Vite + Tailwind) |
| music-mobile | React Native mobile app (Expo) |
Quick Start
docker-compose up --build
API on http://localhost:8000, OpenAPI docs at /docs.
System Dependencies
- ffmpeg — required for audio transcoding (OGG conversion) and metadata extraction
- Debian/Ubuntu:
sudo apt-get install ffmpeg - macOS:
brew install ffmpeg - Windows: download from https://ffmpeg.org/download.html
- Debian/Ubuntu:
Configuration
Copy .env.example to .env and set your values:
cp .env.example .env
Key settings:
API_KEY— API key for authentication (required in production)GENIUS_API_KEY— Genius.com API key for lyrics (get at https://genius.com/api)MUSIC_DIR— path to local music filesDATABASE_URL— database connection string
Project Structure
backend/— FastAPI backend (Python): API routes, transcoding, catalog, SharePlayshared/— Canonical shared TypeScript types and API client (copied into music-web and music-mobile)docs/— Implementation plan
Tests
pytest # backend test suite (90% coverage gate)