# hydrant

`hydrant` is an AT Protocol indexer built on the `fjall` database. it's built to be flexible, supporting both full-network indexing and filtered indexing (e.g., by DID), allowing querying with XRPCs (not only `com.atproto.*`!), providing an ordered event stream, etc. oh and it can also act as a relay!

you can see [random.wisp.place](https://tangled.org/did:plc:dfl62fgb7wtjj3fcbb72naae/random.wisp.place) (standalone binary using http API) or the [statusphere example](https://tangled.org/did:plc:dfl62fgb7wtjj3fcbb72naae/hydrant/blob/main/examples/statusphere.rs) (hydrant-as-library) for examples. for rust docs you can clone the repo and run `cargo doc --open`.

## what's here

- [vs tap](https://hydrant.klbr.net/concepts/vs-tap/index.md): comparison against tap, the go sync utility
- [getting started](https://hydrant.klbr.net/getting-started/index.md): building, running, reverse proxying
- [configuration](https://hydrant.klbr.net/configuration/index.md): all environment variables
- [build features](https://hydrant.klbr.net/build-features/index.md): optional cargo features (`relay`, `backlinks`, etc.)
- [embedding](https://hydrant.klbr.net/embedding/index.md): running hydrant inside a go (or other non-rust) program
- [concepts](https://hydrant.klbr.net/concepts/index.md): how the stream works, relay comparison, multi-relay support
- [rest api](https://hydrant.klbr.net/api/index.md): management API reference
- [xrpc](https://hydrant.klbr.net/xrpc/index.md): data access via XRPC

## quick start

```bash
cargo build --release
export HYDRANT_DATABASE_PATH=./hydrant.db
./target/release/hydrant
```
