Backend service for the Sono music platform ecosystem.
This API provides authentication, user management, audio uploads, collections (playlists, albums, compilations), announcements, and admin functionality for the Sono mobile app (Flutter) and Sono web app (Vue).
Built with FastAPI.
- Python
- FastAPI
- Pydantic
- Alembic (database migrations)
- JWT authentication
- Docker & Docker Compose
- MinIO (object storage)
-
Base URL (development):
http://localhost:8000 -
API prefix:
/api/v1 -
Authentication: Bearer access tokens
-
Interactive API docs:
- Swagger UI:
/docs - ReDoc:
/redoc
- Swagger UI:
.
├── alembic/ # Alembic migrations
├── app/ # Application source
│ ├── core/ # Core utilities and shared logic
│ ├── routers/ # FastAPI routers (endpoints)
│ ├── tasks/ # Background / async tasks
│ ├── __init__.py
│ ├── crud.py # Database CRUD operations
│ ├── database.py # Database setup and session
│ ├── dependencies.py # FastAPI dependencies
│ ├── main.py # FastAPI entrypoint
│ ├── models.py # Database models
│ └── schemas.py # Pydantic schemas
├── scripts/ # Utility scripts
├── .env.example # Environment variable template
├── .gitignore
├── Dockerfile
├── docker-compose.yml
├── alembic.ini
├── requirements.txt
├── README.md
└── API_REFERENCE.md # Full endpoint reference
The FastAPI application is defined in:
app/main.py
This file initializes the app and registers all routers.
All HTTP endpoints are defined in app/routers/.
Routers are responsible for:
- Request validation
- Authentication and dependencies
- Returning API responses
- Database configuration and session handling live in
app/database.py - Schema migrations are managed via Alembic in the
alembic/directory
Background and async tasks live in:
app/tasks/
cp .env.example .envpip install -r requirements.txtuvicorn app.main:app --reloadThe API will be available at:
http://localhost:8000
Run using Docker Compose:
docker-compose up --buildAll protected endpoints require:
Authorization: Bearer <access_token>Full endpoint documentation is available in:
➡ API_REFERENCE.md
This API is under active development.
This project is licensed under the GNU General Public License v3.0.