Add simple GET /health endpoint for readiness probes #667

Open
pook wants to merge 62 commits from feat/simple-health-endpoint into main
Owner

Summary

  • Adds a lightweight GET /health endpoint registered before all middleware (logging, auth, CSRF) so it is accessible without credentials and does not appear in request logs
  • Returns 200 with { status: "ok", timestamp: "..." } for container orchestration readiness probes
  • Comprehensive health check remains available at GET /api/health

Test plan

  • 3 new tests for /health: status code, JSON shape, content-type
  • All 11 health tests pass (bun test)
  • Type check passes (tsc --noEmit)

🤖 Generated with Claude Code

## Summary - Adds a lightweight `GET /health` endpoint registered **before** all middleware (logging, auth, CSRF) so it is accessible without credentials and does not appear in request logs - Returns `200` with `{ status: "ok", timestamp: "..." }` for container orchestration readiness probes - Comprehensive health check remains available at `GET /api/health` ## Test plan - [x] 3 new tests for `/health`: status code, JSON shape, content-type - [x] All 11 health tests pass (`bun test`) - [x] Type check passes (`tsc --noEmit`) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add simple GET /health endpoint for container readiness probes
Some checks are pending
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Waiting to run
331a7425a6
Register a lightweight health check before all middleware so it returns
200 with { status, timestamp } without hitting logging, auth, or CSRF.
The comprehensive health check remains at /api/health.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: issue #664 add-a-get-health-endpoint-before-auth-mi (agent task liancebot664)
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled
8385f2ea2c
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • .forgejo/workflows/ci.yml
  • bun.lock
  • package.json
  • packages/api/src/db/schema.ts
  • packages/api/src/index.ts
  • packages/api/src/middleware/csrf.ts
  • packages/api/src/middleware/rate-limit.ts
  • packages/api/src/middleware/security-headers.ts
  • packages/api/src/routes/admin.ts
  • packages/api/src/routes/billing.ts
  • packages/api/src/routes/generate-tos.ts
  • packages/api/src/routes/generate.ts
  • packages/api/src/routes/health.ts
  • packages/api/src/routes/questionnaire.ts
  • packages/api/src/services/document-generator.ts
  • packages/api/src/services/llm.ts
  • packages/api/src/templates/index.ts
  • packages/api/tsconfig.json
  • packages/shared/src/types.ts
  • packages/web/src/app/questionnaire/page.tsx
  • packages/web/src/components/documents/DocumentList.tsx
  • packages/web/src/components/questionnaire/ReviewStep.tsx
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/simple-health-endpoint:feat/simple-health-endpoint
git switch feat/simple-health-endpoint
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot!667
No description provided.