Thank you for your interest in contributing to the Notes API! This document provides guidelines for contributing to the project.
This project adheres to a code of conduct. By participating, you are expected to uphold this code.
- Use GitHub issues to report bugs or request features
- Search existing issues before creating a new one
- Provide detailed information including:
- Go version
- Operating system
- Steps to reproduce
- Expected vs actual behavior
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Add tests for new functionality
- Run tests:
make test - Run linter:
make lint - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
# Clone your fork
git clone https://github.com/hemantgithubpro/notes-api.git
cd notes-api
# Install dependencies
go mod download
# Install development tools
make install-tools
# Start development environment
make compose-up
make migrate-up
# Run tests
make test
# Run linter
make lint- Follow Effective Go guidelines
- Use
gofmtfor formatting - Write meaningful commit messages
- Add comments for exported functions and types
- Maintain test coverage above 70%
- Write unit tests for new functions
- Write integration tests for API endpoints
- Ensure all tests pass before submitting PR
- Test both success and error scenarios
- Update README.md if adding new features
- Update OpenAPI spec for API changes
- Add inline code comments
- Update configuration documentation
notes-api/
├── cmd/notes-api/ # Main application
├── internal/ # Private application code
│ ├── config/ # Configuration
│ ├── db/ # Database layer
│ ├── http/ # HTTP handlers and routing
│ ├── notes/ # Business logic
│ └── observability/ # Logging, metrics, tracing
├── deployments/ # Deployment configurations
└── docs/ # Documentation
Feel free to open an issue for questions or reach out to me.
Thank you for contributing!