Contributing
Local Development Setup
1
Clone and install
terminal
git clone https://github.com/dinhdobathi1992/gitdash.git cd gitdash pnpm install
2
Configure environment
.env.local
MODE=standalone SESSION_SECRET=any_32_char_string_for_local_dev # DATABASE_URL is optional for standalone mode
3
Start dev server
terminal
pnpm run dev # → http://localhost:3000
4
Check your change
terminal
pnpm run lint pnpm exec tsc --noEmit pnpm run test # vitest; database tests use an in-memory Postgres (PGlite) pnpm run build
Where things live
text
src/app/ pages (one folder per route) src/app/api/ API routes: github/*, db/*, alerts, admin/*, auth/*, cron/*, webhooks/* src/proxy.ts sign-in and access checks for every request src/lib/permissions.ts route → feature registry used by the proxy src/lib/ GitHub client, caching, database, identity, AI src/components/ UI src/app/docs/ docs: one route per page; add pages in _parts/nav.ts + _parts/registry.tsx tests/ vitest suites helm/gitdash/ Helm chart
PR Guidelines
- Register every new API route in src/lib/permissions.ts — unregistered routes are denied — and give it the feature that should gate it
- Validate owner, repo and org parameters with src/lib/validation.ts before calling GitHub
- Wrap new GitHub reads in the shared cache, keyed per token
- Update this documentation and CHANGELOG.md with any user-visible change; public pages follow DESIGN.md and REVIEW.md
- Never log or return credentials; CI runs lint, type check, tests, build, CodeQL and a dependency audit