|
| 1 | +# Contributing to ZanePersonal |
| 2 | + |
| 3 | +Thank you for your interest in contributing to this project! While this is primarily a personal website, contributions are welcome. |
| 4 | + |
| 5 | +## Commit Message Format |
| 6 | + |
| 7 | +This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification for commit messages. |
| 8 | + |
| 9 | +### Format |
| 10 | + |
| 11 | +``` |
| 12 | +<type>(<scope>): <subject> |
| 13 | +
|
| 14 | +<body> |
| 15 | +
|
| 16 | +<footer> |
| 17 | +``` |
| 18 | + |
| 19 | +### Types |
| 20 | + |
| 21 | +- **feat**: A new feature |
| 22 | +- **fix**: A bug fix |
| 23 | +- **docs**: Documentation changes |
| 24 | +- **style**: Code style changes (formatting, missing semi-colons, etc.) |
| 25 | +- **refactor**: Code refactoring without changing functionality |
| 26 | +- **perf**: Performance improvements |
| 27 | +- **test**: Adding or updating tests |
| 28 | +- **build**: Changes to build system or dependencies |
| 29 | +- **ci**: Changes to CI configuration |
| 30 | +- **chore**: Other changes that don't modify src or test files |
| 31 | + |
| 32 | +### Examples |
| 33 | + |
| 34 | +``` |
| 35 | +feat(effects): add new particle collision detection |
| 36 | +
|
| 37 | +fix(animations): resolve timing issue with typewriter effect |
| 38 | +
|
| 39 | +docs(readme): update installation instructions |
| 40 | +
|
| 41 | +style(css): apply consistent naming convention |
| 42 | +
|
| 43 | +refactor(modules): extract sound utilities to separate module |
| 44 | +
|
| 45 | +perf(effects): optimize particle rendering loop |
| 46 | +
|
| 47 | +test(interactions): add unit tests for ripple effect |
| 48 | +
|
| 49 | +build(vite): update build configuration for better tree-shaking |
| 50 | +
|
| 51 | +ci(github-actions): add accessibility testing workflow |
| 52 | +``` |
| 53 | + |
| 54 | +## Development Workflow |
| 55 | + |
| 56 | +1. **Fork the repository** (if you're an external contributor) |
| 57 | + |
| 58 | +2. **Clone your fork** |
| 59 | + ```bash |
| 60 | + git clone https://github.com/YOUR_USERNAME/ZanePersonal.git |
| 61 | + cd ZanePersonal |
| 62 | + ``` |
| 63 | + |
| 64 | +3. **Install dependencies** |
| 65 | + ```bash |
| 66 | + npm install |
| 67 | + ``` |
| 68 | + |
| 69 | +4. **Create a feature branch** |
| 70 | + ```bash |
| 71 | + git checkout -b feat/your-feature-name |
| 72 | + ``` |
| 73 | + |
| 74 | +5. **Make your changes** |
| 75 | + - Write clean, readable code |
| 76 | + - Follow existing code style |
| 77 | + - Add comments where necessary |
| 78 | + - Update documentation if needed |
| 79 | + |
| 80 | +6. **Run quality checks** |
| 81 | + ```bash |
| 82 | + npm run lint # Check for linting errors |
| 83 | + npm run format # Format code with Prettier |
| 84 | + npm run build # Ensure project builds successfully |
| 85 | + ``` |
| 86 | + |
| 87 | +7. **Commit your changes** |
| 88 | + ```bash |
| 89 | + git add . |
| 90 | + git commit -m "feat(scope): your descriptive message" |
| 91 | + ``` |
| 92 | + |
| 93 | +8. **Push to your fork** |
| 94 | + ```bash |
| 95 | + git push origin feat/your-feature-name |
| 96 | + ``` |
| 97 | + |
| 98 | +9. **Create a Pull Request** |
| 99 | + - Provide a clear description of changes |
| 100 | + - Reference any related issues |
| 101 | + - Ensure CI checks pass |
| 102 | + |
| 103 | +## Code Style Guidelines |
| 104 | + |
| 105 | +### JavaScript |
| 106 | + |
| 107 | +- Use ES6+ features |
| 108 | +- Prefer `const` over `let`, avoid `var` |
| 109 | +- Use arrow functions for callbacks |
| 110 | +- Keep functions small and focused |
| 111 | +- Add JSDoc comments for complex functions |
| 112 | +- Follow the existing modular structure |
| 113 | + |
| 114 | +### CSS |
| 115 | + |
| 116 | +- Use CSS custom properties (variables) defined in `:root` |
| 117 | +- Follow BEM-like naming conventions where appropriate |
| 118 | +- Group related properties together |
| 119 | +- Use meaningful class names |
| 120 | +- Avoid overly specific selectors |
| 121 | + |
| 122 | +### HTML |
| 123 | + |
| 124 | +- Use semantic HTML5 elements |
| 125 | +- Include proper ARIA labels for accessibility |
| 126 | +- Ensure all images have alt text |
| 127 | +- Maintain proper heading hierarchy |
| 128 | + |
| 129 | +## Testing |
| 130 | + |
| 131 | +While this project doesn't currently have automated tests, please ensure: |
| 132 | +- All features work in modern browsers (Chrome, Firefox, Safari, Edge) |
| 133 | +- Responsive design works on mobile, tablet, and desktop |
| 134 | +- No console errors or warnings |
| 135 | +- Accessibility features work with keyboard navigation |
| 136 | + |
| 137 | +## Performance Considerations |
| 138 | + |
| 139 | +- Keep total bundle size under 150KB (compressed) |
| 140 | +- Optimize images before adding them |
| 141 | +- Minimize use of heavy libraries |
| 142 | +- Test animations on lower-end devices |
| 143 | +- Use lazy loading where appropriate |
| 144 | + |
| 145 | +## Accessibility Standards |
| 146 | + |
| 147 | +- Maintain WCAG 2.1 Level AA compliance |
| 148 | +- Test with screen readers |
| 149 | +- Ensure keyboard navigation works |
| 150 | +- Provide sufficient color contrast |
| 151 | +- Include focus indicators on interactive elements |
| 152 | + |
| 153 | +## Pull Request Checklist |
| 154 | + |
| 155 | +Before submitting a PR, ensure: |
| 156 | + |
| 157 | +- [ ] Code follows the project's style guidelines |
| 158 | +- [ ] All linting checks pass (`npm run lint`) |
| 159 | +- [ ] Code is properly formatted (`npm run format`) |
| 160 | +- [ ] Project builds successfully (`npm run build`) |
| 161 | +- [ ] Changes are tested in multiple browsers |
| 162 | +- [ ] Documentation is updated if needed |
| 163 | +- [ ] Commit messages follow conventional commits format |
| 164 | +- [ ] PR description clearly explains the changes |
| 165 | + |
| 166 | +## Questions or Issues? |
| 167 | + |
| 168 | +Feel free to: |
| 169 | +- Open an issue for bugs or feature requests |
| 170 | +- Start a discussion for questions |
| 171 | +- Email [contact@zane.org](mailto:contact@zane.org) |
| 172 | + |
| 173 | +## License |
| 174 | + |
| 175 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
| 176 | + |
| 177 | +--- |
| 178 | + |
| 179 | +Thank you for contributing! 🎉 |
0 commit comments