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
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:Configure environment variables
In the Vercel project settings, navigate to Environment Variables and
add:Both variables use the
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.NEXT_PUBLIC_ prefix because they are accessed in
client-side code (React hooks that call fetch directly from the browser).Configure the framework preset
Vercel auto-detects Next.js. Confirm these build settings:
| Setting | Value |
|---|---|
| Framework Preset | Next.js |
| Build Command | bun run build (or next build) |
| Output Directory | .next |
| Install Command | bun install |
| Node.js Version | 20.x |
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.
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: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
Troubleshooting
TypeScript build errors
TypeScript build errors
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/webroot directory - The
tsconfig.jsoninapps/webhas"strict": true - No server-only SDK imports have leaked into client components
Wallet connectivity issues
Wallet connectivity issues
The web terminal uses Dynamic for wallet connection. If wallets fail to
connect:
- Verify
NEXT_PUBLIC_DYNAMIC_ENV_IDis set correctly - Check that the Dynamic dashboard has Arbitrum One (chain 42161) enabled
- Ensure your domain is allowed in the Dynamic CORS settings
API requests returning CORS errors
API requests returning CORS errors
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_ORIGINon the API server to include your Vercel URL - Separate multiple origins with commas (no spaces)
- Redeploy the API server after changing the variable
Blank page after deployment
Blank page after deployment
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.