Contributing
This guide outlines the process for contributing to the Next.js TS Tailwind Supabase Starter project. We welcome contributions of all kinds, from bug fixes to feature additions.
Getting Started
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js 18.0 or later
- npm or yarn
- Git
Fork and Clone
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/nextjs-ts-tailwind-supabase-starter.git
cd nextjs-ts-tailwind-supabase-starter
- Add the original repository as a remote:
git remote add upstream https://github.com/MGH/nextjs-ts-tailwind-supabase-starter.git
- Install dependencies:
npm install
Development Workflow
Creating a Branch
Create a new branch for your changes:
git checkout -b feature/your-feature-name
Use a descriptive branch name that reflects the changes you're making. Prefix the branch name with:
feature/
for new featuresfix/
for bug fixesdocs/
for documentation changeschore/
for maintenance tasks
Making Changes
- Make your changes to the codebase
- Ensure your code follows the project's coding standards (ESLint and Prettier are configured)
- Run tests to ensure your changes don't break existing functionality:
npm run test
- If you're adding a new feature, make sure to add appropriate tests
Committing Changes
Follow the Conventional Commits format for your commit messages:
type(scope): short description
longer description if necessary
Where type
is one of:
feat
: A new featurefix
: A bug fixdocs
: Documentation changesstyle
: Changes that don't affect the code's functionality (formatting, etc.)refactor
: Code changes that neither fix a bug nor add a featuretest
: Adding or fixing testschore
: Changes to the build process, tools, etc.
And scope
is optional but should indicate what part of the codebase is affected.
Example:
feat(auth): add support for magic link authentication
Submitting a Pull Request
- Push your changes to your fork:
git push origin feature/your-feature-name
- Go to the original repository on GitHub and click "New Pull Request"
- Select your branch and fill out the PR template
- Submit the pull request
Pull Request Review Process
Pull requests will be reviewed by the maintainers. During the review:
- Automated tests will run to verify your changes
- Maintainers will review your code for:
- Functionality
- Code quality
- Test coverage
- Documentation
- Feedback may be provided requesting changes
- Once approved, your PR will be merged
Coding Standards
TypeScript
- Use TypeScript for all new code
- Ensure strong typing (avoid
any
) - Follow the existing type structure
React and Next.js
- Use functional components with hooks
- Follow React 18 best practices
- Use Next.js 14 App Router conventions
- Prefer server components when appropriate
CSS and Styling
- Use TailwindCSS for styling
- Follow the project's utility-first approach
- Use the shadcn/ui component patterns when applicable
Testing
- Write tests for all new functionality
- Maintain or improve test coverage
- Follow the testing patterns described in the Testing documentation
Documentation
When making changes, update the relevant documentation:
- Add or update docstrings for functions and components
- Update markdown documentation in the
/docs-website
directory - For significant features, add examples
Versioning
We follow Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible functionality
- PATCH version for backwards-compatible bug fixes
Code of Conduct
By participating in this project, you agree to abide by our Code of Conduct:
- Be respectful and inclusive
- Be constructive in feedback
- Focus on the issue, not the person
- Be patient with others, especially newcomers
Recognition
Contributors will be acknowledged in the project's README.md and CONTRIBUTORS.md files.
Questions and Support
If you have questions or need support:
- Open an issue for bugs or feature requests
- Use discussions for general questions
- Refer to the documentation first
Thank you for contributing to the Next.js TS Tailwind Supabase Starter project!