Skip to main content

Contributing to Spage

We welcome contributions to Spage! This guide will help you get started with contributing to the project.

Development Setup

Prerequisites

  • Go (1.24 or later)
  • Git

Getting Started

  1. Fork the repository on GitHub

  2. Clone your fork locally:

    git clone https://github.com/YOUR_USERNAME/spage.git
    cd spage
  3. Add the upstream remote:

    git remote add upstream https://github.com/AlexanderGrooff/spage.git
  4. Install dependencies:

    go mod download
  5. Run the tests to make sure everything is working:

    make test

Development Workflow

Making Changes

  1. Create a new branch for your feature or bugfix:

    git checkout -b feature/your-feature-name
  2. Make your changes and commit them:

    git add .
    git commit -m "Add your descriptive commit message"
  3. Push your branch to your fork:

    git push origin feature/your-feature-name
  4. Create a pull request on GitHub

Code Standards

  • Follow Go conventions and use gofmt to format your code
  • Write tests for new functionality
  • Update documentation as needed
  • Ensure all tests pass before submitting a PR

Running Tests

# Run all tests
go test ./...

Types of Contributions

Bug Reports

If you find a bug, please create an issue with:

  • A clear description of the problem
  • Steps to reproduce the issue
  • Expected vs actual behavior
  • Your environment details (OS, Go version, etc.)

Feature Requests

For new features:

  • Describe the feature and its use case
  • Explain why it would be valuable
  • Consider backward compatibility

Code Contributions

We welcome:

  • Bug fixes
  • New module implementations
  • Performance improvements
  • Documentation improvements
  • Test coverage improvements

Documentation

Help improve our documentation by:

  • Fixing typos and grammar
  • Adding examples
  • Improving clarity
  • Adding missing documentation

Module Development

When adding new modules:

  1. Create the module in pkg/modules/
  2. Implement the required interfaces
  3. Add comprehensive tests
  4. Update documentation
  5. Add examples

Performance Considerations

Spage prioritizes performance. When contributing:

  • Profile your changes using the built-in profiling tools
  • Run benchmarks to ensure no performance regressions
  • Consider memory usage and allocations

Getting Help

If you need help with contributing:

  • Check existing issues and discussions
  • Create a new issue with the "question" label
  • Join our community discussions

Code of Conduct

Please be respectful and follow our code of conduct. We want to maintain a welcoming environment for all contributors.

Thank you for contributing to Spage!