2.0 KB
CONTRIBUTING.md
Contributing to ReadySite
Thank you for your interest in contributing to ReadySite! This document provides guidelines and instructions for contributing.
Development Setup
Prerequisites
- Go 1.24+
- Docker (for deployment testing)
- Git
Getting Started
# Clone the repository
git clone https://github.com/readysite/readysite.git
cd readysite
# Install dependencies
go mod download
# Run the example app
go run ./example
# Run the website CMS
go run ./website
Running Tests
# Run all tests
go test ./...
# Run tests with verbose output
go test -v ./...
# Run tests for a specific package
go test -v ./pkg/database/...
Code Style
- Follow standard Go conventions (
gofmt,golint) - Use meaningful variable and function names
- Add comments for exported functions and types
- Keep functions focused and small
Key Conventions
- IDs are always strings - Use UUIDs, never integers
- SQL uses PascalCase -
WHERE UserID = ?notuser_id - Templates by filename -
{{template "card.html" .}}not path - Controller access -
{{home.Method}}not{{.home.Method}} - Always use parameterized queries - Never concatenate user input
Pull Request Process
- Fork the repository and create your branch from
main - Write tests for new functionality
- Ensure all tests pass before submitting
- Update documentation if needed
- Submit a pull request with a clear description
PR Guidelines
- Keep PRs focused and small when possible
- Include a clear description of changes
- Reference any related issues
- Add tests for bug fixes and new features
Reporting Issues
When reporting issues, please include:
- Go version (
go version) - Operating system
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs or error messages
Code of Conduct
- Be respectful and inclusive
- Focus on constructive feedback
- Help others learn and grow
License
By contributing, you agree that your contributions will be licensed under the MIT License.