Skip to main content
The ouroborai web terminal is a Next.js 15 application with a chat-based interface, session management, and real-time position tracking. This guide covers deploying it to Vercel.

Prerequisites

  • A Vercel account
  • The ouroborai monorepo cloned locally
  • A running API server (see Deploy API Server)
  • A Dynamic environment ID for wallet connection

Deployment

1

Import the project on Vercel

In the Vercel dashboard, click Add New Project and import the ouroborai GitHub repository. Set the Root Directory to apps/web so Vercel detects the Next.js configuration correctly.Alternatively, use the Vercel CLI:
cd apps/web
npx vercel
2

Configure environment variables

In the Vercel project settings, navigate to Environment Variables and add:
NEXT_PUBLIC_API_URL=https://your-api.railway.app
NEXT_PUBLIC_DYNAMIC_ENV_ID=your_dynamic_environment_id
NEXT_PUBLIC_API_URL must point to your deployed API server. The web terminal calls this URL for agent prompts, portfolio data, market prices, and all other backend operations.
Both variables use the NEXT_PUBLIC_ prefix because they are accessed in client-side code (React hooks that call fetch directly from the browser).
3

Configure the framework preset

Vercel auto-detects Next.js. Confirm these build settings:
SettingValue
Framework PresetNext.js
Build Commandbun run build (or next build)
Output Directory.next
Install Commandbun install
Node.js Version20.x
4

Deploy

Push to your connected branch or trigger a deploy from the dashboard. Vercel builds the Next.js app and deploys it to its edge network.
npx vercel --prod
5

Set up a custom domain (optional)

In the Vercel project settings, navigate to Domains and add your custom domain (e.g., app.ouroborai.com).Update your DNS provider with the CNAME record Vercel provides. Once DNS propagates, Vercel provisions an SSL certificate automatically.Remember to update CORS_ORIGIN on your API server to include the new domain:
CORS_ORIGIN=https://app.ouroborai.com,https://ouroborai.com
6

Verify the deployment

Open the deployed URL in your browser. You should see the terminal interface with:
  • A chat panel in the center for agent interaction
  • A left sidebar with session tabs and activity feed
  • A right sidebar with wallet balances, positions, and market data
Try sending a prompt like “What tokens can I trade?” to verify the API connection is working.

Troubleshooting

The web app imports types inline to avoid pulling in the full @arb-agent/sdk barrel (which includes Node.js-only modules like ArbWallet). If you see type errors during build, ensure:
  • You are building from the apps/web root directory
  • The tsconfig.json in apps/web has "strict": true
  • No server-only SDK imports have leaked into client components
Run a local build to debug before deploying:
cd apps/web
bun run build
The web terminal uses Dynamic for wallet connection. If wallets fail to connect:
  • Verify NEXT_PUBLIC_DYNAMIC_ENV_ID is set correctly
  • Check that the Dynamic dashboard has Arbitrum One (chain 42161) enabled
  • Ensure your domain is allowed in the Dynamic CORS settings
The API server must include the web app’s domain in CORS_ORIGIN. The server allows these headers: Content-Type, X-PAYMENT, and Authorization. If you see CORS errors:
  • Update CORS_ORIGIN on the API server to include your Vercel URL
  • Separate multiple origins with commas (no spaces)
  • Redeploy the API server after changing the variable
This usually indicates NEXT_PUBLIC_API_URL is missing or incorrect. Open the browser developer console and check for network errors. The web app expects the API to be reachable at the configured URL.