> For the complete documentation index, see [llms.txt](https://docs.bitsafe.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitsafe.finance/product-suite/decentralization-manager/contributing-guide.md).

# Contributing Guide

Development setup, coding standards, commit conventions, and the PR process.

Contributions to the Decentralization Manager are welcome. This guide covers setting up a development environment, the coding standards, commit conventions, and the pull request process. Please also review the project's Code of Conduct, and report any vulnerabilities via the Security Policy.

## Development setup

The backend is built with the Rust toolchain and the frontend is a React application embedded into the Rust binary at build time. Build with cargo build (add --release for a release build), and for the frontend run npm install and npm run dev for a hot-reloading development server, or npm run build for a production build.

```
# Build the backend (add --release for an optimized build)
cargo build

# Frontend (run from the frontend/ directory)
npm install
npm run dev    # hot-reloading dev server
npm run build  # production build
```

## Coding standards

Format Rust code with cargo fmt and lint with cargo clippy --all-targets --all-features -- -D warnings, which treats warnings as errors. Run cargo test for unit tests before opening a pull request.

```
# Format code
cargo fmt

# Lint (warnings treated as errors)
cargo clippy --all-targets --all-features -- -D warnings

# Run unit tests
cargo test
```

## Testing

The integration test boots a local Canton network, spawns three manager instances, configures peers, and runs an end-to-end governance workflow covering onboarding, DAR distribution, governance contract deployment, the plugin scenarios, and the kick workflow. Run it with ./integration-tests/run.sh, adding --verbose when diagnosing a stuck or failing run. The same suite can run against a real Canton devnet cluster with ./integration-tests/run.sh --target devnet.

```
# Run the integration test suite (quiet mode by default)
./integration-tests/run.sh

# Verbose mode when diagnosing a stuck or failing run
./integration-tests/run.sh --verbose

# Run against a real Canton devnet cluster
./integration-tests/run.sh --target devnet
```

## Commit conventions and pull requests

Follow the repository's commit message conventions and open a pull request for review. Ensure formatting, linting, and tests pass before requesting review, and keep changes focused so they are straightforward to review and merge.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bitsafe.finance/product-suite/decentralization-manager/contributing-guide.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
