# 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](https://git.jarianc.com/jarianc/music-web) | React web client (Vite + Tailwind) | | [music-mobile](https://git.jarianc.com/jarianc/music-mobile) | React Native mobile app (Expo) | ## Quick Start ```bash 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 ## Configuration Copy `.env.example` to `.env` and set your values: ```bash 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 files - `DATABASE_URL` — database connection string ## Project Structure - `backend/` — FastAPI backend (Python): API routes, transcoding, catalog, SharePlay - `shared/` — Canonical shared TypeScript types and API client (copied into music-web and music-mobile) - `docs/` — Implementation plan ## Tests ```bash pytest # backend test suite (90% coverage gate) ```