|
| 1 | +# Contributing to Jazzy Framework |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Jazzy Framework! 🎉 |
| 4 | + |
| 5 | +## Ways to Contribute |
| 6 | + |
| 7 | +There are many ways you can contribute to Jazzy Framework: |
| 8 | + |
| 9 | +- 🐛 **Report bugs** using our bug report template |
| 10 | +- 💡 **Suggest features** using our feature request template |
| 11 | +- 📝 **Improve documentation** - fix typos, add examples, clarify explanations |
| 12 | +- 🧪 **Write tests** - help us reach 100% test coverage |
| 13 | +- 🔧 **Fix bugs** - tackle issues labeled with `good first issue` |
| 14 | +- ⭐ **Add new features** - implement requested features |
| 15 | +- 📚 **Create examples** - build sample applications showcasing framework features |
| 16 | + |
| 17 | +## Getting Started |
| 18 | + |
| 19 | +### 1. Fork and Clone |
| 20 | +```bash |
| 21 | +git clone https://github.com/YOUR_USERNAME/jazzy-framework.git |
| 22 | +cd jazzy-framework |
| 23 | +``` |
| 24 | + |
| 25 | +### 2. Build the Project |
| 26 | +```bash |
| 27 | +# Install dependencies and run tests |
| 28 | +mvn clean install |
| 29 | + |
| 30 | +# Run tests only |
| 31 | +mvn test |
| 32 | + |
| 33 | +# Run example application |
| 34 | +mvn exec:java -Dexec.mainClass="examples.basic.App" |
| 35 | +``` |
| 36 | + |
| 37 | +### 3. Make Your Changes |
| 38 | + |
| 39 | +#### For Bug Fixes: |
| 40 | +1. Create a branch: `git checkout -b fix/issue-123-description` |
| 41 | +2. Write tests that reproduce the bug |
| 42 | +3. Fix the bug |
| 43 | +4. Ensure all tests pass |
| 44 | +5. Update documentation if needed |
| 45 | + |
| 46 | +#### For New Features: |
| 47 | +1. Create a branch: `git checkout -b feature/feature-name` |
| 48 | +2. Write tests for the new feature |
| 49 | +3. Implement the feature |
| 50 | +4. Add documentation and examples |
| 51 | +5. Ensure all tests pass |
| 52 | + |
| 53 | +#### For Documentation: |
| 54 | +1. Create a branch: `git checkout -b docs/description` |
| 55 | +2. Update relevant `.md` files or javadocs |
| 56 | +3. Test documentation builds (if applicable) |
| 57 | + |
| 58 | +### 4. Commit Guidelines |
| 59 | + |
| 60 | +We follow [Conventional Commits](https://www.conventionalcommits.org/): |
| 61 | + |
| 62 | +```bash |
| 63 | +# Examples: |
| 64 | +git commit -m "feat: add middleware support to router" |
| 65 | +git commit -m "fix: resolve null pointer in DI container" |
| 66 | +git commit -m "docs: add examples for @Named annotation" |
| 67 | +git commit -m "test: add integration tests for validation" |
| 68 | +git commit -m "chore: update dependencies" |
| 69 | +``` |
| 70 | + |
| 71 | +**Types:** |
| 72 | +- `feat:` - New features |
| 73 | +- `fix:` - Bug fixes |
| 74 | +- `docs:` - Documentation changes |
| 75 | +- `test:` - Adding/updating tests |
| 76 | +- `chore:` - Maintenance tasks |
| 77 | +- `refactor:` - Code refactoring |
| 78 | +- `perf:` - Performance improvements |
| 79 | + |
| 80 | +### 5. Pull Request Process |
| 81 | + |
| 82 | +1. **Update your branch** with latest main: |
| 83 | + ```bash |
| 84 | + git checkout main |
| 85 | + git pull origin main |
| 86 | + git checkout your-branch |
| 87 | + git rebase main |
| 88 | + ``` |
| 89 | + |
| 90 | +2. **Run the full test suite**: |
| 91 | + ```bash |
| 92 | + mvn clean test |
| 93 | + ``` |
| 94 | + |
| 95 | +3. **Create Pull Request** with: |
| 96 | + - Clear title describing the change |
| 97 | + - Detailed description of what was changed and why |
| 98 | + - Link to related issues |
| 99 | + - Screenshots/examples if applicable |
| 100 | + |
| 101 | +## Code Standards |
| 102 | + |
| 103 | +### Java Code Style |
| 104 | +- **Indentation**: 4 spaces (no tabs) |
| 105 | +- **Line Length**: Maximum 120 characters |
| 106 | +- **Naming**: |
| 107 | + - Classes: `PascalCase` |
| 108 | + - Methods/Variables: `camelCase` |
| 109 | + - Constants: `UPPER_SNAKE_CASE` |
| 110 | +- **Javadoc**: Required for all public methods and classes |
| 111 | + |
| 112 | +### Testing |
| 113 | +- **Test Coverage**: Aim for >90% coverage for new code |
| 114 | +- **Test Naming**: Use descriptive names that explain what is being tested |
| 115 | +- **Test Structure**: Follow Arrange-Act-Assert pattern |
| 116 | + |
| 117 | +Example: |
| 118 | +```java |
| 119 | +@Test |
| 120 | +public void shouldInjectDependencyWhenComponentHasConstructorParameter() { |
| 121 | + // Arrange |
| 122 | + DIContainer container = new DIContainer(); |
| 123 | + container.register(UserRepository.class); |
| 124 | + |
| 125 | + // Act |
| 126 | + UserService service = container.getBean(UserService.class); |
| 127 | + |
| 128 | + // Assert |
| 129 | + assertThat(service.getRepository()).isNotNull(); |
| 130 | +} |
| 131 | +``` |
| 132 | + |
| 133 | +## Good First Issues |
| 134 | + |
| 135 | +Looking for a good first contribution? Check out issues labeled: |
| 136 | + |
| 137 | +- 🟢 `good first issue` - Perfect for beginners |
| 138 | +- 📚 `documentation` - Documentation improvements |
| 139 | +- 🧪 `tests` - Writing or improving tests |
| 140 | +- 🐛 `bug` - Bug fixes with clear reproduction steps |
| 141 | + |
| 142 | +## Development Setup |
| 143 | + |
| 144 | +### Prerequisites |
| 145 | +- Java 11 or higher |
| 146 | +- Maven 3.6+ |
| 147 | +- Git |
| 148 | + |
| 149 | +### Running Tests |
| 150 | +```bash |
| 151 | +# Run all tests |
| 152 | +mvn test |
| 153 | + |
| 154 | +# Run specific test class |
| 155 | +mvn test -Dtest=DIContainerTest |
| 156 | + |
| 157 | +# Run tests with coverage (if configured) |
| 158 | +mvn test |
| 159 | +``` |
| 160 | + |
| 161 | +### Building Documentation |
| 162 | +```bash |
| 163 | +cd docs-site |
| 164 | +npm install |
| 165 | +npm run build |
| 166 | +npm run serve |
| 167 | +``` |
| 168 | + |
| 169 | +## Community Guidelines |
| 170 | + |
| 171 | +### Be Respectful |
| 172 | +- Use welcoming and inclusive language |
| 173 | +- Be respectful of differing viewpoints and experiences |
| 174 | +- Accept constructive criticism gracefully |
| 175 | +- Focus on what is best for the community |
| 176 | + |
| 177 | +### Communication |
| 178 | +- **Issues**: Use issue templates for bug reports and feature requests |
| 179 | +- **Pull Requests**: Provide clear descriptions and context |
| 180 | + |
| 181 | +## Recognition |
| 182 | + |
| 183 | +Contributors are recognized in our: |
| 184 | +- 🏆 GitHub contributors graph |
| 185 | +- 📚 Release notes for significant contributions |
| 186 | + |
| 187 | +## Questions? |
| 188 | + |
| 189 | +- 💬 **General Questions**: Use [GitHub Discussions](https://github.com/canermastan/jazzy-framework/discussions) for community help |
| 190 | +- 🐛 **Bug Reports**: Use our [bug report template](https://github.com/canermastan/jazzy-framework/issues/new?template=bug_report.yml) |
| 191 | +- 💡 **Feature Ideas**: Use our [feature request template](https://github.com/canermastan/jazzy-framework/issues/new?template=feature_request.yml) |
| 192 | +- ❓ **Questions**: Use our [question template](https://github.com/canermastan/jazzy-framework/issues/new?template=question.yml) |
| 193 | + |
| 194 | +Thank you for contributing to Jazzy Framework! 🚀 |
0 commit comments