# Contributing

joinstr is free software under the MIT License. Contributions of code, design, testing, research and docs are welcome.

## Repositories

| Repository | Contents |
|---|---|
| [invincible-privacy/joinstr](https://gitlab.com/invincible-privacy/joinstr) | Electrum plugin (`plugin/`), web UI (`gui/`), daemon and CLI (`cli/`), container build (`contrib/docker`), release notes and NIP.md |
| [invincible-privacy/joinstr-kmp](https://gitlab.com/invincible-privacy/joinstr-kmp) | Kotlin Multiplatform app for Android, desktop and iOS |
| [QcMrHyde/sparrow-joinstr](https://github.com/QcMrHyde/sparrow-joinstr) | Sparrow Wallet fork |
| [rust-joinstr/joinstr](https://github.com/rust-joinstr/joinstr) | Rust library and Dart bindings |
| [1440000bytes/docs.joinstr.xyz](https://gitlab.com/1440000bytes/docs.joinstr.xyz) | These docs |

## Workflow

1. Open an issue first for anything larger than a small fix, so the approach can be agreed.
2. Fork the repository and create a branch from the latest `main`.
3. Keep each merge request to one change, with tests where the code has them.
4. Rebase on `main` before you open the merge request.

## Running the tests

The main repository has three Python test suites that run in GitLab CI on every branch and merge request. The plugin suite uses `electrum_ecc` with the system libsecp256k1, like Electrum itself. It uses `coincurve` only for a reference implementation it compares against.

```sh
sudo apt-get install libsecp256k1-dev
ELECTRUM_ECC_DONT_COMPILE=1 pip install pytest aiohttp coincurve "electrum-ecc>=0.0.4,<0.1"
python -m pytest plugin/tests/ -v

pip install -r cli/requirements.txt pytest
python -m pytest cli/tests/

pip install -r gui/requirements.txt pytest
python -m pytest gui/tests/
```

Some plugin tests run against a real Electrum and a regtest node when you set `JOINSTR_REAL_ELECTRUM=1` and `JOINSTR_BITCOIN_CLI="bitcoin-cli -regtest"`.

The Android app builds with JDK 17. See its [README](https://gitlab.com/invincible-privacy/joinstr-kmp) for the Gradle tasks of each platform.

## Design

UI and UX work happens in the [joinstr Figma file](https://www.figma.com/file/UtMGwoJPpL8FNUmsdqYoeQ/joinstr-%F0%9F%A6%83-Design). Screenshots in these docs are taken in dark mode.

## Research

Privacy researchers can review the [protocol](../protocol/index.md), the [security model](../how-it-works/security.md) and the [research projects](../research/index.md). Report vulnerabilities through the [security policy](security-policy.md) and share ideas on the [forum](https://forum.joinstr.xyz).

## Docs

These docs are built with MkDocs Material from markdown in [1440000bytes/docs.joinstr.xyz](https://gitlab.com/1440000bytes/docs.joinstr.xyz). Every page has an edit link. Preview your changes locally with these commands.

```sh
pip install -r requirements.txt
mkdocs serve
```
