Infrastructure specifications

Production contracts, not product claims.

Each statement maps to enforced route middleware, schema execution, or a container boundary in ARTHA OS.

01

RS256 access tokens

  • The API rejects every JWT algorithm except RS256.
  • Verification resolves the public key by the protected-header kid.
  • Access-token lifetime is capped at 15 minutes.
  • Authenticated requests resolve an active tenant membership before route execution.
02

Server-Sent Events

  • GET /events/stream provides replay plus one-second outbox polling.
  • GET /events/live provides synchronous publish with Last-Event-ID replay.
  • Both streams require an RS256 bearer token and active tenant membership.
  • Caddy disables response buffering for the production events route.
03

PostgreSQL execution

  • The Backend owns 323 Knex migration files.
  • Readiness executes SELECT 1 before returning HTTP 200.
  • The standalone CRM runs SQL migrations under a PostgreSQL advisory lock.
  • PostgreSQL is internal to the five-service Compose network.

Readiness contract

Database-backed API readiness

curl -s https://api.purusharthainfra.com/ready -H "X-Forwarded-Proto: https"
{"success":true,"data":{"status":"ready","database":"ok"},"error":null}