Environment Variables
Complete reference for all environment variables required to run RYO Arena.
Copy .env.example to .env.local and populate all required variables before running npm run dev.
Auth — Clerk
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | ✅ | Publishable key from the Clerk dashboard |
CLERK_SECRET_KEY | ✅ | Secret key from the Clerk dashboard |
NEXT_PUBLIC_CLERK_SIGN_IN_URL | ✅ | Set to /sign-in |
NEXT_PUBLIC_CLERK_SIGN_UP_URL | ✅ | Set to /sign-up |
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL | ✅ | Set to /arena |
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL | ✅ | Set to /arena |
Get your keys at clerk.com → your application → API Keys.
Database
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | ✅ | PostgreSQL connection string |
A Neon free-tier database works well. Format: postgresql://user:password@host/dbname?sslmode=require
After setting this, run:
npx prisma migrate devRyo MCP API
| Variable | Required | Description |
|---|---|---|
RYO_API_URL | ✅ | Base URL for the Ryo MCP API (default: https://app-ryochan.com/api/mcp) |
RYO_API_KEY | ✅ | Bearer token for authenticating MCP tool calls |
All six personas use the Ryo MCP API to fetch market data. Without this, no debates can run.
LLM (MixRoute)
| Variable | Required | Description |
|---|---|---|
MIXROUTE_API_KEY | ✅ | API key for the MixRoute proxy (gpt-4o-mini) |
Used by src/lib/llm.ts → askPersona(). MixRoute proxies OpenAI-compatible requests.
Web Search (Tavily)
| Variable | Required | Description |
|---|---|---|
TAVILY_API_KEY | ✅ | Tavily search API key |
Used by the Narrative persona via webSearch() in src/server/mcp/tools.ts. Get a key at tavily.com.
Email (Nodemailer)
| Variable | Required | Description |
|---|---|---|
GMAIL_USER | ⚠️ | Gmail address used as the sender for alert emails |
GMAIL_APP_PASSWORD | ⚠️ | App-specific password (not your main Gmail password) |
⚠️ Required only for email notification alerts.
To generate a Gmail app password:
- Enable 2-Step Verification on your Google account
- Go to Google Account → Security → App passwords
- Create a new app password for "Mail"
Inngest
| Variable | Required | Description |
|---|---|---|
INNGEST_SIGNING_KEY | ⚠️ | Signing key for Inngest webhook verification |
⚠️ Required in production. Not needed for local development with npm run inngest.
Get from inngest.com → your app → Keys.