TP2A Prototype B · M5.1

Penjelajah Infrastruktur

Isolated operational sandbox topology. PostgreSQL and RPC sidecar stay internal; only the Prototype B web surface is bound to loopback.

Kembali ke Pusat Bukti Teknis

TP2A Prototype B Web/API

loopback

Next.js technical UI and sandbox REST API.

Persistence
Uses provider-selected persistence; PostgreSQL in integration mode.
Guardrail
Sandbox API requires explicit enable flag and actor identity header.

PostgreSQL

internal-only

System of record for business state, workflow, audit and transactional outbox.

Persistence
Named Docker volume tp2a_b_pgdata.
Guardrail
No host port; external payment rails remain authoritative for funds.

Migration Runner

one-shot

Applies versioned SQL migrations and optional synthetic sandbox seed.

Persistence
No runtime state.
Guardrail
ON_ERROR_STOP aborts startup when any migration fails.

PostgREST RPC Sidecar

internal-only

Internal HTTP bridge to narrow transactional PostgreSQL RPC functions.

Persistence
Stateless.
Guardrail
Only api schema RPC functions are exposed; business tables are not host-exposed.

Redis Streams

internal-only

Internal event transport for at-least-once domain event delivery.

Persistence
Append-only file on named volume tp2a_b_redisdata.
Guardrail
Redis is transport only; PostgreSQL remains source of truth and event_id is the idempotency key.

Outbox Delivery Worker

internal-only

Claims unpublished outbox events, publishes to Redis Streams, records delivery/retry/dead-letter state.

Persistence
No local business state; delivery evidence is persisted in PostgreSQL.
Guardrail
Uses SKIP LOCKED, bounded retries, dead-letter path, and never mutates business entities.

Transactional path

  1. 1.Browser / operator → loopback Prototype B web
  2. 2.Next API → policy/service layer
  3. 3.Persistence provider → internal PostgREST RPC
  4. 4.PostgreSQL RPC → business mutation + audit + outbox in one transaction
  5. 5.Outbox worker → Redis Stream using event_id as stable delivery key
  6. 6.Consumers → deduplicate by event_id and record checkpoints before side effects
  7. 7.Repeated failures → PostgreSQL dead-letter evidence + Redis DLQ signal

Status: operational sandbox design. No production credentials, live bank/PJP integration, public database port, or production authentication is enabled here.