Inkress ADRsarchitecture decisions
Inkress commerce platform

The decisions behind how it actually works.

A living record of the architecture: card data isolation, the money ledger, tenancy, authorization, and the flows that move real money. Each decision grounded in the code, with the trade-offs it accepted.

47
decision records
28
subsystems
6
interactive prototypes
EDGE · CARD DATACORE PLATFORM · PAN-FREEDATA · VPCBuyer browsercard-elementsEdge CDECF Worker · retains nothingsealed PANcommerce-apiElixircommerce-workerOban jobscommerce-paymentscontrol planecommerce-riskPDPcommerce-web · storefront + checkoutPanTokenPostgres · MAINPostgres · JOBSObanVault · sealed tokensLedger · double-entryprojectionPowerTranz / FAC3-D Secure

Card data is quarantined at the edge; the core platform and its data stores only ever see tokens.

Interactive prototypes

Not docs. Working models.

Six load-bearing decisions rebuilt as things you can drive. Open one, or run them all on the prototypes page.

MERCHANT PAGE (SAQ A)OUR EDGE CDECONTROL PLANE (PAN-FREE)card-elementsiframe on our originWorker /tokenizedecrypts in-isolatePowerTranzPAN → PanTokenVaultsealed at restsealedtokenPAN exists only here, for the request

Card charge & the CDE

Drive a charge step by step and watch where the PAN is allowed to exist; try to tamper with the amount.

Open prototype →
ledger_transactionscapture path · floatentry writerasync workertransaction_entriesdouble-entry · decimalrunning_balanceper account+currencysourceprojection is rebuildable from source · advisory-lock per account

The money ledger

Charge, fee, payout, dispute-hold and refund; watch entries append and available balance recompute.

Open prototype →
pending1paid3confirmed → shipped4 → 7refunded11stale13cancelled / error5 / 2settleunpaid → swept hourly to stale (14d)compare-and-set{1,_}=move {0,nil}=no-op

Order-status idempotency

Fire a duplicate paid webhook and watch the compare-and-set absorb it as a no-op.

Open prototype →
▶ interactive

Fee-group calculator

Plan rates and who-pays, run through the ordered fee pipeline with the customer gross-up.

Open prototype →
▶ interactive

Discount resolver

Enter a code; the server resolves it (valid, product-scoped, expired, or invalid).

Open prototype →
any queryon a tenant tableOrg.Repo.prepare_queryglobal hookINNER JOIN merchant_recordsWHERE merchant_id = tenantskip_org_id → bypassexplicit escapeambient tenant from the auth pipeline

Tenancy query-rewriter

Watch the merchant_records join get injected, plus the skip_org_id and fail-open paths.

Open prototype →
The index

All 47 decisions

Grouped by subsystem, in the order they were recorded.