Want to help? Great. Here's how we work.
- Fork the repository
- Clone your fork
- Install dependencies:
pnpm install - Copy
.env.exampleto.envand fill in values - Start Postgres and Redis (Docker or local)
- Run migrations:
pnpm db:push - Start dev server:
pnpm dev - Start workers:
pnpm workers:dev
- Check existing issues and PRs
- For significant changes, open an issue first to discuss
- Small fixes and improvements can go straight to PR
# Type checking
pnpm tsc --noEmit
# Lint
pnpm lint
# Test database queries
pnpm db:studioWrite clear commit messages:
Add review saturation monitoring
- Compute active reviewer count from PR review events
- Track saturation as ratio of pending reviews to reviewers
- Add hourly job schedule (9am-6pm weekdays)
Not:
fix stuff
- Keep PRs focused on one thing
- Include context on why, not just what
- Update docs if you changed behavior
- Add yourself to contributors if you want
src/
├── app/ # Next.js routes and pages
├── server/ # tRPC routers and database
├── workers/ # BullMQ job processors
├── jobs/ # Job definitions
├── alerts/ # Alert rules engine
├── analysis/ # AI detection heuristics
├── integrations/ # External services (Slack, etc.)
├── components/ # React components
└── lib/ # Shared utilities
- Dashboard polish (loading states, empty states)
- Better error messages
- More detection heuristics
- Documentation improvements
- Additional notification channels (Discord, Teams)
- CSV/JSON export for metrics
- Dark/light mode toggle
- Mobile-responsive dashboard
- Clerk authentication integration
- Multi-organization support
- Public API with rate limiting
- GitHub Action for CI integration
No formal style guide. ESLint catches the obvious stuff. Beyond that:
- TypeScript everywhere, obviously
- Explicit types on function signatures, let inference handle the rest
- No
anyunless you've tried everything else and written a comment explaining why - Destructure props, it's easier to read
constby default,letwhen you actually need to reassign- Early returns > nested ifs. Flat code is readable code.
Look at the existing code. Write code that looks like it belongs there. If you're unsure, ask.
We don't have automated tests yet. Yes, really. It's on the list.
Manual testing workflow:
- Run
pnpm db:seedto get fresh test data - Trigger metrics:
curl -X POST localhost:3000/api/admin/metrics/compute -H "X-Admin-Key: ..." - Check the dashboard, verify numbers make sense
- For webhooks, push to a real repo and watch worker logs
If you want to add proper tests (please do):
- Vitest for unit tests
- Playwright for E2E
- Focus on the critical paths first: webhook signature verification, metrics aggregation, alert deduplication
If you modify the schema:
- Update
src/server/db/schema.ts - Run
pnpm db:generateto create migration - Test with
pnpm db:pushon a dev database - Include migration file in PR
- Open an issue for bugs or feature requests
- Start a discussion for questions or ideas
- Tag maintainers if you're stuck on a PR
By contributing, you agree that your contributions will be licensed under the MIT License.
Thanks for helping make Sentinel better.