> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usetendr.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Local setup

See the repository root `README.md` and `CONTRIBUTING.md` for the full walkthrough.

The API and worker need **PostgreSQL** and **Redis**; both run from `infra/docker/docker-compose.yml` (Postgres on host port 5433, Redis on 6380):

```bash theme={null}
docker compose -f infra/docker/docker-compose.yml up -d
npm install
npm run build --workspace=@tendr/contracts
npm run db:migrate:dev --workspace=@tendr/api    # dev database
npm run db:migrate:test --workspace=@tendr/api   # test database used by npm test
npm run db:seed
npm run dev                                      # web, api and worker
```

`npm run db:seed` creates the Demo Merchant and prints four API keys once: `tdr_test_…` and `tdr_live_…` (secret), `tdr_pk_test_…` and `tdr_pk_live_…` (publishable). Rerunning prints "already seeded". Live mode gets a settlement config only when `SEED_PAYOUT_ADDRESS` is set to a real EVM payout address; the zero address is refused.

Locally, keys and secrets use the file-based key vault (`KEYVAULT_DRIVER=local`, `.keyvault/local.json`). Production uses Google Cloud KMS; check a GCP project with `npm run kms:verify --workspace=@tendr/api`.

Health checks: `GET http://localhost:4000/v1/health` (api) and `GET http://localhost:4100/health` (worker).

PWA service workers require HTTPS (or localhost). Offline mode disables payment actions and never claims success.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.