Thanks for your interest in contributing to Better Auth Plugins! We welcome all kinds of contributions - from bug reports and feature requests to code changes and documentation improvements.
-
Fork and clone the repository
git clone https://github.com/yourusername/better-auth-plugins.git cd better-auth-plugins -
Install dependencies
bun install
-
Setup database
# Initialize database bun run db:push -
Build all packages
bun run build
-
Run tests
bun test
-
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the existing code style and conventions
- Add tests for new functionality
- Update documentation as needed
-
Test your changes
# Run all tests bun test # Type check bun run typecheck # Build to ensure everything compiles bun run build # Database operations (if schema changes) bun run db:push
-
Commit and push
git add . git commit -m "feat: add amazing new feature" git push origin feature/your-feature-name
-
Create a Pull Request
- Use a descriptive title
- Explain what changes you made and why
- Reference any related issues
For contributors working with database schemas:
# Development workflow
bun run db:push # Push schema changes directly (fastest)
bun run db:studio # Open Drizzle Studio for inspection
# Migration workflow (production)
bun run db:generate # Generate migration files
bun run db:migrate # Apply migrations to database-
Use the plugin structure
plugins/your-plugin/ ├── src/ │ ├── index.ts # Main export │ ├── plugin.ts # Server-side plugin │ ├── client.ts # Client-side plugin │ ├── schema.ts # Database schema │ └── types.ts # TypeScript types ├── package.json ├── tsconfig.json └── tsup.config.ts -
Follow naming conventions
- Package name:
better-auth-{plugin-name} - Export names:
{pluginName}Pluginand{pluginName}Client
- Package name:
-
Include comprehensive types
- Export all public interfaces and types
- Use
typeimports where possible - Prefer interfaces over type aliases
- TypeScript: Use strict mode with full type safety
- Security: Always validate inputs with Zod schemas
- Performance: Lazy load dependencies when possible
- Testing: Include unit tests for all functionality
Found a bug? Please create an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Environment details (Node version, database, etc.)
Have an idea? We'd love to hear it! Please include:
- What problem it solves
- How it would work
- Any implementation ideas
Documentation improvements are always welcome:
- Fix typos or unclear explanations
- Add examples or tutorials
- Improve API documentation
- Bug fixes
- New features
- Performance improvements
- Test coverage improvements
Looking for ideas? Consider these plugin categories:
Security: Rate limiting, fraud detection, audit logging, compliance automation
Integrations: Cloud storage, notification services, webhook endpoints
User Management: Session management, onboarding flows, user impersonation
Analytics: Event tracking, feature flags, subscription management
- All contributions go through code review
- We check for code quality, tests, and documentation
- Maintainers may suggest changes or improvements
- Once approved, your PR will be merged
- 🎮 Discord: Join our community
- 💬 Discussions: GitHub Discussions
- 🐛 Issues: GitHub Issues
Please read our Code of Conduct to understand the standards we expect from our community.
Thank you for contributing to Better Auth Plugins! 🎉