|
| 1 | +# Contributing to Aviator Betting Bot |
| 2 | + |
| 3 | +First off, thank you for considering contributing to the Aviator Betting Bot! It's people like you that make this project better for everyone. |
| 4 | + |
| 5 | +## Table of Contents |
| 6 | + |
| 7 | +- [Code of Conduct](#code-of-conduct) |
| 8 | +- [How Can I Contribute?](#how-can-i-contribute) |
| 9 | +- [Getting Started](#getting-started) |
| 10 | +- [Development Workflow](#development-workflow) |
| 11 | +- [Coding Standards](#coding-standards) |
| 12 | +- [Commit Guidelines](#commit-guidelines) |
| 13 | +- [Pull Request Process](#pull-request-process) |
| 14 | +- [Reporting Bugs](#reporting-bugs) |
| 15 | +- [Suggesting Enhancements](#suggesting-enhancements) |
| 16 | + |
| 17 | +## Code of Conduct |
| 18 | + |
| 19 | +This project and everyone participating in it is governed by our commitment to creating a welcoming and respectful environment. By participating, you are expected to: |
| 20 | + |
| 21 | +- Use welcoming and inclusive language |
| 22 | +- Be respectful of differing viewpoints and experiences |
| 23 | +- Gracefully accept constructive criticism |
| 24 | +- Focus on what is best for the community |
| 25 | +- Show empathy towards other community members |
| 26 | + |
| 27 | +## How Can I Contribute? |
| 28 | + |
| 29 | +### Types of Contributions We're Looking For |
| 30 | + |
| 31 | +- **Bug fixes**: Help us identify and fix bugs |
| 32 | +- **New features**: Implement new betting strategies or monitoring features |
| 33 | +- **Documentation**: Improve README, code comments, or create tutorials |
| 34 | +- **Code optimization**: Enhance performance and reliability |
| 35 | +- **Testing**: Add unit tests or integration tests |
| 36 | +- **UI/UX improvements**: Enhance the web interface (when available) |
| 37 | + |
| 38 | +## Getting Started |
| 39 | + |
| 40 | +1. **Fork the repository** on GitHub |
| 41 | +2. **Clone your fork** locally: |
| 42 | + ```bash |
| 43 | + git clone https://github.com/YOUR-USERNAME/Aviator-Automated-Betika-Bot.git |
| 44 | + cd Aviator-Automated-Betika-Bot |
| 45 | + ``` |
| 46 | +3. **Install dependencies**: |
| 47 | + ```bash |
| 48 | + npm install |
| 49 | + ``` |
| 50 | +4. **Create a new branch** for your feature or bugfix: |
| 51 | + ```bash |
| 52 | + git checkout -b feature/your-feature-name |
| 53 | + ``` |
| 54 | + |
| 55 | +## Development Workflow |
| 56 | + |
| 57 | +### Setting Up Your Development Environment |
| 58 | + |
| 59 | +1. Ensure you have Node.js >= 14.0.0 installed |
| 60 | +2. Install all dependencies with `npm install` |
| 61 | +3. Configure your `util/config.js` for testing |
| 62 | +4. Test your changes with `npm run start` |
| 63 | + |
| 64 | +### Project Structure |
| 65 | + |
| 66 | +``` |
| 67 | +aviator-bot/ |
| 68 | +├── database/ # Database integration (currently deprecated) |
| 69 | +├── game/ # Core game logic |
| 70 | +│ ├── betManager.js # Bet execution logic |
| 71 | +│ ├── gameMonitor.js # Game state monitoring |
| 72 | +│ ├── statsTracker.js # Statistics tracking |
| 73 | +│ └── strategies.js # Betting strategies |
| 74 | +├── util/ # Utility functions |
| 75 | +│ ├── config.js # Configuration settings |
| 76 | +│ ├── frameHelper.js # Browser frame helpers |
| 77 | +│ └── logger.js # Logging utilities |
| 78 | +└── index.js # Main entry point |
| 79 | +``` |
| 80 | + |
| 81 | +## Coding Standards |
| 82 | + |
| 83 | +### JavaScript Style Guide |
| 84 | + |
| 85 | +- Use **ES6+** syntax where appropriate |
| 86 | +- Use **2 spaces** for indentation |
| 87 | +- Use **meaningful variable names** |
| 88 | +- Add **comments** for complex logic |
| 89 | +- Keep functions **small and focused** |
| 90 | +- Follow **DRY principles** (Don't Repeat Yourself) |
| 91 | + |
| 92 | +### Example: |
| 93 | + |
| 94 | +```javascript |
| 95 | +// Good |
| 96 | +async function placeBet(frame, amount) { |
| 97 | + const betInput = await frame.$('#bet-amount'); |
| 98 | + await betInput.type(amount.toString()); |
| 99 | + await clickBetButton(frame); |
| 100 | +} |
| 101 | + |
| 102 | +// Bad |
| 103 | +async function pb(f, a) { |
| 104 | + const b = await f.$('#bet-amount'); |
| 105 | + await b.type(a.toString()); |
| 106 | + await clickBetButton(f); |
| 107 | +} |
| 108 | +``` |
| 109 | + |
| 110 | +### Error Handling |
| 111 | + |
| 112 | +Always implement proper error handling: |
| 113 | + |
| 114 | +```javascript |
| 115 | +try { |
| 116 | + await placeBet(frame, betAmount); |
| 117 | +} catch (error) { |
| 118 | + logger.error('Failed to place bet:', error); |
| 119 | + // Handle error appropriately |
| 120 | +} |
| 121 | +``` |
| 122 | + |
| 123 | +## Commit Guidelines |
| 124 | + |
| 125 | +We follow conventional commit messages for clarity and automated changelog generation. |
| 126 | + |
| 127 | +### Commit Message Format |
| 128 | + |
| 129 | +``` |
| 130 | +<type>(<scope>): <subject> |
| 131 | +
|
| 132 | +<body> |
| 133 | +
|
| 134 | +<footer> |
| 135 | +``` |
| 136 | + |
| 137 | +### Types |
| 138 | + |
| 139 | +- **feat**: A new feature |
| 140 | +- **fix**: A bug fix |
| 141 | +- **docs**: Documentation changes |
| 142 | +- **style**: Code style changes (formatting, semicolons, etc.) |
| 143 | +- **refactor**: Code refactoring |
| 144 | +- **test**: Adding or updating tests |
| 145 | +- **chore**: Maintenance tasks |
| 146 | + |
| 147 | +### Examples |
| 148 | + |
| 149 | +```bash |
| 150 | +feat(strategies): add fibonacci betting strategy |
| 151 | + |
| 152 | +Implemented a new Fibonacci progression betting strategy that |
| 153 | +adjusts bet amounts based on the Fibonacci sequence. |
| 154 | + |
| 155 | +Closes #123 |
| 156 | +``` |
| 157 | + |
| 158 | +```bash |
| 159 | +fix(gameMonitor): resolve multiplier detection issue |
| 160 | + |
| 161 | +Fixed a bug where the game multiplier wasn't being correctly |
| 162 | +parsed when it exceeded 10x. |
| 163 | +``` |
| 164 | +
|
| 165 | +## Pull Request Process |
| 166 | +
|
| 167 | +1. **Update documentation** if you've changed functionality |
| 168 | +2. **Add tests** for new features when applicable |
| 169 | +3. **Ensure all tests pass** before submitting |
| 170 | +4. **Update the README.md** if needed |
| 171 | +5. **Follow the PR template** (if provided) |
| 172 | +6. **Link related issues** in your PR description |
| 173 | + |
| 174 | +### PR Title Format |
| 175 | + |
| 176 | +Use the same format as commit messages: |
| 177 | + |
| 178 | +``` |
| 179 | +feat(betManager): implement auto-cashout functionality |
| 180 | +``` |
| 181 | + |
| 182 | +### PR Description Template |
| 183 | + |
| 184 | +```markdown |
| 185 | +## Description |
| 186 | +Brief description of what this PR does |
| 187 | +
|
| 188 | +## Type of Change |
| 189 | +- [ ] Bug fix |
| 190 | +- [ ] New feature |
| 191 | +- [ ] Breaking change |
| 192 | +- [ ] Documentation update |
| 193 | +
|
| 194 | +## Testing |
| 195 | +Describe how you tested your changes |
| 196 | +
|
| 197 | +## Screenshots (if applicable) |
| 198 | +Add screenshots to demonstrate changes |
| 199 | +
|
| 200 | +## Checklist |
| 201 | +- [ ] My code follows the project's style guidelines |
| 202 | +- [ ] I have commented my code where necessary |
| 203 | +- [ ] I have updated the documentation |
| 204 | +- [ ] My changes generate no new warnings |
| 205 | +- [ ] I have tested my changes |
| 206 | +``` |
| 207 | +
|
| 208 | +## Reporting Bugs |
| 209 | +
|
| 210 | +### Before Submitting a Bug Report |
| 211 | +
|
| 212 | +- **Check existing issues** to avoid duplicates |
| 213 | +- **Test with the latest version** of the code |
| 214 | +- **Collect relevant information** (error logs, screenshots, etc.) |
| 215 | +
|
| 216 | +### Bug Report Template |
| 217 | +
|
| 218 | +```markdown |
| 219 | +**Describe the bug** |
| 220 | +A clear description of what the bug is. |
| 221 | +
|
| 222 | +**To Reproduce** |
| 223 | +Steps to reproduce the behavior: |
| 224 | +1. Go to '...' |
| 225 | +2. Click on '...' |
| 226 | +3. See error |
| 227 | +
|
| 228 | +**Expected behavior** |
| 229 | +What you expected to happen. |
| 230 | +
|
| 231 | +**Screenshots** |
| 232 | +If applicable, add screenshots. |
| 233 | +
|
| 234 | +**Environment:** |
| 235 | +- OS: [e.g., Windows 10, Ubuntu 20.04] |
| 236 | +- Node.js version: [e.g., 14.17.0] |
| 237 | +- Browser: [e.g., Chrome 95] |
| 238 | +
|
| 239 | +**Additional context** |
| 240 | +Any other context about the problem. |
| 241 | +``` |
| 242 | +
|
| 243 | +## Suggesting Enhancements |
| 244 | +
|
| 245 | +### Enhancement Suggestion Template |
| 246 | +
|
| 247 | +```markdown |
| 248 | +**Is your feature request related to a problem?** |
| 249 | +A clear description of the problem. |
| 250 | +
|
| 251 | +**Describe the solution you'd like** |
| 252 | +A clear description of what you want to happen. |
| 253 | +
|
| 254 | +**Describe alternatives you've considered** |
| 255 | +Other solutions or features you've considered. |
| 256 | +
|
| 257 | +**Additional context** |
| 258 | +Any other context, screenshots, or examples. |
| 259 | +``` |
| 260 | + |
| 261 | +## Questions? |
| 262 | + |
| 263 | +If you have questions about contributing, feel free to: |
| 264 | + |
| 265 | +- Open an issue with the `question` label |
| 266 | +- Check existing documentation in the repository |
| 267 | + |
| 268 | +## Recognition |
| 269 | + |
| 270 | +Contributors will be recognized in our project documentation. Thank you for helping make this project better! |
| 271 | + |
| 272 | +--- |
| 273 | + |
| 274 | +**Note**: This is an open-source project for educational purposes. Please ensure your contributions align with ethical use and legal compliance. |
0 commit comments