API Gateway Architecture
Overview
The RentOne platform uses Spring Cloud Gateway as the central entry point for all backend services.
Gateway Responsibilities:
- Request Routing
- JWT Authentication
- Tenant Resolution
- Global CORS Management
- Security Headers
- Rate Limiting
- Service Discovery Integration (Eureka)
- Load Balancing
Gateway Information
| Property | Value |
|---|---|
| Service Name | api-gateway |
| Port | 6002 |
| Technology | Spring Cloud Gateway |
| Service Discovery | Eureka |
| Rate Limiting | Redis |
| Reverse Proxy | Nginx |
Request Flow
Client
│
▼
Nginx
│
▼
Spring Cloud Gateway
│
├── JWT Validation
├── Rate Limiting
├── Security Headers
├── Tenant Resolution
└── Route Resolution
│
▼
Target Service
Security Configuration
The API Gateway adds the following security headers to all responses:
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=31536000
Rate Limiting
Redis-based rate limiting is configured globally and applied per client IP address.
| Property | Value |
|---|---|
| Replenish Rate | 3 Requests |
| Burst Capacity | 6 Requests |
| Requested Tokens | 1 |
CORS Configuration
Allowed Origins:
https://rentone.co.in
https://console.admin.rentone.co.in
https://cloud.rentone.co.in
https://cdn.rentone.co.in
Development Origins:
http://localhost:3000
http://localhost:4000
http://localhost:8080
Service Routing
Cloud App Service
Target: rentone-cloud-app
/cloud-app/system-info/**
/cloud-app/notification/message/**
/cloud-app/invoice-templates/**
/cloud-app/places/**
/cloud-app/delivery-zones/**
Tenant Service
Target: rentone-tenants
/rentone/tenants/**
/tenants/**
User Service
Target: rentone-users
/users/**
/users/kyc/**
Product Catalog
Target: rentone-product-catalog
/product/**
/product/category/**
/product/variants/**
/variant-stats/**
/seo/**
Inventory System
Target: inventory-system
/inventory-item/**
/inventory/item-transaction/**
/inventory-warehouse/**
Commerce Service
Target: commerce-service
/addresses/**
/cart/**
/order-draft/**
/orders/**
/delivery/assignment/**
/wishlist/**
/invoices/**
Payment Gateway
Target: payment-gateway
/rentone/payment-gateway/**
File Management
Target: central-file-mgmt
/files/**
Notification Service
Target: notifications
/notifications/error-reporting/**
/device-tokens/**
/app-notifications/**
/ws-notifications/**
Commerce Feedback Service
Target: commerce-feedback-service
/product-reviews/**
/issue-categories/**
Operation Service
Target: operation-service
/returns/**
/maintenance/**
/delivery/partner/**
/partner-tasks/**