---
created: 2026-03-12
source: Growth-Engine
tags: [agent-archive, growth-engine]
---

# Control Centre — Deployment Notes

## Current State
- **Codebase:** All pages wired to Supabase with realtime
- **Build:** ✅ Passing (4.25s)
- **Commits:** 3 ahead of origin/master (cannot push without GitHub credentials)
- **Running:** App available at 127.0.0.1:3100 (dev mode)

## Supabase Schema Required
Ensure the following tables exist in your Supabase project:
- `cc_agent_snapshots` (agent_name, status, current_task, uptime_hours, session_count, memory_mb, snapshot_at)
- `cc_tasks` (id, title, description, status, priority, agent_id, project_id, assigned_to, created_at, updated_at)
- `cc_council_topics` (id, title, pinned, last_activity_at)
- `cc_council_messages` (id, topic_id, sender_id, content, mentions, pinned, created_at)
- `cc_activity_log` (id, agent_id, action, details, event_type, created_at)
- `cc_approvals` (id, agent_id, action_title, action_details, status, decided_by, decided_at, created_at)
- `cc_projects` (id, name, description, status, key_metric, created_at, updated_at)

Schema reference: `supabase-control-centre-schema.sql`

## Environment Variables
Required in `.env`:
```
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
```

## Deployment Options

### Option 1: Dev Server (Quick Test)
```bash
npm run dev
# Runs on 127.0.0.1:3100
```

### Option 2: Production Build + Static Server
```bash
npm run build
npx serve dist -p 3100
```

### Option 3: PM2 (Persistent)
```bash
npm run build
pm2 start npm --name "control-centre" -- run preview
pm2 save
```

### Option 4: Custom Node Server
```bash
npm run build
# Then configure Nginx/Caddy to serve dist/ folder
```

## Public Domain Routing
To make accessible at `cc.rateright.com.au`:

### Nginx Example:
```nginx
server {
  listen 80;
  server_name cc.rateright.com.au;
  
  location / {
    proxy_pass http://127.0.0.1:3100;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}
```

### Caddy Example:
```
cc.rateright.com.au {
  reverse_proxy 127.0.0.1:3100
}
```

## Testing Realtime
1. Open Control Centre in two browser tabs
2. Navigate to Council page in both
3. Send a message in one tab
4. Verify it appears in real-time in the other tab
5. Repeat for Activity Feed

## Troubleshooting
- **"No data showing"** → Check Supabase tables are populated, verify `.env` credentials
- **"Build fails"** → Run `npm install` to ensure dependencies are current
- **"Realtime not working"** → Verify Supabase Realtime is enabled in project settings
- **"Cannot push to GitHub"** → Expected, requires SSH key or personal access token

---
**Last Updated:** 2026-03-05
**Status:** Ready for deployment
