- Remove committed .coverage and test-results/ (196K screenshots); gitignore them - Fix hardcoded /home/userpath + venv/bin/python in test_endpoints.py (relative backend dir + sys.executable) - Fix concatenated 'import json' in settings.py; bare excepts -> Exception; SQLAlchemy-safe is_active.is_(True); __all__ on models/schemas barrels - ruff clean (93 fixes), MIT LICENSE, PLAN.md -> docs/, README Tests section - 300 tests pass, 93.7% coverage
83 lines
1.7 KiB
Markdown
83 lines
1.7 KiB
Markdown
# Music App
|
|
|
|
Self-hosted music streaming application with mood radio, lofi channels, SharePlay, and internet radio.
|
|
|
|
## Quick Start
|
|
|
|
```bash
|
|
docker-compose up --build
|
|
```
|
|
|
|
## 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)
|
|
- `web/` — React web frontend (Vite + Tailwind)
|
|
- `mobile/` — React Native mobile app (Expo)
|
|
- `shared/` — Shared TypeScript types and API client
|
|
- `e2e/` — Playwright end-to-end specs
|
|
- `docs/` — Implementation plan
|
|
|
|
## Tests
|
|
|
|
**Backend** (pytest, 90%+ coverage gate):
|
|
|
|
```bash
|
|
cd backend
|
|
pip install -r requirements.txt pytest-cov
|
|
pytest
|
|
```
|
|
|
|
300 tests covering endpoints, routers, services, schemas, and models.
|
|
|
|
**E2E** (Playwright):
|
|
|
|
```bash
|
|
npm install
|
|
npx playwright install
|
|
npm run dev:backend & # start backend on :8000
|
|
npx playwright test
|
|
```
|
|
|
|
**TypeScript** (web + mobile + shared workspaces):
|
|
|
|
```bash
|
|
npm install
|
|
npm run typecheck
|
|
npm run lint
|
|
```
|
|
|
|
## Development
|
|
|
|
npm workspaces scripts at the repo root:
|
|
|
|
```bash
|
|
npm run dev # web + backend together
|
|
npm run dev:web # Vite dev server only
|
|
npm run build:web # production web build
|
|
```
|
|
|
|
## License
|
|
|
|
MIT — see [LICENSE](LICENSE).
|