Technical guide

Software Engineering

Maintainable systems built around how the operation actually runs.

On this page
  1. Overview
  2. Trade-offs
  3. Architecture
  4. Workflow
  5. Challenges
  6. Example

All guides

← All guides

Overview

We model the domain first — orders, claims, shipments, approvals — then build services whose boundaries follow those concepts.

Code is reviewed, typed and tested so the next engineer can change it safely.

Trade-offs

Modular monolith vs services
A modular monolith is cheaper to run and change early; split into services only where scaling or ownership demands it.
Build vs buy
Buy commodity capability, build the workflow that differentiates the business.

Architecture

Integration layer

Moves data between systems reliably. Every message is queued, retried on failure and deduplicated so nothing posts twice.

  • REST & webhook adapters
  • Queue with retries
  • Idempotency keys
  • Schema mapping

Illustrative diagram. For the end-to-end view, see the architecture on the Developers home.

Workflow

Model

Name the entities and states.

What we design for

  • Business rules living only in people's heads
  • Unclear ownership between modules
  • Tests that break on every refactor

Explicit state transitions

Illustrative examplets
type OrderState = "received" | "validated" | "approved" | "shipped";
const allowed: Record<OrderState, OrderState[]> = {
  received: ["validated"], validated: ["approved"],
  approved: ["shipped"], shipped: [],
};
export function transition(from: OrderState, to: OrderState) {
  if (!allowed[from].includes(to)) throw new Error(`${from} -> ${to} not allowed`);
  return to;
}