First off, thank you for considering contributing to React Supabase Auth Starter! 🎉
- Code of Conduct
- Getting Started
- Development Workflow
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Commit Messages
This project follows professional engineering standards. Please be respectful and constructive in all interactions.
- Bun (recommended) or Node.js 18+
- Git
- Supabase account (for database features)
# Fork the repository
# Clone your fork
git clone https://github.com/YOUR_USERNAME/react-supabase-auth-starter.git
cd react-supabase-auth-starter
# Add upstream remote
git remote add upstream https://github.com/jjmendezrodriguez/react-supabase-auth-starter.git
# Install dependencies
cd frontEnd
bun installFollow this convention:
feature/add-dark-mode
fix/login-validation-bug
refactor/auth-service
docs/update-readme
chore/upgrade-dependencies# Update main branch
git checkout main
git pull upstream main
# Create feature branch
git checkout -b feature/your-feature-name- Write clean, readable code
- Follow the coding standards (see AGENTS.md)
- Add tests for new features
- Update documentation if needed
# Run linter
bun run lint
# Run tests
bun test:run
# Build project
bun run build- Code follows project style guidelines
- All tests pass (
bun test:run) - Linter passes (
bun run lint) - Build succeeds (
bun run build) - Updated documentation if needed
- Added tests for new features
-
Push your branch
git push origin feature/your-feature-name
-
Open Pull Request on GitHub
- Use descriptive title:
feat: add dark mode toggle - Fill out PR template
- Link related issues:
Closes #123
- Use descriptive title:
-
PR Title Format
type: brief description Examples: feat: add user profile settings page fix: resolve password validation bug docs: update installation instructions refactor: improve auth service structure test: add unit tests for validators
-
Wait for Review
- CI/CD must pass ✅
- At least 1 approval required
- Address review feedback promptly
- Ideal: 50-200 lines
- Max: 400 lines
- If larger: Split into multiple PRs
- Use TypeScript strict mode
- No
anytypes (useunknownor proper types) - Document complex functions with JSDoc
- Functional components only
- Use hooks properly (no hooks in loops/conditions)
- Extract business logic to custom hooks
- Variables:
camelCase - Functions:
camelCase(verb-based:getUserData) - Components:
PascalCase - Constants:
UPPER_SNAKE_CASE
- Max 300 lines per file
- Split UI from logic (component + hook)
- One component per file
See AGENTS.md for complete standards.
- Utils: 90%+ coverage required
- Hooks: 70%+ coverage
- Components: 60%+ coverage
// utils.test.ts
import { describe, it, expect } from 'vitest'
import { validateEmail } from '../validators'
describe('validateEmail', () => {
it('should accept valid email addresses', () => {
expect(validateEmail('user@example.com')).toBe(true)
})
it('should reject invalid emails', () => {
expect(validateEmail('invalid')).toBe(false)
})
})# Watch mode
bun test
# Single run
bun test:run
# With coverage
bun test:coverageFollow Conventional Commits:
type(scope): subject
Examples:
feat(auth): add Google OAuth login
fix(validation): resolve email regex bug
docs(readme): update installation steps
refactor(hooks): simplify useAuth hook
test(utils): add validators test coverage
chore(deps): upgrade React to v19feat:New featurefix:Bug fixdocs:Documentation changesrefactor:Code refactoringtest:Adding testschore:Maintenance tasks
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- Tag issues appropriately:
bug,enhancement,question
Contributors will be listed in CONTRIBUTORS.md (coming soon).
Thank you for contributing! 🚀