Thank you for your interest in contributing to the React Router SaaS Template! This guide outlines the process, standards, and best practices for contributing to the project.
Boy scout rule: If you see something that can be improved, please improve it!
Leave the code better than you found it.
- Code of Conduct
- Getting Started
- Issue Workflow
- Development Workflow
- Commit Guidelines
- Pull Request Process
- Testing Guidelines
- Style Guide
- Additional Sections to Consider
We expect all contributors to adhere to our code of conduct. Please be respectful, inclusive, and professional in all interactions.
Follow the steps outlined in the main README.md.
- Create an issue describing your proposed feature or bug fix. Include:
- A clear title
- Description of the problem or feature
- Relevant context (screenshots, logs, examples)
- Get approval from one of the maintainers (the ReactSquad team) before opening a pull request, so you don't waste time on a pull request that won't be merged.
- Once approved, proceed to implement the changes in a new branch.
-
Create a feature/fix branch off of
main:git checkout -b feat/your-feature-name # or git checkout -b fix/your-fix-name -
Implement your changes, adhering to the Style Guide.
-
Write tests (see Testing Guidelines).
-
Run checks:
npm run typecheck # Type checking npm run lint # Linting npm run test # Unit & integration tests npm run test:e2e:ui # End-to-end tests
-
Commit changes following our Commit Guidelines.
We use Conventional Commits for clarity and automated versioning. Commit message format:
type(scope): short description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style (formatting)refactor: Code restructuringtest: Adding or updating testschore: Maintenance tasks
After staging, use Commitizen for consistent formatting:
npx cz-
Ensure your branch is up to date with
main:git fetch upstream git rebase upstream/main
-
Push your branch to your fork:
git push origin feat/your-feature-name
-
Open a pull request against
reactsquad/main. -
Link the approved issue in your PR description.
-
Ensure all checks pass and the build is green.
-
Request review from at least one maintainer.
-
Address feedback; maintainers may request commit squashing.
-
Tests live adjacent to implementation files, for example:
src/components/Button.tsx src/components/Button.test.tsx
- New features must include tests at the appropriate level: unit, integration, component, or E2E.
- Bug fixes require a reproducible failing test first. Once the test fails, implement the fix so the test passes.
Follow the project’s testing conventions:
- Prose style:
given: ... should: ... - Assertions:
expect(actual).toEqual(expected) - See 5 Questions Every Test Must Answer.
Run tests with:
npm run test # Unit & integration
npm run test:e2e:ui # End-to-end- Use strict mode
- Define explicit return types
- Favor
typefor object shapes
- Functional components with hooks
- Follow React Router patterns
- Use React Hook Form for forms
- Implement error boundaries
- Tailwind CSS
- shadcn/ui component system
- Maintain dark mode support
- All files must be named in
kebab-case. - All constants must be named in
SCREAMING_SNAKE_CASE.
- Biome
- Write self-documenting code
- Add TSDoc to your complex functions
- Comment complex logic
- Keep functions small and focused (DOT principle)
Thank you for helping improve the React Router SaaS Template! We look forward to your contributions.