> ## Documentation Index
> Fetch the complete documentation index at: https://dev-doc.dualmindlab.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Development Setup

> Local development environment setup for all DualMind Lab repositories.

<Tip>
  For a faster start, see the [Quickstart](/quickstart) guide which covers the minimal setup. This page has the full details.
</Tip>

## Prerequisites

| Tool     | Version | Purpose               |
| -------- | ------- | --------------------- |
| .NET SDK | 8.0+    | Backend               |
| Node.js  | 18+     | Frontend, admin panel |
| Git      | 2.x     | Version control       |

## Clone repositories

```bash filename="Terminal" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
git clone https://github.com/HarshBhanushali07/DualMind_Back.git
git clone https://github.com/HarshBhanushali07/DualMind_UI.git
git clone https://github.com/HarshBhanushali07/DualMind_Admin-UI.git
```

## Backend

```bash filename="Terminal" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
cd DualMind_Back/src/DualMind.API
```

Create `.env`:

```bash filename=".env" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=eyJ...service-role-key
JWT_SECRET=your-jwt-secret
GROQ_API_KEY=gsk_...your-groq-key
```

Run:

```bash filename="Terminal" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
dotnet restore
dotnet run
```

Verify: `curl http://localhost:5079/health`

Swagger UI: `http://localhost:5079/swagger`

## Frontend

```bash filename="Terminal" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
cd DualMind_UI
npm install
```

Edit `config.js` with your Supabase credentials:

```javascript filename="config.js" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
window.DUALMIND_CONFIG.supabase.url = 'https://your-project.supabase.co';
window.DUALMIND_CONFIG.supabase.anonKey = 'your-anon-key';
```

Run: `npm run dev` — opens at `http://localhost:8000`

## Admin panel

```bash filename="Terminal" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
cd DualMind_Admin-UI
npm install
npm run dev
```

Set `BACKEND_URL` in `wrangler.toml` for local backend:

```toml filename="wrangler.toml" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
[vars]
BACKEND_URL = "http://localhost:5079"
```

## Docker (alternative)

```bash filename="Terminal" theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
cd DualMind_Back
docker-compose up
```

Backend starts on port `8080`. Set env vars in `docker-compose.yml`.

## Verify full stack

1. Backend: `curl http://localhost:5079/health` returns `{"status":"healthy"}`
2. Frontend: Open `http://localhost:8000`, login with Google
3. Chat: Send a prompt in the arena
4. Admin: Open admin dev server URL
