> ## Documentation Index
> Fetch the complete documentation index at: https://285e39fd5e337e58f16290.sightscreen.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Health & config

> Health checks, readiness probes, and app configuration endpoints.

## Endpoint reference

| Method | Route           | Auth   | Purpose                               |
| ------ | --------------- | ------ | ------------------------------------- |
| `GET`  | `/health`       | Public | Basic health check                    |
| `GET`  | `/health/ready` | Public | Readiness probe (checks DynamoDB)     |
| `GET`  | `/app/config`   | Public | App version config & maintenance mode |
| `GET`  | `/`             | Public | API docs index                        |

***

## GET /health

Returns a simple `200 OK` if the server process is running. Does not check downstream dependencies.

```json theme={null}
{
  "status": "ok"
}
```

Use this for **liveness probes** in container orchestration (ECS, Kubernetes).

***

## GET /health/ready

Performs a lightweight DynamoDB operation to confirm the database is reachable. Returns `200` on success or `503 Service Unavailable` on failure.

<Tabs>
  <Tab title="Success (200)">
    ```json theme={null}
    {
      "status": "ready"
    }
    ```
  </Tab>

  <Tab title="Failure (503)">
    ```json theme={null}
    {
      "status": "not_ready",
      "error": "DynamoDB connection failed"
    }
    ```
  </Tab>
</Tabs>

Use this for **readiness probes** — your load balancer should only route traffic to instances that pass this check.

***

## GET /app/config

Returns the current app configuration. The mobile client uses this on launch to determine whether to force-update or show a maintenance screen.

<ResponseField name="minAppVersion" type="string">
  Minimum supported app version (semver). Clients below this version are force-updated.
</ResponseField>

<ResponseField name="storeUrl" type="string">
  URL to the App Store listing. Used by the force-update prompt.
</ResponseField>

<ResponseField name="maintenanceMode" type="boolean">
  When `true`, the client shows a maintenance screen and blocks all API calls.
</ResponseField>

```json theme={null}
{
  "minAppVersion": "1.2.0",
  "storeUrl": "https://apps.apple.com/app/sightscreen/id123456789",
  "maintenanceMode": false
}
```

<Note>
  These values are controlled by the environment variables `MIN_APP_VERSION`, `STORE_URL`, and `MAINTENANCE_MODE`. Changes take effect immediately without redeployment — just update the env vars and restart the service.
</Note>
