Thank you for your interest in contributing to Streaming Backend! We welcome contributions from the community.
This project follows a code of conduct to ensure a welcoming environment for all contributors. Please read our Code of Conduct before participating.
If you find a bug, please create an issue using the Bug Report template. Include:
- A clear title and description
- Steps to reproduce
- Expected vs. actual behavior
- Environment details (Go version, OS, etc.)
- Screenshots if applicable
Feature requests are welcome! Use the Feature Request template and include:
- A clear description of the feature
- Why it would be useful
- Any implementation ideas
- Fork the repository on GitHub
- Clone your fork locally
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes following our coding standards
- Add tests for new functionality
- Run tests to ensure everything works:
go test ./... - Commit your changes with clear, descriptive messages
- Push to your fork and create a Pull Request
- Go 1.22 or later
- Git
-
Clone the repository:
git clone https://github.com/yourusername/streaming-backend.git cd streaming-backend -
Install dependencies:
go mod tidy
-
Copy environment file:
cp .env.example .env # Edit .env with your TMDB API key for testing -
Run the server:
go run cmd/server/main.go
- Run unit tests:
go test ./... - Run with race detection:
go test -race ./... - Run with coverage:
go test -cover ./...
We use golangci-lint for code quality. Run it locally:
golangci-lint run- Follow standard Go formatting (
go fmt) - Use
gofmtorgoimportsfor imports - Write clear, concise comments for exported functions/types
- Use meaningful variable and function names
- Handle errors appropriately
- Write tests for new functionality
Use clear, descriptive commit messages:
feat: add rate limiting middleware
fix: handle empty TMDB responses
docs: update API documentation
- Use a clear title and description
- Reference any related issues
- Ensure CI checks pass
- Keep PRs focused on a single feature/fix
- Update documentation if needed
streaming-backend/
├── cmd/server/ # Application entry point
├── internal/
│ ├── cache/ # Caching logic
│ ├── handlers/ # HTTP handlers
│ ├── metrics/ # Metrics collection
│ └── middleware/ # HTTP middleware
├── public/ # Static assets
├── .github/ # GitHub templates and workflows
├── Dockerfile # Container build
└── docs/ # Documentation
- Write unit tests for all new functions
- Aim for good test coverage
- Use table-driven tests where appropriate
- Test error conditions
- Mock external dependencies when possible
- Update README.md for significant changes
- Add comments to exported functions
- Update API documentation in code
- Check existing issues and documentation first
- Join our discussions for questions
- Contact maintainers for sensitive matters
Thank you for contributing to Streaming Backend! 🎉