Multi-tenant product platform
Code2Pixels API
The accounts, teams, and permissions layer that every product we build starts from, so a new project begins at the feature that makes it different, not at the login screen.
- Year
- 2022–present
- Our role
- Architecture, API design, infrastructure
- Stack
- Node.js, TypeScript, PostgreSQL, REST, Docker
The problem
Every product build re-solves the same unglamorous half. Sign-up, password reset, teams, invitations, roles, who can see what, and an audit trail for when someone asks why a record changed. It is weeks of work that is nearly identical from client to client and completely invisible in the demo.
Rebuilding it per project meant every engagement spent its first month paying for plumbing before anyone got to the part that was actually specific to that client.
How we built it
Ownership is scoped to teams rather than to individual users. That sounds like a detail until someone leaves the company: with user-owned resources you get orphaned data and a support ticket, and with team-owned resources you get nothing at all, which is the correct amount of drama.
Machine access uses its own scoped tokens, separate from human sessions. A leaked integration key can be revoked on its own without forcing a password reset on every person in the account. The two things fail independently because they were never the same mechanism.
The API is typed end to end, and the types are generated from one source rather than maintained twice. Front-end code that calls an endpoint that changed shape stops compiling, which is a much better way to find out than a support email.
Where it landed
New products start with accounts, permissions, and storage already standing, so the budget goes to what is actually specific to the client.
It backs both products below, and the core contracts have held across all three without a breaking change.
Have something similar in mind? The first call is free.
Start a project