BEATOZ Treasury - Treasury Operations Platform
Treasury Infrastructure
System Description
Solo-built treasury operations monorepo for transfer, FX, reserve, settlement, and monitoring workflows. Combines a NestJS API, Next.js admin and testbench apps, Kafka ingress/outbox handling, and single-instance deployment automation.
Technologies

PROBLEMThe Challenge
Needed treasury transfer, FX, reserve, and settlement flows to remain consistent across synchronous APIs and Kafka-driven ingress while preserving idempotency, DLQ replay, operator visibility, and deployability on a constrained single-instance environment.
SOLVEDThe Solution
Built domain modules for bank/fx/ledger/reserve/transfer/monitoring/treasury-consumers, enforced idempotency and problem-details responses at the API boundary, added Kafka consumer + DLQ replay services and settlement reconciliation schedulers, shipped admin/testbench apps, and automated single-instance AWS deployment with PM2/Nginx/Postgres setup.
Scope
Solo-built treasury operations monorepo for transfer, FX, reserve, settlement, and monitoring workflows. Combines a NestJS API, Next.js admin and testbench apps, Kafka ingress/outbox handling, and single-instance deployment automation.
Proof
No public proof artifact is registered for this project.
SYSTEM_COMPONENTS
Treasury API
Core Operations BackendTech Stack
Highlights
- →Idempotent transfer/FX/reserve APIs
- →Problem-details error contract
- →Settlement reconcile flows
Admin Web
Operations DashboardTech Stack
Highlights
- →Reserve and monitoring views
- →Transfer and settlement operations
- →OpenBanking integration screens
Testbench + Mock Services
Flow ValidationTech Stack
Highlights
- →Scenario runner UI
- →Billing/cross-border mock producers
- →Kafka smoke and DLQ replay verification
Overview
- ▶Solo-built treasury operations monorepo covering transfer, FX, reserve, settlement, and monitoring workflows.
- ▶Includes an API, operator-facing dashboards, a scenario testbench, mock producers, and deployment scripts.
Key Components
Treasury API
- ▶NestJS modules for bank, FX, ledger, reserve, transfer, monitoring, and treasury consumer ingress
- ▶Problem-details filter + idempotency interceptor with in-memory/Prisma-backed stores
- ▶Reconcile endpoints and scheduler hooks for settlement state management
Kafka Ingress & Replay
- ▶Billing/cross-border ingress handlers for transfer, reserve movement, and FX execution
- ▶DLQ publishing, replay control endpoints, replay status/recent history, and worker lock coordination
- ▶Smoke scripts for Kafka ingress, outbox transaction flow, and DLQ replay validation
Admin + Testbench
- ▶Next.js admin app for monitoring, reserve, FX, transfers, settlements, and operations views
- ▶Next.js testbench app for running scenarios, inspecting logs, and exporting flow history
- ▶Mock billing/cross-border services to validate consumer-driven workflows
Deployment & Operations
- ▶Single-instance AWS deployment script with Postgres, PM2, and Nginx wiring
- ▶Environment bootstrapping for API, admin, and testbench apps
- ▶Default bank-account seeding and profile-based deploy options for test/dev