# Contributing

Help build the engine or improve this website.

HTML: https://igloodb.github.io/docs/contributing/
Source: https://github.com/igloodb/igloodb/blob/163320482d98bc3d6c49eb85acb0f511461a8284/CONTRIBUTING.md (reviewed revision 1633204)

## Start with the source

Igloo is open source under the MIT License. Review the architecture and roadmap, then find an issue or propose a focused change in the engine repository. Read CONTRIBUTING.md for the current development requirements.

The website lives in a separate repository, igloodb/igloodb.github.io. Documentation fixes, accessibility improvements, and better examples are welcome there.

## Engine checks

Use the Rust version specified by Cargo.toml. The standard workflow includes unit tests, formatting, and Clippy. When fixing a bug, add a meaningful regression test.

```text
cargo test --locked
cargo fmt --all -- --check
cargo clippy --all-targets --all-features --locked -- -D warnings
```

## Integration tests

Live PostgreSQL suites are gated by IGLOO_TEST_POSTGRES_URI. Use a disposable database: tests create tables, and the multi-source suite creates an additional database on the same server. The configured user needs appropriate permissions.

```text
IGLOO_TEST_POSTGRES_URI='postgres://USER:PASSWORD@localhost:5432/igloo_test' \
  cargo test --locked
```

## Website development

The website uses Next.js static export, TypeScript, and React. It has no backend dependency and builds to out/ for GitHub Pages. Install the pinned pnpm version from package.json, then run:

```text
pnpm install --frozen-lockfile
pnpm dev
# Production validation:
pnpm build
pnpm check
pnpm test:e2e
```
