Skip to content

Commit 69e87a1

Browse files
committed
docs: fix stale documentation across sandbox, comms, and installer guides
- sandbox docs (README/QUICKSTART) and installer README still described the old Cohere-based code generator; code now uses MiniMax via an Anthropic-compatible SDK (ANTHROPIC_API_KEY/BASE_URL/MODEL). Also fixed a wrong service name (postgresdb3 -> timescaledb), wrong sandbox timeout (30s -> 120s), a personal local path, and a fabricated TimescaleDB docs URL. - comms-setup.md: fixed docker-compose.jitsi.yml path and the car-side client instructions, which referenced a compose profile/service that doesn't exist — the car client is actually a standalone CI-published image. - LOCAL_STACK.md described a docker-compose.local.yml that has never existed in this repo; rewrote it to use the real docker-compose.yml with explicit service selection, and corrected the TimescaleDB port, a nonexistent admin token file, and a nonexistent GRAFANA_DASHBOARDS_PATH env var. - data-downloader/README.md: pointed at a .env.example that was removed when env vars were consolidated into server/installer/.env.example. - kvaser-bridge/README.md: corrected the WS URL field description (it's the bridge's own server address, not the dashboard's). - universal-telemetry-software/README.md: documented the can_uplink and telemetry_heartbeat Redis channels added by the uplink and heartbeat liveness-probe features. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JqNzH7QyRpyXVfmvDFksiH
1 parent c52733c commit 69e87a1

8 files changed

Lines changed: 96 additions & 70 deletions

File tree

kvaser-bridge/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ python src/main.py
3333
A small window appears with:
3434
- **Channel** - select which Kvaser CAN channel to use
3535
- **Bitrate** - CAN bus bitrate (default 500k)
36-
- **WS URL** - WebSocket URL of the dashboard (default `ws://localhost:9080`)
36+
- **WS URL** - the bridge's own WebSocket server address, which the dashboard connects to (default `wss://127.0.0.1:9081`)
3737
- **Start/Stop Bridge** - toggle the connection
3838

3939
Click **Start Bridge** to begin streaming CAN frames to the dashboard.

server/docs/comms-setup.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,21 @@ Base Station RPI Car RPI
2424
### Base Station
2525

2626
```bash
27-
cd universal-telemetry-software
27+
cd universal-telemetry-software/deploy
2828
docker compose -f docker-compose.jitsi.yml up -d
2929
```
3030

3131
Access: `http://<base-ip>:8000`
3232

3333
### Car RPI
3434

35+
The car client is a standalone headless-browser image published by CI (`ghcr.io/western-formula-racing/data-acquisition/car-jitsi-client`) — it is not part of `docker-compose.jitsi.yml`.
36+
3537
```bash
3638
# Set base station IP first
37-
export JITSI_URL=http://192.168.1.1:8000
38-
39-
cd universal-telemetry-software
40-
docker compose -f docker-compose.jitsi.yml --profile car up -d car-jitsi-client
39+
docker run -d --name car-jitsi-client \
40+
-e JITSI_URL=http://192.168.1.1:8000 \
41+
ghcr.io/western-formula-racing/data-acquisition/car-jitsi-client:latest
4142
```
4243

4344
The client will:
@@ -76,7 +77,7 @@ The client will:
7677
**Car can't connect?**
7778
- Check Ubiquiti link status
7879
- Verify base station IP in `JITSI_URL`
79-
- Check `docker logs daq-car-jitsi`
80+
- Check `docker logs car-jitsi-client`
8081

8182
**No audio on car?**
8283
- Verify PulseAudio: `pactl info`

server/installer/LOCAL_STACK.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,33 @@
22

33
Minimal stack for testing without internet: TimescaleDB, Grafana, and file-uploader only.
44

5+
> There is no separate `docker-compose.local.yml` in this repo — use `docker-compose.yml` (in `server/installer/`) with an explicit service list to start only the three services below.
6+
57
## First-time setup (requires internet)
68

