Thank you for your interest in contributing to Replicant!
Prerequisites
- Elixir 1.15+ and Erlang/OTP 26+
- PostgreSQL 16 with
wal_level=logical(for integration tests) — e.g.docker run -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 postgres:16
Getting Started
git clone https://github.com/baselabs/replicant.git
cd replicant
mix deps.get
mix test
Development Workflow
- Work directly on
main(or a short-lived branch if required by your workflow). - Make your changes with clear, descriptive commit messages.
- Ensure all checks pass before opening a PR:
mix format # Format code
mix credo --strict # Lint
mix compile --warnings-as-errors # Zero warnings
mix test # Run tests
mix dialyzer # Type checking
mix audit # Dependency + Hex advisory audit
# or all quality gates at once:
mix quality
- Update
CHANGELOG.mdunder[Unreleased]. - Open a Pull Request against
main.
Code Style
- Use
mix format—.formatter.exsholds the config. - Add
@moduledocand@docto public modules and functions. - Read
AGENTS.mdbefore changing decoder, assembler, identifier, or telemetry code — its Critical Rules (no row values in errors/logs/telemetry, validated identifiers, transaction-granularity exactly-once, TOAST-sentinel handling, tenant-blindness) are binding.
License
By contributing, you agree that your contributions will be licensed under the MIT License.