How aldo1609/payment-proyect works
Project type and purpose
• This is a Spring Boot–based, microservice-style, asynchronous payment processing system implementing the producer-consumer pattern.
• It comprises three services:
• An API Gateway (“gateway”) for routing, rate-limiting and logging.
• A payment-producer service (“payment-producer”) exposing a REST API, validating requests and writing PENDING transactions to the database, then publishing payment IDs to Kafka.
• A payment-consumer service (“payment-consumer”) consuming Kafka events, invoking an external payment gateway (e.g. Stripe), and updating transaction status to COMPLETED or FAILED.
File structure
• Top-level directories:
• gateway/ – Spring Cloud Gateway service (filters, fallback, Redis rate-limit resolver, YAML config)
• payment-producer/ – Producer microservice (controllers, DTOs, services, custom validation, persistence)
• payment-consumer/ – Consumer microservice (message listener, external gateway client, services, persistence)
• Shared patterns: Spring Boot apps with Maven build, application.yml, health controllers, OpenAPI config.
• Infrastructure files: RedisConfig in gateway, application.yml for DB/Kafka connections, Redis rate limiting, Kafka listener in consumer.
README for additional insights
• Architecturally: service-to-service decoupling via Apache Kafka.
• Technology stack: Java 17, Spring Boot, Kafka, PostgreSQL, Maven.
• External dependency: payment gateway (Stripe/PayPal).
Detail but avoid over-fragmentation
• Microservices, the queue, the database and the external payment gateway.
• Config modules (e.g. RedisConfig) as notes if needed for clarity.