
Deployment
- Self-Hosted (Docker Compose)
- SaaS (AWS Amplify)
In self-hosted mode, the dashboard ships as a second service in your
Access the dashboard at http://localhost:3001.
docker-compose.yml alongside the MergeWatch server and Postgres.Docker Compose configuration
The dashboard service is already included in the defaultdocker-compose.yml. Here is the relevant section:docker-compose.yml
Environment variables
Add these to your.env file:| Variable | Required | Description |
|---|---|---|
GITHUB_CLIENT_ID | Yes | GitHub App’s OAuth Client ID |
GITHUB_CLIENT_SECRET | Yes | GitHub App’s OAuth Client Secret |
NEXT_PUBLIC_API_URL | Yes | URL of the MergeWatch server (use the Docker service name, e.g. http://mergewatch:3000) |
NEXTAUTH_SECRET | Yes | Random secret for NextAuth session signing. Generate with openssl rand -base64 32 |
NEXTAUTH_URL | Yes | Public URL of the dashboard, e.g. http://localhost:3001 |
Start the dashboard
The dashboard starts automatically with the rest of the stack:Upgrade
GitHub authentication

GitHub scopes requested
MergeWatch requests the minimum scopes needed:| Scope | Why |
|---|---|
read:user | Get authenticated user’s profile and username |
user:email | Display user identity in the dashboard header |
Organization support
- Org installation — when a GitHub App is installed on an org, any org member with admin rights can access the dashboard for that installation
- Access check — the dashboard calls
GET /orgs/{org}/members/{username}withrole=adminto verify the user is an org admin before showing settings controls - Multiple installations — a single user can have multiple installations (personal + multiple orgs). The dashboard shows all installations and lets them switch between them
- No separate org concept — GitHub’s own org membership model is the source of truth for access control
Session model
Sessions are stored as encrypted JWT cookies (default NextAuth behavior). No session database is needed. The JWT contains:- GitHub user ID and username
- OAuth access token (for GitHub API calls from the frontend)
- Installation IDs the user has access to
Connecting dashboard to backend
The dashboard calls your MergeWatch backend API. All API calls are authenticated using the user’s GitHub session — the backend validates the GitHub token on each request. SetNEXT_PUBLIC_API_URL to point at your MergeWatch server. For self-hosted, this is the Docker service name (e.g. http://mergewatch:3000). For SaaS, this is your API Gateway URL.
Troubleshooting
Build fails with 'Module not found'
Build fails with 'Module not found'
Run
npm ci locally and confirm the build passes before pushing. Check that package-lock.json is committed.Sign-in fails with 'Configuration' error
Sign-in fails with 'Configuration' error
The
NEXTAUTH_SECRET or NEXTAUTH_URL environment variables are missing or incorrect. Confirm NEXTAUTH_URL exactly matches your dashboard URL (no trailing slash).Blank dashboard after sign-in
Blank dashboard after sign-in
NEXT_PUBLIC_API_URL is missing or pointing to the wrong backend URL. For self-hosted, verify the MergeWatch server container is running. For SaaS, check the API Gateway URL.GitHub returns 'redirect_uri_mismatch'
GitHub returns 'redirect_uri_mismatch'
Add your dashboard URL to your GitHub App’s Callback URLs in GitHub App settings (Settings > Developer settings > GitHub Apps > your app > General > Callback URL).
User sees wrong installation data
User sees wrong installation data
Confirm the
GITHUB_APP_ID matches your deployed GitHub App. Mismatches cause installation lookups to return empty results.