One Auth, One Billing, One Email: Shared Infrastructure Across a Product Portfolio
Running many products only works if the undifferentiated parts are built once. How we share auth, billing, email, and observability — and where sharing goes wrong.
By FGA Labs
The second product you build reveals a choice you did not know you were making with the first: how much of it can be reused? Auth, billing, transactional email, error tracking, analytics, admin tooling — none of it is what the customer pays for, and all of it has to exist. Building it fresh each time is how a studio turns into a collection of half-maintained snowflakes. Sharing it badly is how one bug takes down six products at once. We have done both, and the shape that finally worked is worth writing down.
Share the boring layer, not the product
The line we draw is simple: anything a customer would never notice being identical across products is shared. Login flows, subscription management, the email that says your receipt is attached, the dashboard that shows us errors — all of it comes from one place. Anything a customer experiences as the product stays entirely inside that product. This keeps each product free to be different where it matters and boringly identical everywhere else, which is exactly where a small team wants the sameness.
What lives in the shared layer
- A single auth setup and session pattern, so a login bug is fixed once and every product inherits the fix.
- One billing integration with a small set of plan shapes. A new product picks from the menu instead of inventing pricing plumbing.
- A transactional email service with shared templates and a per-product sender, so deliverability reputation is managed in one place.
- One error tracker and one metrics pipeline, tagged by product, feeding the same weekly review.
- A starter template that wires all of the above together, so day one of a new product is the product, not the scaffolding.
Where sharing went wrong
Our first attempt was a shared database and a shared codebase with a product switch inside it. It felt efficient for about two months. Then one product's migration locked a table another product depended on, a change to the billing model for one product silently altered invoices for another, and shutting down a failed product meant surgically removing it from something live. The lesson: share code and services, never share state. Each product owns its own database and its own deploy. The shared layer is a library and a set of accounts, not a monolith.
Versioning the shared layer
A shared library is only a benefit if products can adopt changes on their own schedule. We version the internal packages and let each product pin what it uses. A product in maintenance mode can sit on an old version for a year with no harm done. A product under active development takes updates weekly. The alternative — every change to the shared layer forcing every product to update immediately — recreates the monolith problem through the back door. Freedom to lag is part of the design.
What it buys us
A new product goes from empty repository to accepting payments in a day, and that day is mostly spent on the product itself. More importantly, the total surface area we have to understand stays roughly constant as the portfolio grows, because six products with the same auth and billing are one auth and billing problem, not six. That is the whole trick to running many products with few people: the parts that do not differentiate should not multiply.
Share the plumbing, isolate the state, version the library. Everything else about running a portfolio follows from getting those three right.
