Contributing
Thank you for your interest in contributing to Headless Shopify! This project welcomes contributions from the community.
How to Contributeโ
Contributions can take many forms:
- ๐ Bug reports
- ๐ก Feature requests
- ๐ Documentation improvements
- ๐ง Code contributions
- ๐งช Testing and quality assurance
Getting Startedโ
1. Fork the Repositoryโ
Fork the headless-shopify repository to your GitHub account.
2. Clone Your Forkโ
git clone https://github.com/YOUR_USERNAME/headless-shopify.git
cd headless-shopify
3. Create a Branchโ
Create a feature branch for your changes:
git checkout -b feature/your-feature-name
Branch naming conventions:
feature/- for new featuresfix/- for bug fixesdocs/- for documentation updatesrefactor/- for code refactoring
4. Make Your Changesโ
Follow the project's coding standards and style guide. Ensure your code:
- Follows TypeScript best practices
- Includes proper type definitions
- Is properly formatted
- Passes linting checks
5. Test Your Changesโ
# Run linting
pnpm lint
# Build the project
pnpm build
# Test locally
pnpm dev
6. Commit Your Changesโ
Write clear, descriptive commit messages:
git add .
git commit -m "feat: add new product filter feature"
Follow conventional commit format:
feat:- new featuresfix:- bug fixesdocs:- documentation changesstyle:- formatting changesrefactor:- code refactoringtest:- adding testschore:- maintenance tasks
7. Push to Your Forkโ
git push origin feature/your-feature-name
8. Open a Pull Requestโ
- Go to the original repository
- Click "New Pull Request"
- Select your fork and branch
- Fill out the PR template
- Submit the pull request
Pull Request Guidelinesโ
Before Submittingโ
- Code follows the project's style guide
- All tests pass
- Documentation is updated if needed
- Commit messages are clear and descriptive
- Branch is up to date with main
PR Descriptionโ
Include in your PR:
- Purpose: What does this PR do?
- Changes: What changes were made?
- Testing: How was it tested?
- Screenshots: If applicable, add screenshots
- Related Issues: Reference any related issues
Code Styleโ
TypeScriptโ
- Use TypeScript strictly
- Avoid
anytypes - Define proper interfaces and types
- Use functional components for React
React Componentsโ
// Good
interface Props {
title: string;
count: number;
}
export function Component({ title, count }: Props) {
return <div>{title}: {count}</div>;
}
File Namingโ
- React components:
PascalCase.tsx - Utilities:
camelCase.ts - Types:
camelCase.types.ts - Tests:
*.test.tsor*.spec.ts
Importsโ
Organize imports in this order:
- React imports
- Third-party libraries
- Local components
- Utils and types
- Styles
Reporting Bugsโ
When reporting bugs, please include:
- Description: Clear description of the bug
- Steps to Reproduce: How to reproduce the issue
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Environment:
- OS
- Node.js version
- Browser (if applicable)
- Screenshots: If applicable
Feature Requestsโ
For feature requests, please:
- Check if the feature already exists or is planned
- Clearly describe the feature
- Explain the use case
- Describe the expected behavior
Questions and Discussionsโ
For questions:
- Check existing Issues
- Open a new issue with the "question" label
- Contact: reachjoby@gmail.com
Code of Conductโ
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what is best for the community
- Show empathy towards others
Securityโ
If you discover a security vulnerability:
- Do not open a public issue
- Email reachjoby@gmail.com
- Provide details of the vulnerability
- Allow time for a fix before public disclosure
Licenseโ
By contributing, you agree that your contributions will be licensed under the MIT License.
Recognitionโ
Contributors will be recognized in:
- README.md contributors section
- Release notes
- Project documentation
Thank You!โ
Your contributions help make this project better for everyone. Thank you for taking the time to contribute! ๐