Thank you for your interest in contributing to Mantle! This document explains how to get involved.
Open a GitHub Issue with:
- Mantle version (
mantle version) - Steps to reproduce
- Expected vs actual behavior
- Relevant logs or error messages
Open a GitHub Issue with the enhancement label. Describe the use case, not just the solution.
- Go 1.25+
- Docker (for local Postgres via docker-compose)
- Make
git clone https://github.com/dvflw/mantle.git
cd mantle
docker-compose up -d # Start Postgres
make build # Build binary
make test # Run tests
make lint # Run lintermake test # Unit + integration tests
go test ./internal/... # All internal packages
go test -race ./... # With race detectorIntegration tests use testcontainers and require Docker.
- Run
gofmtandgolangci-lintbefore committing - Follow existing patterns in the codebase
- Keep functions focused and files small
- Add tests for new functionality
- Fork the repository
- Create a feature branch from
main - Write tests first (TDD encouraged)
- Ensure
make testandmake lintpass - Use conventional commit messages:
feat:new featurefix:bug fixdocs:documentationrefactor:code change that neither fixes nor addstest:adding or updating testschore:maintenance
- Open a PR against
mainwith a clear description
- New code should include unit tests
- Database-dependent tests should use testcontainers
- Connector tests should use mock HTTP servers
- Aim for test coverage on all non-trivial logic
All changes to Mantle follow a controlled process from development through production deployment.
Every pull request runs the full CI suite before it can be merged:
go test ./...-- unit and integration testsgo vet ./...-- static analysisgolangci-lint run-- linter checksgovulncheck ./...-- known vulnerability scanninggosec ./...-- security-focused static analysis
PRs with failing checks are not merged.
Mantle is deployed to production via Helm:
helm upgrade mantle charts/mantle --set image.tag=<version>The Helm chart includes a pre-upgrade hook that runs database migrations before the new binary starts serving traffic.
If a release introduces a problem, roll back with Helm and verify migration state:
helm rollback mantle <revision>
mantle migrate statusMigrations are forward-only. Rolling back the binary is safe as long as the database schema remains compatible with the older version. Check mantle migrate status to confirm.
By contributing, you agree that your contributions will be licensed under the project's Business Source License 1.1.