music-streaming API in layers: routes, services and data access, with typed errors and JWT. school project; the frontend was shared work.
The API for a music-streaming platform, built at school. It covers five domains (users, admins, songs, playlists and subscriptions) with JWT authentication.
It is the only code of mine you can open and read in full, and that is why it is here. The frontend was shared work and lives in the other person's repository.
Actually separated into layers
Routes only route, controllers only translate HTTP, services hold the business logic, and a data-access layer talks to the database. Services validate before writing and throw named errors (not found, not allowed, invalid data) instead of returning a generic 500.