Thank you for your interest in contributing to Better Hub! This guide covers everything you need to know about submitting contributions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/better-auth/better-hub/llms.txt
Use this file to discover all available pages before exploring further.
Pull Request Workflow
Fork and create a branch
Fork the Better Hub repository and create a new branch from Use descriptive branch names that indicate what you’re working on:
main:feature/add-pr-templatesfix/issue-filter-bugrefactor/auth-module
Make your changes
Implement your feature or fix. Keep your changes focused:
- One PR should address one issue or feature
- Break large changes into smaller, reviewable PRs
- Add tests if applicable
- Update documentation if you’re changing behavior
Run quality checks
Before committing, ensure your code passes all checks:This runs:
- oxlint - Linting for code quality
- oxfmt - Code formatting validation
- TypeScript - Type checking
The pre-commit hook automatically runs these checks, but it’s faster to catch issues early.
Push and create a PR
Push your branch to your fork:Then open a Pull Request against the
main branch on the Better Hub repository.Write a great PR description
Fill out the PR description template:
- What: Summarize what changed
- Why: Explain the motivation or problem being solved
- How: Describe your approach if it’s non-obvious
- Screenshots: Include before/after images for UI changes
- Testing: Describe how you tested the changes
PR Description Example
PR Description Example
Code Style
Better Hub uses automated tooling for code style - no manual decisions needed.Linting
We use oxlint, a fast JavaScript/TypeScript linter:oxlint.json at the repo root.
Formatting
We use oxfmt for code formatting:.oxfmtrc.json. Files to ignore are in .oxfmtignore.
The pre-commit hook automatically formats staged files, so you don’t need to manually run
pnpm fmt before each commit.Type Safety
All code must pass TypeScript type checking:any types. Use proper TypeScript types and interfaces.
Commit Conventions
Use clear, descriptive commit messages with a conventional prefix:Commit Message Guidelines
- Use the imperative mood: “add feature” not “added feature”
- Be concise: Aim for 50 characters or less in the subject
- Explain why, not what: The diff shows what changed; explain why
- Reference issues: Include
Fixes #123orCloses #456when applicable
Good vs Bad Commit Messages
Good vs Bad Commit Messages
Good:Bad:The good example:
- Uses a conventional prefix (
feat:) - Describes what was added
- Includes a body explaining why
- References the related issue
Testing Your Changes
Before submitting a PR:- Manual testing: Test your changes in the browser
- Edge cases: Try unusual inputs, empty states, error conditions
- Cross-browser: Test in Chrome, Firefox, and Safari if possible
- Different screen sizes: Ensure responsive design works
We don’t currently have automated tests, but we encourage adding them for critical functionality.
Reporting Issues
Found a bug or have a feature request?- Use GitHub Issues
- Search existing issues first to avoid duplicates
- For bugs, include:
- Steps to reproduce
- Expected vs actual behavior
- Browser and OS information
- Screenshots or error messages
Security Vulnerabilities
For security issues, do not open public issues. See SECURITY.md for responsible disclosure procedures.Questions?
If you have questions about contributing:- Open a discussion on GitHub
- Ask in the Better Auth Discord community
- Comment on an existing issue or PR