Back to all articles
The Shared PlatformPart 01
Platform strategySystem designEvent-driven architectureMulti-product platforms

The Shared Platform, Part 1: One Platform, Many Products

Janahan Thavendran4 min read

TL;DR

  • Put something in the shared core only when every product needs it, it changes slowly and getting it wrong is expensive: identity, billing and entitlements, the API gateway and event bus, and security.
  • Fast-moving work, segment-specific rules and enterprise customisation stay in the product; extract a feature into the core once three products need it.
  • Never let products share a database. Products publish events such as OrderPlaced, and logging and monitoring come before more events.
In this article

The Shared Platform, Part 1 of 7 · What belongs in the shared core, and what stays with the product.

Early on, a single service failure on a platform I worked on took everything down with it. Kiosk, tablet, mobile and web ordering all stopped together, for merchants across APAC.

Nothing about the failure itself was unusual. The platform had started as a monolith, which is the right way to start. But over the years every product had reached into the same code and the same database. Ordering, payments, menus and partner logic all lived in one place, so when one part fell over, the rest followed.

Fixing that forced the question every platform team meets sooner or later: what belongs in the shared core, and what should stay with the product?

Too much core, or too little

Get it wrong in one direction and the core becomes a bottleneck. Every product team waits on the platform team, and a change to one product's checkout needs sign-off from people who have never met that product's customers.

Get it wrong in the other direction and every team rebuilds the same things. Five login flows, three ways to check what a customer has paid for, audit logs that disagree with each other. Customers feel the seams as soon as they use two of your products.

What goes in the core

My test is simple. Something belongs in the core when every product needs it, it changes slowly, and getting it wrong is expensive for the whole business. That leaves a short list:

  • Identity and access. Login, SSO and roles. A customer should be the same person in every product.
  • Billing and entitlements. One answer to "what has this customer paid for?"
  • How products talk to each other. The API gateway and the event bus.
  • Security and compliance. Audit trails, data residency, encryption.

When we broke up the monolith, we drew the line as a core business logic layer with product layers on top. The core held the rules every channel shared. The products held what made a kiosk different from a mobile app.

What stays with the product

If something moves fast, serves one segment, or is a reason customers pick you, it stays in the product. That covers most UI, most workflows and most niche business rules.

Enterprise customisation belongs here too. The moment one large client's special rule lands in the core, every other product inherits it, tests around it and works around it. That's how a platform turns into spaghetti, one reasonable request at a time.

Wait for the third product

I don't move a feature into the core until three products need it. When the first product needs it, that team builds it. When a second team needs something similar, we watch how the two versions differ. When a third arrives, we know enough about the real shape of the problem to extract it once, properly.

Build the shared version after one product and you abstract around one team's assumptions. Every product after that pays to work around them.

There is one exception. Identity, billing and security go in the core from day one. Rebuilding those later costs far more than doing them early.

Don't share the database

The most expensive mistake I've seen is products sharing tables. Once two products read and write the same rows, neither can change its schema, scale on its own or be customised without checking the other. The database becomes the real integration layer, and nobody owns it.

Shared state is also where the hardest bugs live. On that platform we dealt with concurrent orders, double payments and replication lag on read replicas. None of those get easier when more products share the same tables.

The alternative is for products to talk through events. A product publishes what happened, such as OrderPlaced or UserCreated, and any product that cares subscribes. We used Pub/Sub to send click events to analytics, and queues to send orders to partners. Some of those partners couldn't accept concurrent orders, and the queue absorbed that without the ordering product needing to know.

Events aren't free. Our consumers failed in ways a direct call never would, so logging and monitoring had to come before more events, not after.

What the core is really for

The core isn't where you put shared code. It's where you put the promises every product depends on: this user is who they say they are, this customer has paid for this, and this event will arrive.

Keep those promises few and dependable. Everything else belongs to the team that owns the customer problem.