Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.relaycore.xyz/llms.txt

Use this file to discover all available pages before exploring further.

System Requirements

Node.js

Version 20 or higher

Package Manager

pnpm (recommended) or npm

Database

Supabase account

Wallet

Cronos Testnet with CRO and USDC

Installation Steps

1

Clone Repository

git clone https://github.com/winsznx/relaycore.git
cd relaycore
2

Install Dependencies

Using pnpm (recommended):
pnpm install
Or using npm:
npm install
3

Environment Configuration

Copy the example environment file:
cp .env.example .env
Edit .env with your credentials:
# Supabase
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# WalletConnect
VITE_WALLETCONNECT_PROJECT_ID=your-project-id

# Wallet Keys
WALLET_PRIVATE_KEY=your-private-key
RELAY_PRIVATE_KEY=your-relay-wallet-key

# Contracts
ESCROW_CONTRACT_ADDRESS=0x9D340a67ddD4Fcf5eC590b7B67e1fE8d020F7D61

# Cronos
VITE_CRONOS_RPC_URL=https://evm-t3.cronos.org
CRONOS_RPC_URL=https://evm-t3.cronos.org

# USDC Token
VITE_USDCE_CONTRACT=0x...

# x402
VITE_X402_FACILITATOR_URL=https://facilitator.cronos.org
4

Database Setup

Run migrations in order:
pnpm db:migrate
Or manually execute SQL files:
  1. supabase/migrations/001_relay_core_schema.sql
  2. supabase/migrations/002_complete_schema.sql
  3. supabase/migrations/012_escrow_sessions.sql
  4. supabase/migrations/013_rwa_settlement.sql
  5. supabase/migrations/20260119_rwa_state_machine.sql
  6. supabase/migrations/20260122_fix_schema_gaps.sql
5

Start Services

Open three terminal windows:Terminal 1 - Frontend
pnpm dev
Runs on http://localhost:5173Terminal 2 - GraphQL API
pnpm dev:graphql
Runs on http://localhost:4000Terminal 3 - Indexers
pnpm dev:indexers
Background cron jobs
6

MCP Server (Optional)

cd mcp-server
npm install
npm run build
npm run dev

Verification

Navigate to http://localhost:5173You should see the Relay Core dashboard. Connect your wallet to verify integration.

Troubleshooting

If port 5173 or 4000 is already in use:
# Kill process on port 5173
lsof -ti:5173 | xargs kill -9

# Kill process on port 4000
lsof -ti:4000 | xargs kill -9
Verify Supabase credentials in .env:
  • Check VITE_SUPABASE_URL matches your project URL
  • Verify VITE_SUPABASE_ANON_KEY is correct
  • Ensure Row Level Security policies are configured
  • Ensure you’re on Cronos Testnet (Chain ID 338)
  • Verify VITE_WALLETCONNECT_PROJECT_ID is set
  • Check browser console for errors
Clear cache and reinstall:
rm -rf node_modules pnpm-lock.yaml
pnpm install
pnpm build

Next Steps

Quick Start

Execute your first x402 payment

Environment Variables

Learn about all configuration options