← Back to work
BUILDINGProduct Platform

Repicode

A multi-tenant product platform - shared foundation, per-tenant configuration, and industry modules. Travel is the first working vertical.

Role & focus
Product Engineering · Frontend · Backend
Core tech stack
Next.jsTypeScriptGoPostgreSQL

abstract placeholder - real visuals ship with the product

01

The Problem

Client-facing business applications are mostly the same product wearing different clothes. A booking app for a travel agency, a patient system for a dental clinic, and a course platform for an educator share the same skeleton: accounts, tenants, admin tooling, domain records, operational views.

Building that skeleton from scratch on every project is the real cost - not the domain logic. Repicode exists to make the skeleton reusable.

02

What I Built

A modular monolith in active development: a shared product foundation - identity, tenancy, RBAC, configuration, workflow - with industry modules built on top. The travel vertical is implemented end to end; dental and LMS remain target verticals.

  • Product foundation: organizations, users, memberships, roles and permissions - RBAC resolved per membership on every request
  • Per-tenant configuration: terminology, themes, feature flags, workflows and preferences - one codebase, different product behavior per organization
  • Module enablement per organization - tenants turn industry modules on or off through the platform registry
  • Travel industry module: packages, departures, passengers, bookings, payment plans, visas and hospitality - a tenant-safe schema on the shared foundation
  • Booking lifecycle on the platform workflow engine: 11 states from inquiry to departure, idempotent booking creation, audit and outbox events on critical mutations
  • Next.js product frontend covering bookings, packages, my-trip, payments, reports and operations - built against dedicated OpenAPI contracts

03Complexity & Concurrency

4 case-specific challenges

Engineering Challenges

Challenge // 01

The abstraction level problem

Too generic and the platform does nothing; too specific and it's just one product with extra steps. The line that held: infrastructure is shared, workflow is configurable, domain logic lives in modules.

Engineering challenge
Challenge // 02

Reuse without parallel systems

The travel module only proves the platform if it builds nothing twice. It reuses the foundation's organizations, customers, catalog items, transactions, payments, documents, workflow, audit and outbox - a second auth or tenancy system would break the premise.

Engineering challenge
Challenge // 03

Config vs code

Every 'just make it configurable' decision creates a schema you now have to maintain. Tenant configuration covers terminology, themes, feature flags, workflows, preferences and enabled modules - anything deeper belongs in a module, not a config flag.

Engineering challenge
Challenge // 04

Module boundaries

Modules have to work without knowing about each other. The platform defines the contracts - tenancy, auth, data ownership - and each module implements its domain inside them.

Engineering challenge

04System Blueprint

Service boundaries / data model

Architecture & Contracts

  1. Product Foundation

    shared platform services

    IdentityOrganizationsRBACCustomersPaymentsDocumentsWorkflowAudit & Outbox
  2. Industry Modules

    implemented - dental & LMS are target verticals

    Travel
  3. Product Configuration

    terminology · themes · feature flags · preferences per tenant

  4. Client Product Instance

    a configured vertical app per tenant

system shape - simplified

05Engineering Trade-offs

Key Decisions

Deliberate choices made to preserve velocity without sacrificing correctness.

  1. 01

    Industry modules inside a modular monolith

    Travel is the first real module, and it had to prove the foundation can carry a vertical without parallel infrastructure - no separate app, microservice, or second auth/tenancy/payment/workflow system. It reuses all of them.

  2. 02

    Tenant safety as a database constraint

    Every table carries organization_id, and cross-tenant relationships use composite foreign keys - (organization_id, id) - so referential integrity is tenant-safe by constraint, not by application-code convention.

  3. 03

    Booking lifecycle on the shared workflow engine

    Booking states from inquiry to departure are seeded as a global workflow definition all tenants share. The module gets lifecycle management and guarded transitions without building its own engine.

  4. 04

    Idempotent, auditable mutations

    Booking creation accepts an Idempotency-Key for safe retries, and critical mutations run transactionally with audit, activity and outbox events - retryable and observable by default.

  5. 05

    Contract-first APIs

    Each surface ships a dedicated OpenAPI spec - the travel spec alone covers packages, departures, bookings, payments, visas and operational endpoints. The frontend builds against the contract, not against assumptions.

06Surface Breakdown

Product Surface

Surface / 01REPICODE

Platform foundation

  • Organizations, memberships & RBAC
  • Tenant configuration & module enablement
  • Shared workflow, audit & outbox

Product surface / Repicode

Surface / 02REPICODE

Travel vertical - implemented

  • Packages & departures
  • Booking lifecycle & passengers
  • Payment plans, visas & hospitality
  • Frontend: bookings, packages, my-trip, payments, reports

Product surface / Repicode

Surface / 03REPICODE

Target verticals

  • Dental - designed for, not built
  • LMS - designed for, not built
  • A vertical is modules plus tenant configuration, not a new codebase

Product surface / Repicode

07Project Status

Current State

Actively building. The foundation - organizations, RBAC, tenant configuration, workflow - and the travel module are implemented: 35 migrations, dedicated OpenAPI specs, and a booking lifecycle running end to end through the product frontend.

Travel is the first working vertical, not a launched product. Dental and LMS remain target verticals. Status: building.

Current project status

BUILDING

08Retrospective & Takeaways

What I Learned

  • A platform earns its abstractions when the first real vertical has to live inside them.
  • Tenancy in application code is a promise; composite foreign keys make it a constraint.
  • Reuse is a design problem before it's a code problem.
  • The second vertical is the real test - 'reusable' stays a hypothesis until dental or LMS builds cheaply on this foundation.

PROJECT INDEX / 09

Related work

All projects →

The next chapter starts here

Let's build something resilient together.