Skip to content

feat: add API gateway module (#648)#740

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
omonxooo-commits:feat/api-gateway-issue-648
May 31, 2026
Merged

feat: add API gateway module (#648)#740
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
omonxooo-commits:feat/api-gateway-issue-648

Conversation

@omonxooo-commits
Copy link
Copy Markdown
Contributor

Summary

Implements API gateway capabilities as described in issue #648.

Changes

  • GatewayRoutingService — weighted route registry + HTTP proxy via HttpService. Pre-seeded routes for courses, users, analytics. Runtime route registration supported.
  • GatewayRateLimitGuard — per-service/IP sliding window (1 min), limit read from route config. Returns HTTP 429 on breach.
  • RequestTransformInterceptor — strips hop-by-hop headers, injects x-correlation-id if absent, tags requests with x-gateway-version.
  • ResponseCacheInterceptor — GET-only, per-route TTL caching via CACHE_MANAGER. Cache key: gw:<service>:<path>.
  • GatewayControllerALL /gateway/:service/*path wildcard proxy + POST /gateway/routes for runtime route registration.
  • GatewayModule registered in AppModule.
  • 14/14 unit tests passing.

Acceptance Criteria

  • Request routing
  • Rate limiting enforcement
  • Request transformation
  • Response caching

Closes #648

- GatewayRoutingService: weighted route registry + HTTP proxy via HttpService
- GatewayRateLimitGuard: per-service/IP sliding window (1 min), limit from route config
- RequestTransformInterceptor: strips hop-by-hop headers, injects correlation-id
- ResponseCacheInterceptor: GET-only per-route TTL caching via CACHE_MANAGER
- GatewayController: wildcard proxy + runtime route registration endpoint
- GatewayModule registered in AppModule
- 14/14 unit tests passing
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@omonxooo-commits Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER RUKAYAT-CODER merged commit bda4ee8 into rinafcode:main May 31, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add API gateway capabilities

2 participants