Thank you for your interest in contributing to RewardHub! This document provides guidelines and instructions for contributing to the project.
- Be respectful and inclusive
- Provide constructive feedback
- Focus on what is best for the community
- Show empathy towards other community members
Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include:
- Clear, descriptive title
- Detailed description of the issue
- Steps to reproduce the behavior
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (OS, Node version, browser, etc.)
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- Clear, descriptive title
- Detailed description of the proposed functionality
- Explanation of why this enhancement would be useful
- Possible implementation approach
- Fork the repository and create your branch from
main - Make your changes following our coding standards
- Test your changes thoroughly
- Update documentation if needed
- Commit your changes with clear, descriptive messages
- Push to your fork and submit a pull request
-
Clone your fork:
git clone https://github.com/your-username/RewardHub.git cd RewardHub -
Install dependencies:
# Backend cd backend npm install # Frontend cd ../frontend npm install
-
Set up environment variables (see README.md)
-
Start development servers (see README.md)
- Use ES6+ syntax
- Follow Vue 3 Composition API patterns
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
- Use async/await for asynchronous operations
- Follow Solidity style guide
- Use OpenZeppelin contracts where applicable
- Add NatSpec comments for all public functions
- Implement proper access control
- Test thoroughly before deployment
- Use 2 spaces for indentation
- No trailing whitespace
- Use semicolons in JavaScript
- Keep lines under 100 characters when possible
- Write self-documenting code
Format: <type>: <subject>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat: Add wallet connection status indicator
fix: Resolve token balance display issue
docs: Update API documentation for redemptions
- Write tests for new features
- Ensure all tests pass before submitting PR
- Maintain or improve code coverage
# Backend tests
cd backend
npm test
# Frontend tests
cd frontend
npm run test:unit
npm run test:e2e- Update README.md if adding new features
- Update API documentation for new endpoints
- Add inline code comments for complex logic
- Update environment variable documentation
- Ensure your code follows the coding standards
- Update documentation as needed
- Add tests for new functionality
- Ensure all tests pass
- Update the README.md with details of changes if applicable
- The PR will be merged once approved by maintainers
Feel free to open an issue for any questions or clarifications needed.
Thank you for contributing to RewardHub!