Architecture
Next.js 16 (App Router), React 19, Neon Postgres, Drizzle ORM. Solana web3.js plus spl-token plus wallet adapter on the client. LI.FI for cross-chain bridging. Bitrefill for gift cards. Turnkey for escrow signing.
Reliability
Claim execution is split across multiple side effects: the escrow source tx, the bridge or gift-card payment, and the fulfillment poll. The route persists evidence at every step. A reconciliation cron runs every 2 minutes and resolves in-flight rows. See the README for the state machine.
Security
The escrow private key never leaves Turnkey. Velocity caps gate every claim. A Slack-wired alert fires on cap trips, low gas, or outflow spikes. The kill switch pauses claims instantly without redeploying. Full breakdown.
API surface
Public routes: POST /api/transfers creates a transfer; POST /api/transfers/[token]/claim executes a chosen rail; GET /api/gift-cards returns the matched brand catalog by country and amount. Reserved cron routes require a bearer secret.
Source
Code, schema, migrations, and runbooks live in the GitHub repo. View on GitHub.