
Economic / Treasury Infrastructure
BEATOZ Treasury - Treasury Operations Platform
Solo-built treasury operations monorepo for transfer, FX, reserve, settlement, and monitoring workflows. It functioned as the financial operations domain within the same Beatoz dev-pilot rollout as CPG, clearing, CKYC, custody, and issuer-adjacent interfaces.
- Role
- Solo builder · architecture, implementation, and operational tooling
- Period
- 2026.02 - Present
- Context
- Beatoz Labs
Solo-built treasury operations monorepo for transfer, FX, reserve, settlement, and monitoring workflows. It functioned as the financial operations domain within the same Beatoz dev-pilot rollout as CPG, clearing, CKYC, custody, and issuer-adjacent interfaces.
What made the system difficult.
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. The domain also had to expose stable interfaces for upstream and downstream systems such as CPG and other compliance/operations services participating in the shared pilot.
How boundaries and flows answered it.
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, and shipped admin/testbench apps for day-2 operations. Exposed domain-interface and ingress flows that can receive requests from CPG and adjacent services, while keeping the runtime compatible with the central AWS-based dev-pilot rollout layer and single-instance deployment automation.
The path of responsibility through the system.
Treasury API
Core Operations Backend
Responsibilities
- — Idempotent transfer/FX/reserve APIs
- — Problem-details error contract
- — Settlement reconcile flows
Admin Web
Operations Dashboard
Responsibilities
- — Reserve and monitoring views
- — Transfer and settlement operations
- — OpenBanking integration screens
Testbench + Mock Services
Flow Validation
Responsibilities
- — 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.
- Served as the financial operations core for a shared Beatoz dev-pilot environment alongside CPG and other connected service domains.
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
- Domain-interface endpoints for adjacent services such as CPG and compliance-oriented integrations
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
- Runtime shape aligned with a shared central dev-pilot rollout controller
