Skip to content

Latest commit

 

History

History
98 lines (72 loc) · 2.58 KB

File metadata and controls

98 lines (72 loc) · 2.58 KB

Contributing to Notes API

Thank you for your interest in contributing to the Notes API! This document provides guidelines for contributing to the project.

Code of Conduct

This project adheres to a code of conduct. By participating, you are expected to uphold this code.

How to Contribute

Reporting Issues

  • 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

Pull Requests

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Add tests for new functionality
  5. Run tests: make test
  6. Run linter: make lint
  7. Commit your changes: git commit -m 'Add amazing feature'
  8. Push to the branch: git push origin feature/amazing-feature
  9. Open a Pull Request

Development Setup

# 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

Coding Standards

  • Follow Effective Go guidelines
  • Use gofmt for formatting
  • Write meaningful commit messages
  • Add comments for exported functions and types
  • Maintain test coverage above 70%

Testing

  • 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

Documentation

  • Update README.md if adding new features
  • Update OpenAPI spec for API changes
  • Add inline code comments
  • Update configuration documentation

Project Structure

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

Questions?

Feel free to open an issue for questions or reach out to me.

Thank you for contributing!