79
### 1. Pull pre-built images
810

911
```bash
10-
cd installer
11-
docker compose -f docker-compose.local.yml pull
12+
cd server/installer
13+
docker compose pull timescaledb grafana
1214
```
1315

14-
This fetches `timescale/timescaledb:2.17.1-pg16` and `grafana/grafana:latest` from Docker Hub.
16+
This fetches `timescale/timescaledb:latest-pg16` and `grafana/grafana` from Docker Hub.
1517
Only needs to be done once, or when you want to update to newer images.
1618

1719
### 2. Build the file-uploader image
1820

1921
```bash
20-
docker compose -f docker-compose.local.yml build file-uploader
22+
docker compose build file-uploader
2123
```
2224

2325
This compiles the local `file-uploader/` source into an image.
2426
Re-run this if you change code in `file-uploader/`.
2527

2628
### 3. Prepare required files
2729

28-
Make sure these exist in `installer/`:
30+
Make sure this exists in `server/installer/`:
2931

30-
- `timescaledb-admin-token.json` — TimescaleDB admin token file
3132
- A `.dbc` file (default: `example.dbc`, or set `DBC_FILE_PATH` in `.env`)
3233

3334
The DBC file is the fallback used when no custom DBC is uploaded via the UI.
@@ -45,14 +46,14 @@ python installer/backup-dashboards.py \
4546
--git-push
4647
```
4748

48-
Then point the local stack at that directory:
49+
Then copy (or symlink) that directory over the provisioned one before starting the stack:
4950

5051
```bash
51-
export GRAFANA_DASHBOARDS_PATH=~/daq-internal/grafana-dashboards
52-
docker compose -f docker-compose.local.yml up
52+
cp -r ~/daq-internal/grafana-dashboards/* server/installer/grafana/dashboards/
53+
docker compose -f server/installer/docker-compose.yml up timescaledb grafana file-uploader
5354
```
5455

55-
If `GRAFANA_DASHBOARDS_PATH` is not set, the stack falls back to `./grafana/dashboards` (the provisioned dashboards checked into this repo).
56+
Grafana provisions dashboards from `./grafana/dashboards` (the path baked into `docker-compose.yml`) — there is no `GRAFANA_DASHBOARDS_PATH` env var to point it elsewhere.
5657

5758
**Authentication** — the script reads from `.env` automatically:
5859
- `GRAFANA_API_TOKEN` (preferred — service account token)
@@ -70,15 +71,15 @@ crontab -e
7071
## Starting the stack (offline)
7172

7273
```bash
73-
cd installer
74-
docker compose -f docker-compose.local.yml up
74+
cd server/installer
75+
docker compose up timescaledb grafana file-uploader
7576
```
7677

77-
| Service | URL |
78-
|---------------|----------------------------|
79-
| Grafana | http://localhost:8087 |
80-
| File Uploader | http://localhost:8084 |
81-
| TimescaleDB | http://localhost:9000 |
78+
| Service | URL |
79+
|---------------|-------------------------------|
80+
| Grafana | http://localhost:8087 |
81+
| File Uploader | http://localhost:8084 |
82+
| TimescaleDB | postgresql://localhost:5432 |
8283

8384
Grafana credentials: `admin` / `password` (or `GRAFANA_ADMIN_PASSWORD` from `.env`)
8485

@@ -98,21 +99,22 @@ Grafana credentials: `admin` / `password` (or `GRAFANA_ADMIN_PASSWORD` from `.en
9899

99100
Before going offline, verify:
100101

101-
- [ ] `docker images | grep timescaledb` shows `timescale/timescaledb:2.17.1-pg16`
102+
- [ ] `docker images | grep timescaledb` shows `timescale/timescaledb:latest-pg16`
102103
- [ ] `docker images | grep grafana` shows `grafana/grafana`
103104
- [ ] `docker images | grep file-uploader` shows the local build
104-
- [ ] `timescaledb-admin-token.json` exists
105105
- [ ] A `.dbc` file is present (or you plan to upload one per-session via the UI)
106106

107107
---
108108

109109
## Grafana has no plugins offline
110110

111-
The main `docker-compose.yml` installs `grafana-clock-panel` and `grafana-simple-json-datasource`
112-
at container startup — this requires internet. The local compose omits `GF_INSTALL_PLUGINS`
113-
so Grafana starts cleanly offline with only its built-in panels.
111+
`docker-compose.yml` sets `GF_INSTALL_PLUGINS: grafana-clock-panel,grafana-simple-json-datasource`
112+
on the `grafana` service, which Grafana fetches from its plugin catalog at container startup —
113+
this requires internet. There is no offline-only compose variant that omits it, so to start Grafana
114+
fully offline, comment out `GF_INSTALL_PLUGINS` in `docker-compose.yml` before going offline (revert
115+
before going back online so plugin-dependent dashboards keep working).
114116

115-
Dashboards that use those plugins will show "panel plugin not found" errors.
117+
Dashboards that use those plugins will show "panel plugin not found" errors while it's commented out.
116118
Use built-in panel types (Time series, Stat, Table, etc.) for offline-compatible dashboards.
117119

118120
---
@@ -122,6 +124,6 @@ Use built-in panel types (Time series, Stat, Table, etc.) for offline-compatible
122124
To pull the latest versions:
123125

124126
```bash
125-
docker compose -f docker-compose.local.yml pull
126-
docker compose -f docker-compose.local.yml build file-uploader
127+
docker compose pull timescaledb grafana
128+
docker compose build file-uploader
127129
```

server/installer/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ All secrets and tokens are defined in `.env`. The defaults provided in `.env.exa
5454
| `SLACK_WEBHOOK_URL` | Incoming webhook for notifications (optional) | empty |
5555
| `SLACK_DEFAULT_CHANNEL` | Default Slack channel ID for outbound messages | `C0123456789` |
5656
| `FILE_UPLOADER_WEBHOOK_URL` | Webhook invoked after uploads complete | inherits `SLACK_WEBHOOK_URL` |
57-
| `COHERE_API_KEY` | Cohere API key for AI-powered code generation | empty |
58-
| `COHERE_MODEL` | Cohere model to use | `command-a-03-2025` |
57+
| `ANTHROPIC_API_KEY` | MiniMax API key for AI-powered code generation (Anthropic-compatible SDK) | empty |
58+
| `ANTHROPIC_BASE_URL` | MiniMax API base URL | `https://api.minimaxi.com/anthropic` |
59+
| `ANTHROPIC_MODEL` | MiniMax model to use | `MiniMax-M3` |
5960
| `MAX_RETRIES` | Maximum retries for failed code execution | `2` |
6061
| `DEFAULT_SEASON_TABLE` | Default season table for telemetry queries | `wfr26` |
6162
| `DEBUG` | Enables verbose logging for selected services | `0` |
@@ -74,7 +75,7 @@ All secrets and tokens are defined in `.env`. The defaults provided in `.env.exa
7475
| `file-uploader` | `8084` | Web UI for uploading CAN CSV archives and streaming them into TimescaleDB. |
7576
| `slackbot` | n/a | Socket-mode Slack bot for notifications and automation (optional). Integrates with code-generator for AI queries. |
7677
| `sandbox` | n/a | Custom Python execution environment for running AI-generated code and TimescaleDB queries. |
77-
| `code-generator` | `3030` (internal) | AI-powered code generation service using Cohere. Generates Python code from natural language. |
78+
| `code-generator` | `3030` (internal) | AI-powered code generation service using MiniMax. Generates Python code from natural language. |
7879
| `health-monitor` | n/a | Monitors container health and scanner status. |
7980
| `lap-detector` | `8050` | Dash-based lap analysis web application, tabled until GPS hardware is available. |
8081
| `startup-data-loader` | n/a | Seeds TimescaleDB with sample CAN frames on first boot. |
@@ -93,7 +94,7 @@ All secrets and tokens are defined in `.env`. The defaults provided in `.env.exa
9394
- **Service fails to connect to TimescaleDB** – Confirm `POSTGRES_DSN`, `POSTGRES_USER`, and `POSTGRES_PASSWORD` in `.env` are correct. Regenerate the volumes with `docker compose down -v` if you rotate credentials.
9495
- **Re-import sample data** – Run `docker compose down -v` and restart the stack to re-trigger the data loader.
9596
- **Slack services are optional** – Leave Slack variables empty or set `ENABLE_SLACK=false` to skip starting the bot during development.
96-
- **AI code generation not working** – Ensure `COHERE_API_KEY` is set in `.env`. Check logs with `docker compose logs code-generator`.
97+
- **AI code generation not working** – Ensure `ANTHROPIC_API_KEY` is set in `.env`. Check logs with `docker compose logs code-generator`.
9798
- **Sandbox execution fails** – Verify sandbox container is running with `docker ps | grep sandbox`. Check logs with `docker compose logs sandbox`.
9899

99100
## AI-Powered Code Generation
@@ -108,15 +109,15 @@ The stack includes an AI-powered code generation service that allows natural lan
108109
```
109110

110111
**Features:**
111-
- Automatic code generation from natural language using Cohere AI
112+
- Automatic code generation from natural language using MiniMax
112113
- Self-correcting retry mechanism (up to 2 retries on failure)
113114
- Secure sandboxed execution environment
114115
- Auto-generation of plots and visualizations
115116
- Direct TimescaleDB access for telemetry queries
116117

117118
**Setup:**
118-
1. Add `COHERE_API_KEY` to your `.env` file
119-
2. Optional: Configure `COHERE_MODEL` and `MAX_RETRIES`
119+
1. Add `ANTHROPIC_API_KEY` to your `.env` file
120+
2. Optional: Configure `ANTHROPIC_MODEL` and `MAX_RETRIES`
120121
3. Services start automatically with the stack
121122

122123
See `sandbox/README.md` for detailed documentation.

server/installer/data-downloader/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@ Both JSON files are shared through the `./data` directory so every service (fron
1010

1111
## Getting started
1212

13-
1. Duplicate the sample env file and fill in the TimescaleDB credentials:
13+
1. This stack's `docker-compose.yml` reads `env_file: .env`, but there is no `.env.example` in this
14+
directory anymore — the sample vars now live in `server/installer/.env.example`. Create `.env` here
15+
with at least `POSTGRES_DSN` and `DEFAULT_SEASON_TABLE` (copy the matching lines from
16+
`server/installer/.env.example`, or write your own):
1417
```bash
15-
cp .env.example .env
18+
cat > .env <<'EOF'
19+
POSTGRES_DSN=postgresql://wfr:wfr_password@timescaledb:5432/wfr
20+
DEFAULT_SEASON_TABLE=wfr26
21+
SCAN_INTERVAL_SECONDS=3600
22+
VITE_API_BASE_URL=http://localhost:8000
23+
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
24+
EOF
1625
```
1726
2. Build + launch everything:
1827
```bash

server/installer/sandbox/QUICKSTART.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This guide helps you set up and test the AI-powered code generation feature for
55
## Prerequisites
66

77
- Docker and Docker Compose installed
8-
- Cohere API key (get one at https://cohere.com)
8+
- MiniMax API key (get one at https://www.minimaxi.com), used via an Anthropic-compatible SDK
99
- TimescaleDB with telemetry data (or use the sample data)
1010

1111
## Setup Steps
@@ -22,8 +22,9 @@ SLACK_APP_TOKEN=xapp-your-token
2222
SLACK_DEFAULT_CHANNEL=C0123456789
2323

2424
# AI Code Generation (required)
25-
COHERE_API_KEY=your-cohere-api-key-here
26-
COHERE_MODEL=command-r-plus
25+
ANTHROPIC_API_KEY=your-minimax-api-key-here
26+
ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic
27+
ANTHROPIC_MODEL=MiniMax-M3
2728
MAX_RETRIES=2
2829
DEFAULT_SEASON_TABLE=telemetry
2930
```
@@ -47,7 +48,7 @@ From the `installer/` directory:
4748
docker compose up -d
4849

4950
# Or start only the AI/sandbox services for testing
50-
docker compose up -d postgresdb3 sandbox code-generator
51+
docker compose up -d timescaledb sandbox code-generator
5152
```
5253

5354
### 3. Verify Services are Running
@@ -127,7 +128,7 @@ Once you have telemetry data in TimescaleDB, try these prompts:
127128
2. **Code Generator**:
128129
- Receives prompt
129130
- Loads system prompt with TimescaleDB connection details
130-
- Calls Cohere AI to generate Python code
131+
- Calls MiniMax AI to generate Python code
131132
3. **Custom Sandbox**:
132133
- Receives generated code
133134
- Executes in isolated Python subprocess
@@ -138,7 +139,7 @@ Once you have telemetry data in TimescaleDB, try these prompts:
138139
- Slackbot uploads images to Slack
139140
5. **On Failure**:
140141
- Error message appended to original prompt
141-
- Cohere generates corrected code
142+
- MiniMax generates corrected code
142143
- Retries up to MAX_RETRIES times
143144

144145
## Monitoring and Debugging
@@ -161,8 +162,8 @@ docker compose exec code-generator cat generated_sandbox_code.py
161162

162163
### Common Issues
163164

164-
**"COHERE_API_KEY not found"**
165-
- Make sure `.env` has `COHERE_API_KEY=your-key`
165+
**"ANTHROPIC_API_KEY not found"**
166+
- Make sure `.env` has `ANTHROPIC_API_KEY=your-key`
166167
- Restart services: `docker compose up -d --force-recreate code-generator`
167168

168169
**"Connection refused to sandbox"**
@@ -194,7 +195,7 @@ docker compose exec code-generator cat generated_sandbox_code.py
194195
195196
┌───────────────────────┐
196197
│ Code Generator │
197-
│ (Cohere AI) │ ← System Prompt + User Prompt
198+
│ (MiniMax AI) │ ← System Prompt + User Prompt
198199
└──────────┬────────────┘
199200
│ Generated Python Code
200201
@@ -225,17 +226,17 @@ docker compose exec code-generator cat generated_sandbox_code.py
225226

226227
- Code executes in isolated Python subprocess with configurable timeout
227228
- **Has internet access** for TimescaleDB queries via `slicks` and API calls
228-
- Maximum runtime: 30 seconds (configurable via SANDBOX_TIMEOUT)
229+
- Maximum runtime: 120 seconds (configurable via SANDBOX_TIMEOUT)
229230
- Maximum file size: 5 MB per file (configurable via SANDBOX_MAX_FILE_MB)
230231
- Maximum files: 10 files (configurable via SANDBOX_MAX_FILES)
231232
- TimescaleDB credentials passed via environment only (consumed by `slicks` automatically)
232233
- Generated code is logged for audit purposes
233234

234235
## Resources
235236

236-
- Cohere Documentation: https://docs.cohere.com
237-
- Custom Sandbox Source: /Users/hz/GitHub/sandbox
238-
- TimescaleDB Docs: https://docs.postgresdata.com/postgresdb/
237+
- MiniMax API: https://api.minimaxi.com/anthropic
238+
- Custom Sandbox Source: server/installer/sandbox/
239+
- TimescaleDB Docs: https://docs.timescale.com/
239240
- Slack API: https://api.slack.com
240241

241242
## Support

0 commit comments

Comments
 (0)