Skip to content

Commit fbe2f3e

Browse files
committed
Add a local admin dashboard command with live reload
1 parent 61992af commit fbe2f3e

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎docs/guide/platform/development/local.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Start a local PostgreSQL server and make `psql` and `pg_isready` available on yo
4444

4545
```sh
4646
vp run --filter @voidcloud/api setup --admin-email dev@example.com
47-
vp run --filter @voidcloud/api dev --local --enable-containers=false --host localhost --port 8787
47+
vp run --filter @voidcloud/api dev:admin
4848
```
4949

5050
The command disables the optional build containers, so basic API and admin work
@@ -55,6 +55,8 @@ Open `http://localhost:8787/admin/`. Setup writes the API's local database conne
5555

5656
The API's development bypass lets you work on the browser admin UI without setting up OAuth. Operator CLI sessions still require administrator authentication; they do not use the browser bypass.
5757

58+
`dev:admin` watches source files and automatically reloads the browser after edits. Keep it running while working on the admin dashboard's React components and styles; no platform deployment is needed. The setup includes sample users, projects, and deployments for trying each view locally.
59+
5860
## Running the Dashboard Locally
5961

6062
The dashboard is a separate source app. After API setup, start it in another terminal:

‎platform/packages/api/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"deploy": "node ../../scripts/wrangler-deploy.ts",
1919
"deploy:github-webhook-ingress": "node ../../scripts/wrangler-deploy.ts --config wrangler.github-webhook-ingress.jsonc",
2020
"dev": "wrangler dev",
21+
"dev:admin": "wrangler dev --local --enable-containers=false --live-reload --host localhost --port 8787",
2122
"migrate": "drizzle-kit migrate",
2223
"migrate:staging": "DATABASE_URL=$STAGING_DATABASE_URL drizzle-kit migrate",
2324
"setup": "node scripts/setup-local.ts",

‎platform/packages/api/scripts/setup-local.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function showNextSteps(): void {
187187
p.note(
188188
[
189189
'From the repository root:',
190-
' 1. vp run --filter @voidcloud/api dev --local --enable-containers=false --host localhost --port 8787',
190+
' 1. vp run --filter @voidcloud/api dev:admin',
191191
' 2. Open http://localhost:8787/admin/',
192192
' 3. For the separate user dashboard: vp run --filter @voidcloud/dashboard dev',
193193
].join('\n'),

0 commit comments

Comments
 (0)