Contributing Guidelines - usmantahirr/infobip-notification-service GitHub Wiki
Thank you for your interest in contributing to the Infobip Notification Service! This document provides guidelines and instructions for contributing to the project.
By participating in this project, you agree to abide by our Code of Conduct. Please read it before contributing.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/infobip-notification-service.git cd infobip-notification-service
- Create a new branch:
git checkout -b feature/your-feature-name
- Install dependencies:
npm install
- Set up environment:
cp .env.example .env # Edit .env with your credentials
- Use TypeScript for all new code
- Follow the existing code style
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions small and focused
- Write tests for new features
- Update existing tests when modifying code
- Run tests before submitting PR:
npm test
- Update relevant documentation
- Add JSDoc comments for new functions
- Update API documentation if needed
- Add examples for new features
-
Keep commits focused and atomic
-
Write clear commit messages:
type(scope): description [optional body] [optional footer]
Types:
- feat: New feature
- fix: Bug fix
- docs: Documentation
- style: Code style
- refactor: Code refactoring
- test: Testing
- chore: Maintenance
-
Keep branches up to date:
git fetch origin git rebase origin/main
-
Update your branch with latest changes:
git fetch origin git rebase origin/main
-
Run tests and linting:
npm test npm run lint
-
Create a Pull Request:
- Use the PR template
- Provide a clear description
- Link related issues
- Add screenshots if applicable
-
Address review comments:
- Respond to all comments
- Make requested changes
- Push updates to your branch
src/
├── config/ # Configuration files
├── controllers/ # Route controllers
├── middleware/ # Express middleware
├── routes/ # API routes
├── schemas/ # Request/Response schemas
├── services/ # Business logic
├── errors/ # Error handling
└── app.ts # Application entry point
- Email notifications
- SMS notifications
- Rate limiting
- Input validation
- Error handling
- Logging
-
High Priority
- Message queue integration
- Database integration
- Enhanced error handling
-
Medium Priority
- Caching layer
- Health check endpoints
- Metrics collection
-
Low Priority
- Advanced monitoring
- A/B testing
- Analytics dashboard
- Use custom error classes
- Provide meaningful error messages
- Include error details when helpful
- Log errors appropriately
- Never commit sensitive data
- Use environment variables
- Validate all inputs
- Follow security best practices
- Optimize database queries
- Use caching when appropriate
- Monitor response times
- Profile code for bottlenecks
- Write unit tests
- Add integration tests
- Include edge cases
- Test error scenarios
-
Code Review
- Check code style
- Verify functionality
- Review test coverage
- Validate documentation
-
Security Review
- Check for vulnerabilities
- Verify input validation
- Review error handling
- Check authentication
-
Performance Review
- Check response times
- Verify resource usage
- Review caching
- Check scalability
-
Version Bumping
- Update package.json
- Update CHANGELOG.md
- Tag the release
-
Documentation
- Update API docs
- Update README
- Update wiki pages
-
Deployment
- Run tests
- Build package
- Publish to npm
- Deploy to production
- Open an issue for bugs
- Use discussions for questions
- Join our community chat
- Check the documentation
Contributors will be recognized in:
- CHANGELOG.md
- README.md
- Release notes
- Contributor hall of fame
By contributing, you agree that your contributions will be licensed under the project's MIT License.
Last updated: March 2025