Thank you for considering contributing to the DDoS Protection Platform! This document provides guidelines for contributing to the project.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
- Use welcoming and inclusive language
- Be respectful of differing viewpoints
- Accept constructive criticism gracefully
- Focus on what's best for the community
- Show empathy towards other community members
Before creating a bug report, please:
- Check the existing issues to avoid duplicates
- Collect relevant information:
- OS and version
- Docker version
- Steps to reproduce
- Expected behavior
- Actual behavior
- Screenshots if applicable
- Error logs
Create an issue using this template:
**Describe the bug**
A clear description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error
**Expected behavior**
What you expected to happen.
**Screenshots**
If applicable, add screenshots.
**Environment:**
- OS: [e.g., Ubuntu 22.04]
- Docker Version: [e.g., 24.0.0]
- Browser: [e.g., Chrome 120]
**Additional context**
Any other context about the problem.Enhancement suggestions are tracked as GitHub issues. Create an issue and provide:
- Clear and descriptive title
- Detailed description of the proposed feature
- Explain why this enhancement would be useful
- List any alternative solutions considered
- Mock-ups or examples if applicable
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Make your changes
- Write or update tests
- Update documentation
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow the existing code style
- Write clear commit messages
- Include tests for new features
- Update documentation as needed
- Keep PRs focused (one feature per PR)
- Reference any related issues
- Ensure all tests pass
- Update CHANGELOG.md
See DEVELOPMENT.md for detailed setup instructions.
- Follow PEP 8 style guide
- Use type hints where possible
- Write docstrings for functions and classes
- Keep functions small and focused
- Use meaningful variable names
Example:
def calculate_entropy(data: List[str]) -> float:
"""
Calculate Shannon entropy of data.
Args:
data: List of string values
Returns:
Entropy value as float
"""
# Implementation here
pass- Use ES6+ features
- Follow Airbnb JavaScript Style Guide
- Use functional components with hooks
- Keep components small and reusable
- Use meaningful component names
Example:
/**
* Alert card component
* @param {Object} alert - Alert object with type, severity, etc.
* @returns {JSX.Element} Alert card component
*/
function AlertCard({ alert }) {
return (
<div className="alert-card">
{/* Implementation */}
</div>
);
}Follow the conventional commits specification:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(api): add endpoint for bulk rule creation
fix(frontend): resolve dashboard refresh issue
docs(readme): update installation instructions
test(backend): add tests for anomaly detector
cd backend
pytestWrite tests for:
- API endpoints
- Business logic
- Database operations
- Service functions
cd frontend
npm testWrite tests for:
- Component rendering
- User interactions
- API calls
- State management
Update documentation when:
- Adding new features
- Changing APIs
- Modifying configuration
- Updating dependencies
Documentation locations:
README.md: Project overviewQUICKSTART.md: Quick start guideDEPLOYMENT.md: Deployment instructionsDEVELOPMENT.md: Development guideCHANGELOG.md: Version history- Code comments: Inline documentation
ddos-potection/
├── backend/ # Python backend
│ ├── models/ # Database models
│ ├── routers/ # API routes
│ ├── services/ # Business logic
│ └── tests/ # Backend tests
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ └── services/ # API client
├── scripts/ # Integration scripts
├── docker/ # Docker configs
└── docs/ # Documentation
- Automated Checks: CI/CD runs tests and linters
- Code Review: Maintainers review code quality
- Testing: Verify functionality works as expected
- Documentation: Check docs are updated
- Approval: At least one maintainer approves
- Merge: Changes are merged to main branch
- Update version in relevant files
- Update CHANGELOG.md
- Create release branch
- Test thoroughly
- Create GitHub release
- Deploy to production
- GitHub Issues: Report bugs or ask questions
- Discussions: General questions and ideas
- Discord: Real-time chat (coming soon)
- Email: support@ispbills.com
Contributors are recognized in:
- CHANGELOG.md
- GitHub contributors page
- Release notes
Thank you for contributing to making the internet safer! 🛡️
By contributing, you agree that your contributions will be licensed under the MIT License.