# Contributing

> Build, test and commit changes to geolith search.

## Setup

The `geolith-glx` reader is a private git dependency. Cargo needs GitHub access and this setting:

```bash
export CARGO_NET_GIT_FETCH_WITH_CLI=true
```

You do not need Postgres or any database.

## Checks

Run all three before every commit:

```bash
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
```

## Tests

Tests answer from a small `.glx` fixture. `tests/common/mod.rs` builds it with the same writer that geolith uses. Never mock the store.

## API docs

The OpenAPI document comes from the `#[utoipa::path]` attributes on the handlers. After changing them, review the snapshot:

```bash
cargo insta review
```

## Commits

Use conventional commits with a lowercase subject: `feat`, `fix`, `perf`, `refactor`, `test`, `docs`, `ci`, `chore`.
