Thank you for your interest in contributing to Better Auth! This page covers everything you need to get started.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/better-auth/better-auth/llms.txt
Use this file to discover all available pages before exploring further.
GitHub Issues
Browse open issues or report a bug.
Discord
Ask questions and discuss ideas with the community.
Development setup
Fork and clone the repository
Visit github.com/better-auth/better-auth
and click Fork. Then clone your fork:
Running tests
Better Auth uses Vitest. Test files live next to the source files they cover.Using the test instance helper
runWithUser and signInWithTestUser for
authenticated test scenarios:
Code style
Better Auth uses Biome for formatting and linting.- Use tabs for indentation in TypeScript; 2 spaces in JSON.
- Avoid
anytypes and unsafe typecasts. - Prefer functions and plain objects over classes.
- Do not use runtime-specific APIs like
Bufferin library code. UseUint8Arrayinstead.
PR guidelines
-
Target the
canarybranch, notmain. -
Use Conventional Commits for commit
messages:
- Keep PRs focused on a single change.
- Add tests for new features and bug fixes.
- Update documentation when changing public APIs.
-
If a PR fixes a numbered GitHub issue, add a JSDoc
@seecomment to the relevant test:
Contribution areas
| Area | Notes |
|---|---|
| Bug fixes | Check issues labeled good first issue |
| Framework integrations | Prefer framework-agnostic solutions; keep minimal |
| Core plugins | Open an issue to discuss before implementing |
| Community plugins | Develop independently and share on Discord |
| Documentation | Fix typos, add examples, keep docs in sync with code |
Need help?
- Open a GitHub issue
- Ask in Discord
- Reach out to the maintainers