Skip to content

[BE-30] Build HealthModule using @nestjs/terminus #492

@mftee

Description

@mftee

Problem

@nestjs/terminus is installed as a dependency but never configured. There is no health check endpoint, making it impossible for deployment pipelines, load balancers, or monitoring tools to verify that the application and its dependencies are running correctly.

Proposed Solution

Create a HealthModule inside backend/src/module/health/ using @nestjs/terminus that checks all critical dependencies.

Acceptance Criteria

  • GET /api/module/health returns a JSON health report
  • Report checks PostgreSQL connectivity using TypeOrmHealthIndicator
  • Report checks Redis connectivity using a custom health indicator that pings the Redis connection used by BullMQ
  • Report checks available disk storage — warns if free space drops below 500MB
  • Returns HTTP 200 when all checks pass with status: ok
  • Returns HTTP 503 when any check fails with the failed indicator identified in the response body
  • No authentication is required for this endpoint

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions