Non-custodial, cross-chain payment infrastructure where payers can send from any supported chain and merchants receive on their preferred chain/asset, with Stellar as the settlement hub.
Tavvio is built around atomic HTLC settlement across chains:
- Inbound: payer locks funds on source chain (EVM/Stellar/Starknet routes).
- Routing: Stellar path payment + Soroban contracts handle conversion and fee deduction.
- Outbound: funds are bridged/disbursed to merchant destination chain.
- Guarantee: either both sides complete or funds are refunded after timeout.
Core backend responsibilities (NestJS modular monolith in apps/api):
- Auth + merchants (JWT/API keys)
- Quotes (30s Redis TTL lock)
- Payments lifecycle + webhook events
- Bridge routing (CCTP, Wormhole, Layerswap)
- Relay service (HTLC event watching + secret propagation)
- Invoices, links, payouts, notifications, analytics
Smart contracts:
- Soroban contracts (
contract/soroban): HTLC, settlement, fee collector, escrow - EVM HTLC (
contract/evm/contracts/HTLCEvm.sol) - Starknet HTLC (
contract/starknet/src/htlc.cairo)
apps/api— NestJS API + Prisma schema/migrationspackages/stellar— shared Stellar clients/helperspackages/types— shared chain/payment typescontract/soroban— Rust Soroban contractscontract/evm— Solidity HTLC + Hardhat configcontract/starknet— Cairo HTLC
- Node.js 20+
- npm 10+
- Docker + Docker Compose
Optional for contract work:
- Rust toolchain (
wasm32-unknown-unknown) stellarCLI- Hardhat-compatible wallet keys/testnet RPCs
From repo root:
npm installIf API workspace deps are not installed from root in your environment:
cd apps/api
npm install
cd ../..Create .env from .env.example at repo root:
cp .env.example .envImportant local DB note:
docker-compose.ymlmaps Postgres to host port 5434 (5434:5432)- so set
DATABASE_URLto:
DATABASE_URL="postgresql://tavvio:password@localhost:5434/tavvio"Set at least these for local API startup:
DATABASE_URLREDIS_URL=redis://localhost:6379JWT_SECRETAPI_KEY_SALT
docker compose up -d
docker compose psFrom apps/api:
npx prisma migrate dev
npx prisma generateFrom apps/api:
npm run start:devAPI runs on http://localhost:3000 by default.
From apps/api:
npm run test
npm run test:e2e
npm run buildSoroban contracts:
cd contract/soroban
cargo testEVM contracts:
cd contract/evm
npm install
npx hardhat test- Production deployment requires contract audits, strict key management, and chain-specific bridge credentials.