Music App — Server

Demo

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

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 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

pytest            # backend test suite (90% coverage gate)
Description
Self-hosted music streaming with mood radio, lofi channels, SharePlay, and internet radio — FastAPI, React web, React Native mobile.
Readme 3.3 MiB
Languages
Python 88.4%
TypeScript 11.5%
Dockerfile 0.1%