# anchorage Highly-available, multi-tenant IPFS Pinning Service wire-compatible with the [IPFS Pinning Services API spec](https://ipfs.github.io/pinning-services-api-spec/). Each anchorage instance is paired 1:1 with its own Kubo daemon and joins an embedded NATS cluster for signaling. Postgres is the source of truth for all durable state (pins, placements, orgs, users, tokens, audit log). Status: **skeleton complete**, milestones 1–22 all landed end-to-end. The in-memory store is in place for dev; the pgx-backed store slots in once sqlc generates the code from [sqlc.yaml](sqlc.yaml) + [queries/](internal/pkg/store/postgres/queries/). See: - [docs/architecture.md](docs/architecture.md) - [docs/cluster-ops.md](docs/cluster-ops.md) — drain / maintenance procedures - [docs/auth-flow.md](docs/auth-flow.md) — how anchorage handles humans + API clients - [docs/authentik-setup.md](docs/authentik-setup.md) — configuring Authentik as the OIDC provider - [deploy/README.md](deploy/README.md) — deb/rpm install + Swarm stack deploy ## Quickstart (dev) ```bash make build ./bin/anchorage version ``` ## Layout - `cmd/anchorage/` — thin `main` entry point. - `internal/cmd/` — Cobra command tree (`version`, soon `serve`, `migrate`, `admin`). - `internal/app/anchorage/` — composition root (wires deps, lifecycle). - `internal/pkg/` — domain packages (`config`, `store`, `pin`, `ipfs`, ...). - `configs/` — example Viper YAML. - `docs/` — architecture, auth flow, operations. ## Development ```bash make check # fmt + vet + lint + test + vuln make test # go test -race ./... make build # ./bin/anchorage ```