This project is an API Gateway for the Ticketly microservices platform, built with Spring Cloud Gateway and WebFlux. It routes requests to backend services, handles CORS, and secures endpoints using OAuth2 JWT tokens (Keycloak).
- Routing: Forwards requests to event, order, and payment services.
- Security: OAuth2 JWT validation via Keycloak.
- CORS: Configured for local and production frontends.
- Logging: Detailed logging for debugging and development.
- Java 17+
- Maven
- Keycloak (for OAuth2/JWT)
- Backend microservices (event-seating, event-query, order, payment)
Configuration is managed via application.yml. Key environment variables:
KEYCLOAK_ISSUER_URIKEYCLOAK_JWK_SET_URIEVENT_SEATING_SERVICE_URIEVENT_QUERY_SERVICE_URIORDER_SERVICE_URIPAYMENT_SERVICE_URI
-
Clone the repository.
-
Set required environment variables or update
application.yml. -
Build and run:
mvn clean package java -jar target/infra-api-gateway-*.jar -
The gateway will start on port
8088by default.
/api/event-seating/**→ Event Seating Service/api/event-query/**→ Event Query Service/api/order/**→ Order Service/api/payment/**→ Payment Service
/api/event-query/**is public.- All other routes require a valid JWT.
MIT