Contributing
How to contribute to Emberly — development setup, code standards, and the pull request process.
Thanks for your interest in contributing to Emberly. This guide covers the development workflow, code standards, and how to submit a pull request.
For initial setup, see the Development guide.
Workflow
1. Fork and Clone
Fork the repo on GitHub, then clone your fork:
2. Create a Branch
Branch from main using the appropriate prefix:
| Prefix | Use for |
|---|---|
feat/ | New features |
fix/ | Bug fixes |
docs/ | Documentation only |
refactor/ | Code cleanup with no behavior change |
perf/ | Performance improvements |
3. Make Changes and Commit
Commit messages must follow Conventional Commits and include a scope. A commit hook checks this.
Common types: feat, fix, docs, chore, refactor, perf, test, ci.
4. Verify Before Pushing
5. Open a Pull Request
Push to your fork and open a PR against main. Fill out the PR template:
- What does this change?
- Why is it needed?
- How was it tested?
- Are there breaking changes?
Code Standards
TypeScript
All code uses strict: true. Avoid any — use unknown and narrow it:
API Routes
API handlers live in apps/dashboard/app/api/. Use the shared response helpers rather than building NextResponse objects:
Logging
Never use console.*. Use named loggers from @/lib/logger:
Path Aliases
Inside the dashboard, @/ resolves to apps/dashboard/, e.g. @/lib/config or @/components/ui/button. The database client is imported from @emberly/db:
Common Tasks
Adding a Database Field
- Edit
packages/db/prisma/schema.prisma - Run
bun run db:migrateto create and apply the migration - Run
bun run db:generateto regenerate the Prisma client - Update any affected types in
apps/dashboard/types/
Adding a New API Endpoint
- Create the route file in
apps/dashboard/app/api/ - Use
apiResponse/apiErrorhelpers - Gate admin routes with
requireAdmin() - Document the endpoint in the relevant API reference page in
docs.embrly.ca
Pull Request Checklist
Before requesting review, ensure:
bun run typecheckpassesbun run lintpassesbun run buildsucceeds- New features have corresponding documentation updates
- Commit messages follow Conventional Commits
Reporting Issues
Create a GitHub issue with:
- A clear title describing the problem (not "it's broken")
- Steps to reproduce, including exact actions
- What you expected vs what happened
- Your environment: OS, Node version, browser if relevant
- The full error message or stack trace
Getting Help
- Questions: GitHub Discussions
- Bugs: GitHub Issues
- Chat: Join the Emberly Discord
All contributions are licensed under the Elastic License 2.0, the same as the project. By submitting a PR you agree to these terms.