> ## Documentation Index
> Fetch the complete documentation index at: https://arc-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture Decision Records: How Arc Was Designed

> Numbered records capturing every significant design choice: the context that forced it, the consequences accepted, and the alternatives that were rejected.

<span className="arc-eyebrow">Decisions · ADRs</span>

An architecture decision record captures a choice **at the moment it was made**, with the context that made it reasonable and the alternatives that were rejected. Read later, an ADR answers the question every codebase eventually raises: *why on earth is it like this?*

The value is in the parts that are uncomfortable to write. A record listing only the benefits is marketing. Each of these states what the decision costs.

***

## Accepted

<CardGroup cols={2}>
  <Card title="0001 · Money as integer minor units" icon="calculator" href="/decisions/0001-money-as-integer-minor-units">
    Every monetary value is a bigint count of minor units. No floats in monetary APIs, enforced by ESLint rather than convention.
  </Card>

  <Card title="0002 · Modular monolith over microservices" icon="cubes" href="/decisions/0002-modular-monolith">
    One deployable, six bounded contexts, and a boundary that fails the build rather than eroding.
  </Card>

  <Card title="0003 · Chain-agnostic driver" icon="link" href="/decisions/0003-chain-abstraction">
    Settlement talks to an interface, not a chain SDK, with a seeded simulator so reorgs and stuck transactions are testable.
  </Card>

  <Card title="0004 · Saga over two-phase commit" icon="diagram-project" href="/decisions/0004-saga-over-two-phase-commit">
    Banks and blockchains do not enrol in distributed transactions, so every step carries a compensating action.
  </Card>

  <Card title="0005 · Idempotency keys" icon="rotate-right" href="/decisions/0005-idempotency-strategy">
    A retry returns the original response; the same key with a different body is a conflict, not a cache hit.
  </Card>

  <Card title="0006 · Transactional outbox" icon="inbox" href="/decisions/0006-transactional-outbox">
    Events are staged in the same transaction as the state change, so delivery is at-least-once and handlers are idempotent.
  </Card>

  <Card title="0007 · Row-level tenancy" icon="users-between-lines" href="/decisions/0007-multi-tenancy-model">
    A tenant on every record, sandbox tenants by prefix, and environment-prefixed credentials.
  </Card>

  <Card title="0008 · Double-entry, enforced by the database" icon="scale-balanced" href="/decisions/0008-double-entry-ledger">
    Balances derived from entries, entries append-only, and the balance rule enforced in Postgres as well as in code.
  </Card>
</CardGroup>

***

## The format

Every record on this site uses the same four sections, and the order is deliberate:

<Steps>
  <Step title="Context">
    The forces in play **before** the decision. What made this a question at all? An ADR whose context does not explain why the obvious answer was insufficient is not describing a decision.
  </Step>

  <Step title="Decision">
    What was chosen, stated plainly and in the present tense. One paragraph, not a design document.
  </Step>

  <Step title="Consequences">
    Both directions. What this makes easy, and what it makes hard or impossible. **The costs section is the one that earns the record its place.**
  </Step>

  <Step title="Alternatives">
    What else was considered and specifically why it was rejected. Not strawmen: the version of each alternative its advocate would recognise.
  </Step>
</Steps>

<Note>
  ADRs are **immutable once accepted**. A decision that changes gets a new record that supersedes the old one, and the old one stays in place marked as superseded.

  Editing an accepted ADR destroys the only thing it was for: the record of what was known and believed at the time. The same reasoning as the ledger's append-only entries: the record of what happened stays separate from the record of what was later thought better.
</Note>
