Skip to main content

Backend Infrastructure

Rem is built for high-concurrency, low-latency financial operations using a modern TypeScript/monorepo approach.

Core Runtime

  • Bun: Used as the primary runtime, package manager, and test runner for superior performance.
  • Turborepo: Orchestrates the monorepo task caching across /api, /sdk, /mcp, and /db.

API Framework

  • Hono: A fast, lightweight web framework used for routing and RPC.
  • Zod: Used for exhaustive runtime validation and type inference across all endpoints.

Data Layer

  • Drizzle ORM: A lightweight TypeScript ORM for schema management and type-safe queries.
  • PostgreSQL: The primary relational database (managed via Supabase or Neon).
  • Redis: Used for job queues (BullMQ) and rate limiting (Upstash).

Web3 & Blockchain Integration

We leverage industry-standard SDKs to interact with multiple chains and stablecoin protocols:
  • Circle SDK: Core integration for USDC issuance and transfers.
  • Solana Web3.js: High-velocity transaction handling on Solana.
  • Viem: Type-safe interactions with EVM chains (Base, Polygon).
  • x402: Protocol middleware for machine-to-machine payments.

Reliability & Security

Production Hardening

  • Idempotency: CUID2-based idempotency keys on all wallet operations to prevent duplicate sends.
  • Circuit Breakers: Individual breakers for external dependencies (Circle, Solana RPC) to ensure the system fails fast and recovers gracefully.
  • Rate Limiting: Consistent hash-based rate limiting per API key.
  • Audit Logging: Every sensitive operation is logged with a permanent timestamp and actor ID.

Monitoring

  • Sentry: Real-time error tracking and performance monitoring.
  • Pino: Structured JSON logging for deep observability.

Development Tools

We provide standard developer tools to speed up integration:
  • TypeScript SDK: Auto-generated from our OpenAPI specification.
  • MCP Server: A Model Context Protocol server for direct AI agent integration.
  • Developer Dashboard: For managing API keys, webhooks, and monitoring transaction logs.