You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating the app, use its install URL (e.g., `https://github.com/apps/<app-name>/installations/new`) as `ORCHESTRATOR_GITHUB_APP_URL` in `ui/.env.local`. This drives the "Connect with GitHub" button.
23
+
24
+
## Creating an app via the backend wizard
25
+
26
+
- Open `http://localhost:3000/github/setup` (or the backend’s public URL) to generate a manifest and create the app in GitHub. Needed envs on backend: `HOSTNAME` set to a reachable URL, and optional `GITHUB_ORG` if you want to scope to an org.
27
+
- Once created, copy the install URL into `ORCHESTRATOR_GITHUB_APP_URL` and restart the UI.
28
+
29
+
## Troubleshooting
30
+
31
+
-**404 on connect**: `ORCHESTRATOR_GITHUB_APP_URL` not set or points to a non-existent path.
32
+
-**Callbacks fail**: UI not exposed publicly; tunnel the UI port and update callback/webhook URLs to that domain.
33
+
-**Backend rejects /api/github/link**: ensure `DIGGER_ENABLE_API_ENDPOINTS=true` and `DIGGER_INTERNAL_SECRET` matches the UI `ORCHESTRATOR_BACKEND_SECRET`.
Copy file name to clipboardExpand all lines: docs/ce/local-development/overview.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This section explains how to run the three core services locally:
6
6
7
7
-**Backend** (`backend/`, port 3000 by default) – orchestrator + REST APIs for repos/orgs/jobs.
8
8
-**Statesman** (`taco/cmd/statesman`, port 8080) – state storage API and Terraform Cloud-compatible endpoints.
9
-
-**UI** (`ui/`, port 3030) – TanStack Start frontend that talks to both services and WorkOS.
9
+
-**UI** (`ui/`, port 3030) – TanStack Start frontend that talks to both services and WorkOS. When tunneling (e.g., ngrok), expose the UI host; WorkOS and GitHub callbacks should point to the UI domain.
10
10
11
11
## Prerequisites
12
12
@@ -27,7 +27,7 @@ This section explains how to run the three core services locally:
27
27
2)**Start statesman** with internal endpoints enabled; use memory storage for quick start.
28
28
3)**Configure UI**`.env.local` with URLs + secrets + WorkOS creds; run `pnpm dev --host --port 3030`.
29
29
4)**Sync org/user** into backend and statesman (WorkOS org id and user id/email) via the provided curl snippets in each page.
30
-
5) (Optional) **GitHub App**: set `ORCHESTRATOR_GITHUB_APP_URL` to your install URL or `http://localhost:3000/github/setup` to create one via the backend.
30
+
5) (Optional) **GitHub App**: set `ORCHESTRATOR_GITHUB_APP_URL` to your install URL or `http://localhost:3000/github/setup` to create one via the backend. Use the UI domain for app callback/webhook URLs (see GitHub App settings page).
Copy file name to clipboardExpand all lines: docs/ce/local-development/ui.mdx
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
title: UI local setup
3
3
---
4
4
5
-
The UI is a TanStack Start app that authenticates via WorkOS and calls both backend and statesman.
5
+
The UI is a TanStack Start app that authenticates via WorkOS and calls both backend and statesman. It also acts as the public gateway when tunneling (e.g., ngrok): expose the UI port, and point external callbacks to the UI domain.
6
6
7
7
## Quick start
8
8
9
9
1. Copy `.env.example` to `.env.local` in `ui/` and fill the essentials:
10
10
```bash
11
11
# URLs
12
-
PUBLIC_URL=http://localhost:3030
13
-
ALLOWED_HOSTS=localhost,127.0.0.1
12
+
PUBLIC_URL=http://localhost:3030# replace host with your public tunnel when exposing UI
13
+
ALLOWED_HOSTS=localhost,127.0.0.1# include your public tunnel host here
WORKOS_REDIRECT_URI=http://localhost:3030/api/auth/callback# replace host with your public tunnel; must match WorkOS config
20
20
WORKOS_WEBHOOK_SECRET=<if using webhooks locally via tunnel>
21
21
22
22
# Backend
@@ -40,7 +40,7 @@ The UI is a TanStack Start app that authenticates via WorkOS and calls both back
40
40
pnpm install # or npm install
41
41
pnpm dev --host --port 3030
42
42
```
43
-
Open `http://localhost:3030` and sign in with a WorkOS user that belongs to at least one org.
43
+
Open `http://localhost:3030`(or your tunnel URL) and sign in with a WorkOS user that belongs to at least one org. Ensure the WorkOS redirect URI matches the public URL you configured.
44
44
3. Ensure backend + statesman were started and the same secrets are in place (see [Backend](./backend) and [Statesman](./statesman)).
45
45
4. Sync the WorkOS org/user to both services using the curl snippets on those pages (required for repos/units to load).
46
46
@@ -49,3 +49,4 @@ The UI is a TanStack Start app that authenticates via WorkOS and calls both back
49
49
-**NotFound/Forbidden listing units**: statesman org/user not synced or webhook secret mismatch.
50
50
-**404 on repos or GitHub connect**: backend missing org/user, `DIGGER_ENABLE_API_ENDPOINTS` not set, or `ORCHESTRATOR_GITHUB_APP_URL` points to a non-existent path.
51
51
-**WorkOS login succeeds but dashboard redirects to / or errors**: the signed-in user has no WorkOS org membership; add to an org and resync to services.
52
+
-**WorkOS redirect blocked**: public URL not whitelisted; add your tunnel host to `ALLOWED_HOSTS` and to the WorkOS redirect URI list.
0 commit comments