Technical guide

Systems Architecture

How the pieces fit: ownership, queues, failure modes and observability.

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

All guides

← All guides

Overview

Architecture decisions are written down with the reason and the alternatives considered.

Queues decouple slow work from user-facing paths; observability shows where it stalls.

Trade-offs

Sync vs async
Async with queues absorbs spikes but needs visible status.
Consistency vs availability
Choose per workflow; money paths favour consistency.

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

Context

Systems and owners.

What we design for

  • Hidden coupling between systems
  • No single view of failures
  • Decisions nobody can explain later

Queue with dead-letter

Illustrative examplets
queue.consume("intake", async (msg) => {
  try { await process(msg.body); msg.ack(); }
  catch (e) {
    if (msg.attempts >= 5) return msg.deadLetter(String(e));
    msg.retry({ delaySeconds: 2 ** msg.attempts });
  }
});