Deployment Architecture
TypeScript Express backend on Railway, Next.js frontend dApp on Vercel, Soroban contracts on Stellar, with Supabase for audit logging and real-time agent activity tracking.
Full Deployment Topology
REAPP's infrastructure is split across four tiers: Vercel hosts the public-facing dApp and documentation, Railway hosts the Express API server and WebSocket service, Stellar hosts the Soroban contracts, and Supabase provides the off-chain audit log and mandate store. External services — the x402 facilitator, LaunchTube, and AP2 protocol — are treated as configurable dependencies with fallback options.
Express Backend Architecture
The Railway-hosted Express server exposes nine REST endpoints covering the full mandate lifecycle, payment flow, agent activity, and evaluator operations. The service layer is cleanly separated from routing — AP2ValidatorService, SorobanClient, and FacilitatorClient are injected dependencies that can be swapped for test doubles.
Environment Configuration
# Railway — Backend
STELLAR_NETWORK=testnet # testnet | mainnet
HORIZON_URL=https://horizon-testnet.stellar.org
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
MANDATE_REGISTRY_CONTRACT=C... # Deployed contract address
FACILITATOR_URL=https://facilitator.x402stellar.xyz
LAUNCHTUBE_URL=https://launchtube.xyz
AP2_SPEC_VERSION=0.1.0
SUPABASE_URL=https://xxx.supabase.co
SUPABASE_SERVICE_KEY=...
JWT_SECRET=...
PORT=3001
# Vercel — Frontend
NEXT_PUBLIC_API_URL=https://api.reapprotocol.com
NEXT_PUBLIC_STELLAR_NETWORK=testnet
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=...CI/CD Pipeline
Every push to main triggers a full pipeline: TypeScript type-checking, ESLint, Vitest unit tests, Next.js production build, and Soroban cargo tests. Successful pipelines deploy simultaneously to Vercel and Railway, followed by automated smoke tests and a testnet end-to-end mandate flow.