Skip to content

feat: add infrastructure essentials - #6

Open
aabrius wants to merge 2 commits into
masterfrom
feature/infrastructure-essentials
Open

aabrius wants to merge 2 commits into
masterfrom
feature/infrastructure-essentials

Conversation

@aabrius

@aabrius aabrius commented Dec 7, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Adds health check endpoints (/health, /health/ready, /health/live)
  • Implements @public() decorator for unauthenticated routes
  • Integrates with NestJS Terminus for health indicators
  • Adds 23 unit tests for health controller and public decorator

Test plan

  • Run npm test -- --testPathPattern="health.controller|public.decorator" to verify all tests pass
  • Verify health endpoints return correct status

🤖 Generated with Claude Code

aabrius and others added 2 commits December 6, 2025 22:14
- Add rate limiting with @nestjs/throttler (10/s, 100/m, 1000/h)
- Add in-memory caching with @nestjs/cache-manager
- Add health check endpoints with @nestjs/terminus (/health, /ready, /live)
- Add structured logging with Pino (pino-pretty in dev)
- Add @public() decorator for skipping JWT auth on public routes
- Add request ID middleware (X-Request-ID header)
- Update JWT guard to support @public() decorator
- Configure Redis environment variables for future production use

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add health.controller.spec.ts with 15 tests covering:
  - Main health check (database, heap, RSS)
  - Kubernetes readiness probe
  - Kubernetes liveness probe
- Add public.decorator.spec.ts with 8 tests covering:
  - IS_PUBLIC_KEY constant
  - Method-level decorator
  - Class-level decorator
  - Reflector metadata access
- Add Jest moduleNameMapper for src/* path resolution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 7, 2025

Copy link
Copy Markdown

Warning

Rate limit exceeded

@aabrius has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 28 minutes and 29 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 793cb77 and b44c96a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • apps/backend/.env.example (1 hunks)
  • apps/backend/package.json (2 hunks)
  • apps/backend/src/app.module.ts (2 hunks)
  • apps/backend/src/auth/decorators/index.ts (1 hunks)
  • apps/backend/src/auth/decorators/public.decorator.spec.ts (1 hunks)
  • apps/backend/src/auth/decorators/public.decorator.ts (1 hunks)
  • apps/backend/src/auth/guards/jwt-auth.guard.ts (1 hunks)
  • apps/backend/src/health/health.controller.spec.ts (1 hunks)
  • apps/backend/src/health/health.controller.ts (1 hunks)
  • apps/backend/src/health/health.module.ts (1 hunks)
  • apps/backend/src/main.ts (2 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/infrastructure-essentials

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant