|
1 | 1 | --- |
2 | | -name: dev-surface |
3 | | -description: Use when working in Coop and needing to start, reuse, open, inspect, validate, or clean up this repo's local development surfaces through the shared dev-surfaces workbench. |
| 2 | +name: coop-dev-surface |
| 3 | +description: Use when working in Coop and needing the local app, receiver PWA, docs, API/signaling server, or extension watcher. |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # Coop Dev Surface |
7 | 7 |
|
8 | | -Use the global workbench CLI instead of starting duplicate servers manually: |
| 8 | +Inside this repo, use the repo-native command: |
9 | 9 |
|
10 | 10 | ```sh |
11 | | -dev-surfaces status |
12 | | -dev-surfaces up coop |
13 | | -dev-surfaces open coop |
14 | | -dev-surfaces logs coop:<surface> |
15 | | -dev-surfaces down coop |
| 11 | +bun install |
| 12 | +# configure repo env if needed |
| 13 | +bun run dev |
16 | 14 | ``` |
17 | 15 |
|
18 | | -Stable fallback path: `/Users/afo/Code/dev-surfaces/bin/dev-surfaces.js`. |
| 16 | +`bun run dev` runs `scripts/dev.ts`. It starts the app, API/signaling server, docs, extension watcher, optional Cloudflare tunnel, and a dev browser profile when available. It writes runtime state to `packages/app/public/__coop_dev__/state.json`, streams logs, and cleans up child processes on Ctrl-C. |
19 | 17 |
|
20 | | -## Surfaces |
| 18 | +Expected ports: |
21 | 19 |
|
22 | | -- `app`: app / receiver PWA on `3101` |
23 | | -- `docs`: docs on `3102` |
24 | | -- `api`: API / signaling on `3103` |
25 | | -- `extension`: extension dev server, if bound on `3104` |
| 20 | +- `3101`: app / receiver PWA |
| 21 | +- `3102`: docs |
| 22 | +- `3103`: API / signaling |
| 23 | +- `3104`: extension dev server, when bound |
26 | 24 |
|
27 | | -## Validation Notes |
| 25 | +Useful native commands: |
28 | 26 |
|
29 | | -- Default real-browser proof should use Brave or another Chromium-family browser on this machine. |
30 | | -- Keep receiver PWA and signaling URLs aligned when launching the extension surface. |
31 | | -- `app` depends on `api`, and `extension` depends on both, so the workbench brings signaling up before UI review surfaces that need it. |
32 | | -- Docs require Node 20+; the repo scripts prepend `mise where node@22` before running Docusaurus so agent shells do not fall back to system Node 18. |
33 | | -- After changing local port docs or dev scripts, run `dev-surfaces doctor`. |
| 27 | +```sh |
| 28 | +bun run dev |
| 29 | +bun run dev:stop |
| 30 | +bun run dev:app |
| 31 | +bun run dev:api |
| 32 | +bun run dev:docs |
| 33 | +bun run dev:extension |
| 34 | +``` |
| 35 | + |
| 36 | +For cross-repo orchestration from anywhere, use the global workbench: |
| 37 | + |
| 38 | +```sh |
| 39 | +dev launch coop |
| 40 | +dev launch coop:app |
| 41 | +dev status coop |
| 42 | +dev health coop |
| 43 | +dev stop coop |
| 44 | +``` |
34 | 45 |
|
35 | | -Never kill unknown port occupants. If a port is busy and not owned by dev-surfaces, report the PID/command and ask for direction. |
| 46 | +Do not call `.dev-surfaces/run.mjs`; this repo should not have that wrapper. |
0 commit comments