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

# Tech Stack

> The technical foundation under all four REM modules.

REM is built for high-concurrency, low-latency financial operations. The same stack powers the Stablecoins, Tokenisation, Compliance Engine, and Settlement Zones modules.

## Backend infrastructure

### Core runtime

* **Bun** — primary runtime, package manager, and test runner for superior performance
* **Turborepo** — orchestrates the monorepo across `/api`, `/sdk`, `/mcp`, `/db`, and `/zones`

### API framework

* **Hono** — fast, lightweight web framework used for routing and RPC
* **Zod** — exhaustive runtime validation and type inference across every endpoint

### Data layer

* **Drizzle ORM** — lightweight TypeScript ORM for schema management and type-safe queries
* **PostgreSQL** — primary relational database (managed via Supabase or Neon)
* **Redis** — job queues (BullMQ) and rate limiting (Upstash)

## Web3 and blockchain integration

| Stack              | Purpose                                                                    |
| :----------------- | :------------------------------------------------------------------------- |
| **Tempo SDK**      | Primary settlement rail; Mainnet and Zone deposits, transfers, withdrawals |
| **Solana Web3.js** | High-velocity transaction handling on Solana                               |
| **Viem**           | Type-safe interactions with EVM chains (Base, Arc, Tempo Mainnet)          |
| **Arc SDK**        | Institutional L1 with native KYC and Travel Rule support                   |
| **Circle SDK**     | USDC issuance, mint/redeem, and CPN integration                            |

## Agentic-payment protocols

REM operates as the on-ramp for emerging agentic-payment protocols so institutional balances can settle into them without bespoke integration work:

* **Visa Intelligent Commerce** and **MasterCard Agentic Payments** — card-network agent rails
* **x402** — HTTP-native machine payment protocol
* **MPP** — Machine Payment Protocol for batched agent settlement
* **MCP** — Model Context Protocol server for direct AI agent integration

## Reliability and security

### Production hardening

* **Idempotency** — CUID2-based idempotency keys on all wallet operations to prevent duplicate sends
* **Circuit breakers** — individual breakers for external dependencies (Tempo, Solana RPC, Arc, Circle) so the system fails fast and recovers gracefully
* **Rate limiting** — consistent-hash rate limiting per API key
* **Audit logging** — every sensitive operation logged with a permanent timestamp and actor ID
* **Signed webhooks** — HMAC-SHA256 on every outbound event

### Monitoring

* **Sentry** — real-time error tracking and performance monitoring
* **Pino** — structured JSON logging for deep observability

## Developer surface

| Tool                    | Purpose                                                          |
| :---------------------- | :--------------------------------------------------------------- |
| **TypeScript SDK**      | Auto-generated from the OpenAPI specification — `@rem-money/sdk` |
| **Python SDK**          | Fully typed, autocompletion                                      |
| **Go and REST**         | First-class clients for backend integration                      |
| **MCP Server**          | Model Context Protocol server for direct AI agent integration    |
| **Developer Dashboard** | Manage API keys, webhooks, and transaction logs                  |

## Where each module sits

| Module            | Primary chain            | Settlement model                      |
| :---------------- | :----------------------- | :------------------------------------ |
| Stablecoins       | Tempo, Solana, Base, Arc | Multi-chain routed                    |
| Tokenisation      | Tempo, Solana, Base, Arc | Issuance + lifecycle on chosen rail   |
| Compliance Engine | Cross-cutting            | Token- and contract-layer enforcement |
| Settlement Zones  | Tempo (private)          | Encrypted state, public-rail bridge   |

***

## Custom solutions

Off-the-shelf, the platform runs as a managed service. For institutions that need dedicated deployments or bespoke integration, REM ships custom infrastructure with you.

<CardGroup cols={2}>
  <Card title="Private deployments" icon="server">
    Single-tenant deployments inside your VPC, with dedicated keys, dedicated rate limits, and infrastructure isolation.
  </Card>

  <Card title="Bespoke SDKs" icon="code-branch">
    Custom SDKs in additional languages or wrapped into your internal developer platform — branded, scoped, and pre-integrated.
  </Card>

  <Card title="Core banking integration" icon="building-columns">
    Adapters into legacy core banking, ledger, treasury, and ERP systems — including reconciliation pipelines and accounting feeds.
  </Card>

  <Card title="Custom observability" icon="chart-mixed">
    Forwarders into your existing observability stack (Datadog, Splunk, Grafana), dashboards, and on-call runbooks.
  </Card>
</CardGroup>

<Card title="Talk to engineering" icon="envelope" href="mailto:hi@rem.money" horizontal>
  Share your stack and your constraints. We'll scope a custom infrastructure engagement.
</Card>
