# Contributing

> How to report bugs, suggest ideas and send pull requests to OpenNodd.

Bug reports, ideas and pull requests are all welcome. The code is at <https://github.com/opennodd/opennodd>.

## Before you start

- **Small fixes** such as typos and clear bugs: open a pull request.
- **Bigger changes:** open an issue first, so we can agree on the approach before you spend time.
- **Security problems:** do not open an issue. See [Security](/project/security).

## Working on the code

You need Node.js 22.5 or newer and pnpm 9.

```sh
pnpm install
pnpm build
pnpm test                         # unit tests (embedded Postgres, nothing to install)
cd gateway && npm run e2e         # browser tests (needs Chrome or Chromium)
```

To run the server while you work:

```sh
pnpm dev            # gateway with reload, at http://localhost:7420 (web app at /app)
pnpm nodd --help    # run the CLI from source
```

To run the tests against a real Postgres server:

```sh
TEST_DATABASE_URL=postgres://user:pass@localhost:5432/postgres pnpm test
```

Keep pull requests focused, add a test for what you change, and make sure `pnpm test` and `pnpm typecheck` pass. Use plain words in the app and in messages: write for people, not for developers.

## Contributor license agreement

OpenNodd is free under the AGPL-3.0, and it is also offered under a commercial license, which pays for its development. So that your contribution can be part of both, you agree to the [Contributor License Agreement](https://github.com/opennodd/opennodd/blob/main/CLA.md) once, before your first pull request is merged. A bot on the pull request asks you to confirm, and it takes one click.

You keep the copyright of your work. The agreement only lets the project include it under the AGPL-3.0 and under its commercial licenses.

## Improving these docs

The documentation lives in the `docs/pages` folder of the repository. Each page is a Markdown file, and `nav.json` lists the pages in the sidebar. Fixes are welcome as pull requests.
