> ## Documentation Index
> Fetch the complete documentation index at: https://internal.softcrum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Diagram Specs — render with the diagram-design skill (Claude Code)

> Onboard the skill once against the Softcrum site so all diagrams inherit brand tokens; export SVG for Mintlify (/diagram-design:export --svg-only). Source HTML lives in repo. One section = one diagram; type names match the skill's catalog.

## D1 · type: architecture — "Softcrum Suite — expanded context (C4-1)"

Nodes: Tenant systems (POS/ecommerce/ERP) · Softcrum Runtime API · Softcrum Management API · Console (tenant) · Softcrum Ops · Member surfaces (portal/widget/mobile) · core|loyalty|messaging|crm contexts · Outbox → 6 consumers · Providers (Resend, FCM, Pusher, Upstash, Supabase, Vercel Queues). Focal accent: Runtime API + outbox. Annotation: "Console and portal consume ONLY the public API".

## D2 · type: high-level — "Ingestion & effects — end to end"

track 202 → queue → processor (identity, events, segments, rules) → ledger → outbox → rails → providers → status webhooks → send\_status\_history. Focal: processor. Annotation: correlation\_id spans the whole line.

## D3–D6 · type: er — one per schema (core / loyalty / messaging / crm)

Entities and FKs exactly as in 30-specs tables; mark partitioned tables with sublabel "partitioned/monthly"; parametric catalogs in muted tone; accent on contacts (D3), ledger\_transactions+point\_lots (D4), sends+routing tables (D5), timeline projection note (D6).

## D7 · type: sequence — "trackEvent pipeline (canonical slice #2)"

Actors: Tenant system · Runtime API · Queue · Processor · Loyalty domain · Outbox · Notification dispatcher · Provider. Messages follow slice layers 1–6; dashed returns for 202 and provider webhooooks; note idempotency gates at Queue→Processor.

## D8 · type: sequence — "Redemption (parent/child, idempotent)"

POS → POST /redemptions (Idempotency-Key) → validation vs stacking\_rules → children applied → ledger redeem (FIFO lots) → 200 effects; alt-frame: retry with same key replays stored result; alt-frame: rollback parent revert|keep.

## D9 · type: swimlane — "Blast on dual rails"

Lanes: Console · Marketing rail · Transactional rail · Provider (shared limit) · Other tenant OTP. Show marketing worker yielding when transactional depth>threshold; token buckets at provider lane. Annotation: "Provider limits are shared across ALL tenants".

## D10 · type: flowchart — "resolveChannels cascade"

Decision chain levels 0→3 → recipient gates (consent → suppression → preferences → quiet hours/caps\[marketing]) → enqueue per channel; every 'no' exits to "not sent + reason logged".

## D11 · type: state — "send\_status lifecycle"

queued→sent→delivered→opened→clicked; branches bounced/complained/failed; bounced/complained auto-write suppressions (accent).

## D12 · type: state — "redemption lifecycle"

requested→validated→applied→(rolled\_back: revert|keep)→final; child states nested; idempotent replay self-loop on requested.

## D13 · type: timeline — "Road to G1-Engage (2026-11-01) and legal gate (2026-12-01)"

Aug: amendment+standards+ADRs · Sep: TS-001..TS-004, F1a features · Oct: F1a hardening with design partner, runbooks, Resend limit raise · Nov 1: G1-Engage · Dec 1: Ley 21.719 fully in force (legal package lawyer-approved before commercial launch, Mar 2027).
