Prerequisites
Before you begin, ensure you have the following installed:- Go 1.25 or later
- Atlas CLI (for database migrations)
- PostgreSQL (running locally or via Docker)
- Docker (optional, for running PostgreSQL)
Quick start
-
Start PostgreSQL (if using Docker):
-
Run database migrations:
If you encounter checksum or dirty state errors, add the
--allow-dirtyflag: -
Create
backend/.envwith the essentials (adjust DB URL/ports):Optional but useful:GITHUB_APP_ID,GITHUB_APP_PEM,GITHUB_APP_WEBHOOK_SECRETif you already have an app.GITHUB_ORGif you want/github/setupto target an org.
-
Start the service (from
backend/):Default port:3000.
Make the UI happy
- The UI calls
/api/*and/github/*withAuthorization: Bearer $DIGGER_INTERNAL_SECRETandDIGGER_ORG_ID/DIGGER_USER_IDheaders. - You must upsert the WorkOS org + user the UI is authenticated as:
GitHub app integration
- For a quick install link, set
ORCHESTRATOR_GITHUB_APP_URLinui/.env.localto your app’s install URL (https://github.com/apps/<app>/installations/new). - To create a new app via the backend, open
http://localhost:3000/github/setup(requiresHOSTNAMEset to a reachable URL for callbacks).
Troubleshooting
- 404 on /api/repos: ensure
DIGGER_ENABLE_API_ENDPOINTS=trueand the org/user above are created. - 401/403: verify
Authorizationheader usesDIGGER_INTERNAL_SECRET. - GitHub connect 404: set
ORCHESTRATOR_GITHUB_APP_URLas described.
Disabling authentication for local testing
Disabling authentication for local testing
If you need to quickly test the backend without setting up authentication, you can disable it entirely by adding to your This bypasses all authentication checks, allowing you to call any endpoint without credentials.
.env:
