readysite / CONTRIBUTING.md
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

  1. IDs are always strings - Use UUIDs, never integers
  2. SQL uses PascalCase - WHERE UserID = ? not user_id
  3. Templates by filename - {{template "card.html" .}} not path
  4. Controller access - {{home.Method}} not {{.home.Method}}
  5. Always use parameterized queries - Never concatenate user input

Pull Request Process

  1. Fork the repository and create your branch from main
  2. Write tests for new functionality
  3. Ensure all tests pass before submitting
  4. Update documentation if needed
  5. 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.

← Back