Kieran's opinionated (and probably slightly dumb) nix config
1# cedarlogic
2
3Browser-based circuit simulator with real-time collaboration via WebSockets.
4
5**Domain:** `cedarlogic.dunkirk.sh` · **Port:** 3100 · **Runtime:** custom
6
7## Extra options
8
9| Option | Type | Default | Description |
10|--------|------|---------|-------------|
11| `wsPort` | port | `3101` | Hocuspocus WebSocket server for document collaboration |
12| `cursorPort` | port | `3102` | Cursor relay WebSocket server for live cursors |
13| `branch` | string | `"web"` | Git branch to clone (uses `web` branch, not `main`) |
14
15## Caddy routing
16
17Cedarlogic disables the default mkService Caddy config and uses path-based routing to three backends:
18
19| Path | Backend |
20|------|---------|
21| `/ws` | `wsPort` (Hocuspocus) |
22| `/cursor-ws` | `cursorPort` (cursor relay) |
23| `/api/*`, `/auth/*` | main `port` |
24| Everything else | Static files from `dist/` |
25
26## Build step
27
28On initial scaffold, cedarlogic installs deps and builds:
29
30```
31bun install → parse-gates → bun run build (Vite)
32```
33
34Subsequent deploys handle their own build via the deploy workflow. The build has a 120s timeout to accommodate Vite compilation.