Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apps/dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ pnpm dev

Open [http://localhost:3000](http://localhost:3000) in your browser.

## Setup & Build Process

### Path Aliases
To share code across the monorepo, the dashboard uses TypeScript path aliases. In `tsconfig.json`, the `@guildpass/*` alias is mapped to `../../packages/*`. This allows importing from monorepo packages (e.g. `@guildpass/env`, `@guildpass/metrics`) without relative paths.

### Build Order
Next.js requires workspace packages to be available during its build.
1. Upstream packages (like `@guildpass/env`) build their outputs to `dist/` first.
2. The Next.js dashboard uses `transpilePackages` in `next.config.mjs` to include the workspace packages in the build pipeline.
3. The dashboard is built to `.next/`.

### Required Environment
If you are using `DASHBOARD_STORAGE_MODE=durable`, you must provide a valid `DATABASE_URL` during build and runtime. For local development, copy the `.env.example` to `.env.local`.

---

## Available Routes
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const nextConfig = {
"@guildpass/env",
"@guildpass/integration-client",
"@guildpass/webhook-utils",
"@guildpass/metrics",
],

// ── Production optimisations ──────────────────────────────────────
Expand Down
4 changes: 1 addition & 3 deletions apps/dashboard/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
"ignoreDeprecations": "5.0",
"paths": {
"@/*": ["./*"],
"@guildpass/env": ["../../packages/env/dist/index.d.ts"],
"@guildpass/integration-client/*": ["../../packages/integration-client/*"],
"@guildpass/mock-repositories": ["../../packages/integration-client/mock/mockRepositories"]
"@guildpass/*": ["../../packages/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
Expand Down