Skip to main content
This guide gets the API running on http://localhost:5079 and the arena on http://localhost:8000, talking to each other. Plan on about 15 minutes if you already have a Supabase project and provider credentials.
You need a Supabase project with the DualMind tables (see Supabase setup) and at least two active Groq or Google models reachable through Cloudflare AI Gateway, because random battles only use those. Cloudflare Workers AI models also need a Workers AI token, and can only be picked by name (Side by Side or Direct Chat).
1

Install the tools

2

Clone the repositories

3

Configure the API

The API reads environment variables, and loads a .env file from the working directory or any parent directory. Create DualMind_Back/.env with these names; take the values from your Supabase project and provider dashboards, or email support@dualmindlab.tech for access to the shared development project.
.env
Never commit .env. It is ignored by .gitignore; keep it that way. The full list of settings is in Local setup.
4

Run the API

Check it:
In the Development environment Swagger UI is served at http://localhost:5079/swagger.
5

Run the arena

The arena is a static site. On localhost its config.js points at http://localhost:5079 automatically. Its Supabase settings default to the production project; if your API’s .env uses a different project, set supabase.url and supabase.anonKey in a local, uncommitted copy of config.js so the arena’s tokens are issued by the same project the API validates.
Sign in with Google or email, pick Battle, and send a prompt. You should see two anonymous answers, then the model names after you vote.
6

Optional: run the admin panel

Your account needs role = 'admin' in public.users. Then follow Admin panel → Run it locally. For UI work you can skip the backend entirely and use its mock mode.

Call the API from the terminal

Production is read-only while you develop. Point writes (battles, votes, admin changes) at http://localhost:5079 and a development Supabase project. Against https://api.dualmindlab.tech, stick to GETs on public endpoints.
Once you are signed in to the local arena, copy your access token from the browser (DevTools → Application → Local Storage → the sb-…-auth-token entry → access_token) and export it:
Then try a battle:

Next steps

Architecture overview

How the services fit together.

Troubleshooting

401s, empty model lists, provider errors and other common snags.
Last modified on October 18, 2026