05Full-stack · PHP + React
Dwad Music
Distribution, studio and promotion for independent artists
A music platform for independent Nigerian artists — distribution, beats, studio booking, graphics and radio promotion — with a React front end and a dependency-free PHP API behind it.
An independent artist in Lagos is dealing with a distributor, a studio, a designer and a radio plugger as four separate conversations, paying each one differently and chasing every one of them for a status. The work is not hard to do; it is hard to keep track of.
- 01Public site covering distribution, beats, the studio, graphics and promotion, with artist signup.
- 02Admin back office for artists, beats, productions, spotlight placement, pricing and payouts.
- 03A PHP API with its own auth, rate limiting, mail and analytics, and a committed SQL schema.
- D-01
Plain PHP for the API, with no framework
A single front controller dispatches to controllers; data access is PDO with prepared statements only. The client's hosting is shared PHP, so the practical choice was between a framework I would be fighting for memory and a small API I fully understand. Thirteen controllers is not a size that needs a framework.
Trade-offEverything a framework gives you free — routing conventions, validation, migrations, an ORM — is hand-written and therefore mine to get wrong. In exchange it deploys anywhere PHP runs, which is the constraint that actually mattered.
- D-02
Authorisation resolves the caller, never trusts the request
Every protected route goes through a helper that resolves the user from a bearer token and checks the role server-side. No handler reads a user id or a role out of the request body. Passwords use the platform's own hashing, and the API has its own rate limiter in front of the auth routes.
Trade-offA lookup on every protected call rather than trusting a claim the client already holds. That is the correct price: a role you accept from the client is not a role, it is a suggestion.
- D-03
One HTTP client, no fetch in components
Components never call `fetch`. Everything goes through a single typed client, so the base URL, the auth header, error shape and failure handling exist once. When the API moved behind a different origin it was one change.
Trade-offAn indirection to learn before you can write a screen. It is the same reasoning that cost me a week on InnovaTeam when six copies of a payment client each failed differently — I would rather pay it up front.
- D-04
Strict TypeScript, and no untyped dependency
The front end runs with unused locals and parameters as errors, no implicit any, and a standing rule that a library without types does not get installed. The API's JSON shapes are mirrored as types, so a field renamed on the server fails the build rather than rendering blank.
Trade-offRules out some otherwise useful packages and makes the first hour of any feature slower. On a solo project, the compiler is the only other reviewer I have.
- No automated tests yet. For an API that moves payouts, that is the first thing I would add before it grows another controller.
- The schema ships as a single `schema.sql` rather than incremental migrations — fine for standing it up, not for evolving it once real data is in.