Overview

r10c is a marketplace platform, and the application entifix was extracted from. Its business is named from the telecom industry's TM Forum maps: eleven domains and their entities — offerings, specifications, parties, orders, payments, settlements — take their names and boundaries from ODA and SID, the same frameworks I planned Tigo's migration on.

Data is split into three planes. The control plane holds parties, access and agreements; the platform plane holds the published catalog and buyers' orders; the tenant plane holds what each vendor authors, one database per organization, reached only through the handle the session resolves. An entity carries no organization id, so no query can leak another tenant's rows by forgetting a filter.

The services are Effect programs over entifix's use cases, on MongoDB and PostgreSQL. A write goes through a transaction facade that locks in Redis and ships its event with it over RabbitMQ; multi-step flows such as the checkout are sagas declared as data, each step told what to undo. Zitadel signs users in; r10c authorizes them and mints its own tokens. It all runs on Kubernetes, with OpenTelemetry traces in Grafana, and every one of its decisions is a record below.

Patterns

  1. Named from SID

    Domains, entities and their boundaries come from TM Forum's ODA and SID, so the model speaks a language the industry already shares.

  2. Three planes, a database per tenant

    Control, platform and tenant data live apart. Tenancy is which database a request resolves to, never a filter a query could forget.

  3. The event ships with the write

    A write and the event announcing it leave together, under the client's transaction id, and a bus routes them with retries and quarantine.

  4. Sagas as data

    A multi-step flow is a declared definition, orchestrated per flow, and each compensation is told what its step undid.

  5. Authenticate there, authorize here

    Zitadel signs users in; r10c keeps its own sessions, mints its own tokens and carries the party role and entitlements in them.

  6. Conventions are checks

    A convention that is only stated gets skipped, so each one is a check: mandatory i18n, module boundaries, the slice register.

File structure

  • apps/The deployments: two Next.js frontends and the Effect-native services.
  • packages/
  • infra/
    • local/The local platform on minikube: MongoDB, PostgreSQL, Redis, RabbitMQ, Zitadel and Grafana.
  • tools/
    • slices/The register of stores and slices; the build fails when the docs drift from it.
  • docs/
    • adr/Its decision records, one per choice that shaped it.