Den Local Test Instructions
Prerequisites
- Docker running (Colima, Docker Desktop, or equivalent)
- Node 20+, pnpm 10+
- Ports 3005 (den-web), 8790 (den-api), 8789 (den-worker-proxy) free
1. Start the Den stack
From the OpenWork repo root (_repos/openwork):
pnpm dev:den
This starts MySQL (via Docker), runs schema migrations, and launches three services:
- den-web on
http://localhost:3005 (Next.js frontend)
- den-api on
http://localhost:8790 (Hono API server)
- den-worker-proxy on
http://localhost:8789
Wait for den-api listening on 8788 and Ready in from den-web before proceeding.
2. Seed the demo organization
In a separate terminal, from the same repo root:
pnpm dev:den:seed-demo
This creates:
- Org: Acme Robotics (
acme-robotics-demo)
- Owner:
alex@acme.test / OpenWorkDemo123!
- 17 members, 12 teams, 3 pending invites
- 14 plugins with skills, MCPs, and config objects
- 1 marketplace with imported plugin catalog
3. Sign in via browser
- Open
http://localhost:3005
- Click "Sign in"
- Enter
alex@acme.test and OpenWorkDemo123!
- The OTP verification code is printed to the den-api terminal logs:
[auth] dev verification email payload for alex@acme.test: {"verificationCode":"832998"}
- Enter the code. You land on the dashboard.
4. Start the OpenWork desktop app pointing at local Den
In a separate terminal, from the OpenWork repo root:
VITE_DEN_BASE_URL=http://localhost:3005 pnpm dev
This starts the desktop app with the Den connection pointed at your local stack instead of https://app.openworklabs.com.
Available env vars:
VITE_DEN_BASE_URL -- Den web app URL (default: https://app.openworklabs.com)
VITE_DEN_API_BASE_URL -- Den API URL directly (optional, auto-derived from base URL)
VITE_DEN_REQUIRE_SIGNIN -- Force sign-in on launch (1/true/yes/on)
5. Common test flows
Sign-in flow
- Open the app or
http://localhost:3005
- Sign in with
alex@acme.test / OpenWorkDemo123!
- Check the den-api terminal for the OTP code
- Verify you land on the dashboard with "Acme Robotics" in the sidebar
Dashboard
- After sign-in, verify the dashboard shows org member count and pending invites
- Navigate sidebar links: Members, Skill Hubs, Plugins, Billing, Org Settings
- Verify each page loads without errors
Telemetry (if the telemetry branch is active)
- Check the dashboard home shows "OpenWork users" and "Pending invites" from real org data
- Open the enterprise preview section to see the usage insights template
- Verify
GET /api/den/v1/telemetry/adoption returns real data:curl -s http://localhost:3005/api/den/v1/telemetry/adoption -H "Cookie: <session-cookie>" | jq
Chrome MCP verification
When verifying UI flows with Chrome MCP:
- Navigate to the page under test
- Use
chrome-devtools_take_snapshot to inspect the accessibility tree
- Use
chrome-devtools_take_screenshot to capture visual evidence
- Check
chrome-devtools_list_console_messages for errors
- Check
chrome-devtools_list_network_requests for failed API calls
6. Teardown
Stop the dev stack with Ctrl+C in the terminal running pnpm dev:den.
To stop MySQL and clean up Docker:
pnpm dev:den:mysql:down
Common Gotchas
- Port in use: If port 3005/8790/8789 is already taken, the dev script will error. Kill the existing process or use env overrides:
DEN_WEB_PORT, DEN_API_PORT, DEN_WORKER_PROXY_PORT.
- Docker not running:
pnpm dev:den needs Docker for MySQL. Start Colima (colima start) or Docker Desktop first.
- OTP not showing: The verification code only prints in dev mode (
OPENWORK_DEV_MODE=1). The dev script sets this automatically.
- Stale session: If sign-in stops working, clear cookies for
localhost:3005 in Chrome or use an isolated browser context.
1---2name: den-test-instructions3description: Boot up the Den dev stack and the OpenWork desktop app locally, then test common flows like sign-in, dashboard, and telemetry. Triggers when user mentions: - "test den" - "test the app locally" - "boot up den" - "den dev flow" - "test sign in"4---56# Den Local Test Instructions78## Prerequisites910- Docker running (Colima, Docker Desktop, or equivalent)11- Node 20+, pnpm 10+12- Ports 3005 (den-web), 8790 (den-api), 8789 (den-worker-proxy) free1314## 1. Start the Den stack1516From the OpenWork repo root (`_repos/openwork`):1718```bash19pnpm dev:den20```2122This starts MySQL (via Docker), runs schema migrations, and launches three services:23- **den-web** on `http://localhost:3005` (Next.js frontend)24- **den-api** on `http://localhost:8790` (Hono API server)25- **den-worker-proxy** on `http://localhost:8789`2627Wait for `den-api listening on 8788` and `Ready in` from den-web before proceeding.2829## 2. Seed the demo organization3031In a separate terminal, from the same repo root:3233```bash34pnpm dev:den:seed-demo35```3637This creates:38- **Org:** Acme Robotics (`acme-robotics-demo`)39- **Owner:** `alex@acme.test` / `OpenWorkDemo123!`40- **17 members**, 12 teams, 3 pending invites41- **14 plugins** with skills, MCPs, and config objects42- **1 marketplace** with imported plugin catalog4344## 3. Sign in via browser45461. Open `http://localhost:3005`472. Click "Sign in"483. Enter `alex@acme.test` and `OpenWorkDemo123!`494. The OTP verification code is printed to the den-api terminal logs:50 ```51 [auth] dev verification email payload for alex@acme.test: {"verificationCode":"832998"}52 ```535. Enter the code. You land on the dashboard.5455## 4. Start the OpenWork desktop app pointing at local Den5657In a separate terminal, from the OpenWork repo root:5859```bash60VITE_DEN_BASE_URL=http://localhost:3005 pnpm dev61```6263This starts the desktop app with the Den connection pointed at your local stack instead of `https://app.openworklabs.com`.6465Available env vars:66- `VITE_DEN_BASE_URL` -- Den web app URL (default: `https://app.openworklabs.com`)67- `VITE_DEN_API_BASE_URL` -- Den API URL directly (optional, auto-derived from base URL)68- `VITE_DEN_REQUIRE_SIGNIN` -- Force sign-in on launch (`1`/`true`/`yes`/`on`)6970## 5. Common test flows7172### Sign-in flow731. Open the app or `http://localhost:3005`742. Sign in with `alex@acme.test` / `OpenWorkDemo123!`753. Check the den-api terminal for the OTP code764. Verify you land on the dashboard with "Acme Robotics" in the sidebar7778### Dashboard791. After sign-in, verify the dashboard shows org member count and pending invites802. Navigate sidebar links: Members, Skill Hubs, Plugins, Billing, Org Settings813. Verify each page loads without errors8283### Telemetry (if the telemetry branch is active)841. Check the dashboard home shows "OpenWork users" and "Pending invites" from real org data852. Open the enterprise preview section to see the usage insights template863. Verify `GET /api/den/v1/telemetry/adoption` returns real data:87 ```bash88 curl -s http://localhost:3005/api/den/v1/telemetry/adoption -H "Cookie: <session-cookie>" | jq89 ```9091### Chrome MCP verification92When verifying UI flows with Chrome MCP:931. Navigate to the page under test942. Use `chrome-devtools_take_snapshot` to inspect the accessibility tree953. Use `chrome-devtools_take_screenshot` to capture visual evidence964. Check `chrome-devtools_list_console_messages` for errors975. Check `chrome-devtools_list_network_requests` for failed API calls9899## 6. Teardown100101Stop the dev stack with `Ctrl+C` in the terminal running `pnpm dev:den`.102103To stop MySQL and clean up Docker:104```bash105pnpm dev:den:mysql:down106```107108## Common Gotchas109110- **Port in use:** If port 3005/8790/8789 is already taken, the dev script will error. Kill the existing process or use env overrides: `DEN_WEB_PORT`, `DEN_API_PORT`, `DEN_WORKER_PROXY_PORT`.111- **Docker not running:** `pnpm dev:den` needs Docker for MySQL. Start Colima (`colima start`) or Docker Desktop first.112- **OTP not showing:** The verification code only prints in dev mode (`OPENWORK_DEV_MODE=1`). The dev script sets this automatically.113- **Stale session:** If sign-in stops working, clear cookies for `localhost:3005` in Chrome or use an isolated browser context.