Thank you for your interest in contributing to Quazaar! We welcome contributions from the community. This document provides guidelines and information for contributors.
- Use GitHub Issues to report bugs, request features, or ask questions
- Check existing issues first to avoid duplicates
- Provide detailed information including:
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Go version, etc.)
- Error messages/logs
- Fork the repository
- Create a feature branch from
main - Make your changes
- Test thoroughly
- Submit a pull request with a clear description
- Fix typos or unclear explanations
- Add missing documentation
- Create tutorials or examples
- Update API documentation
- Go 1.21 or higher
- Git
- (Optional)
playerctlfor music integration testing
-
Clone and setup
git clone https://github.com/codershubinc/Quazaar.git cd Quazaar go mod download -
Build the project
go build -o quazaar ./cmd/server
-
Run tests
go test ./... -
Run the server
./quazaar
- Follow standard Go formatting (
go fmt) - Use
gofmtandgoimportsfor consistent formatting - Follow Go naming conventions (camelCase for private, PascalCase for exported)
- Write clear, concise comments for exported functions/types
- Use meaningful variable and function names
- Keep functions small and focused on single responsibilities
- Use clear, descriptive commit messages
- Start with a verb in imperative mood (e.g., "Add", "Fix", "Update")
- Keep first line under 50 characters
- Add detailed description if needed
Examples:
Add Spotify artist WebSocket handlers
- Implement getArtistInfo and followArtist WebSocket endpoints
- Add proper error handling for API failures
- Update frontend with artist controls
- Keep packages focused and modular
- Use
internal/for private packages - Follow the established project structure
- Add tests for new functionality
- Write tests for new functions and methods
- Use Go's built-in testing framework
- Place test files alongside source files (e.g.,
handler_test.go) - Aim for good test coverage
- Test WebSocket connections and message handling
- Test API endpoints
- Use the provided test scripts in
tests/
- Test with the web client in
temp/web/ - Verify functionality across different browsers
- Test on different operating systems if possible
-
Create a branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following the guidelines above
-
Test thoroughly:
- Run existing tests:
go test ./... - Build successfully:
go build ./cmd/server - Test manually with the web client
- Run existing tests:
-
Update documentation if needed:
- Update README if adding new features
- Add API documentation for new endpoints
- Update changelog
-
Commit your changes:
git add . git commit -m "Add your descriptive commit message"
-
Push and create PR:
git push origin feature/your-feature-name
Then create a pull request on GitHub
-
Address feedback from reviewers and make necessary changes
Before submitting a PR, ensure:
- Code builds successfully (
go build ./cmd/server) - All tests pass (
go test ./...) - Code follows style guidelines (
go fmt,go vet) - No linting errors (
golangci-lint runif available) - Documentation updated if needed
- Commit messages are clear and descriptive
- Changes tested manually
- No sensitive information committed
- Bug fixes and stability improvements
- Security enhancements
- Performance optimizations
- Better error handling
- New features and integrations
- UI/UX improvements
- Documentation improvements
- Test coverage expansion
- Code refactoring and cleanup
- New themes and customization options
- Additional platform support
- Issues: Use GitHub Issues for bugs and feature requests
- Discussions: Use GitHub Discussions for questions and general discussion
- Documentation: Check the
docs/folder for detailed guides
Please be respectful and constructive in all interactions. We follow a standard code of conduct to ensure a welcoming environment for all contributors.
Contributors will be acknowledged in the project documentation and release notes. Thank you for helping make Quazaar better!
Made with ❤️ by the Quazaar community