PayFlowX is a production-oriented payment processing platform built using Java 21, Spring Boot Microservices, RabbitMQ, PostgreSQL, Redis, Docker, Kubernetes, Prometheus, Grafana, Zipkin, Jenkins, and GitHub Actions.
The platform is designed using modern distributed system principles, event-driven communication, observability-first architecture, fault tolerance patterns, and scalable microservice design.
PayFlowX simulates the core architecture of modern fintech platforms such as Stripe, Razorpay, Adyen, and PayPal.
The platform supports:
- User Onboarding
- Authentication & Authorization
- Merchant Management
- Order Processing
- Payment Processing
- Settlement Management
- Notifications
- Audit Logging
- Distributed Tracing
- Monitoring & Alerting
- CI/CD Automation
- Containerized Deployment
The objective of the project is to demonstrate enterprise backend engineering practices and production-grade microservice architecture.
Client Applications
↓
API Gateway
↓
Discovery Server (Eureka)
↓
Microservices
- Auth Service
- User Service
- Merchant Service
- Order Service
- Payment Service
- Settlement Service
- Notification Service
- Audit Service
Infrastructure
- PostgreSQL
- RabbitMQ
- Redis
- Prometheus
- Grafana
- Zipkin
- AlertManager
- Jenkins
- GitHub Actions
- Docker
- Kubernetes
Auth Service provides centralized authentication and token management.
- JWT Authentication
- Access Token Generation
- Refresh Token Support
- Role-Based Authorization
- RSA Key Support
- Strategy Pattern Based Token Generation
- HS256
- RS256
The authentication module uses the Strategy Pattern to dynamically select the JWT signing implementation.
- USER
- ADMIN
Responsible for user lifecycle management.
- User Profile Management
- KYC Submission
- KYC Verification
- Address Management
- Account Suspension
- Account Blocking
- Eligibility Validation
- User Metrics
Responsible for merchant onboarding and management.
- Merchant Registration
- Merchant Profile Management
- Merchant Verification
- Merchant Status Management
- Merchant Validation
- Merchant Metrics
A USER can enroll and become a Merchant through the Merchant Service.
Responsible for order lifecycle management.
- Order Creation
- Order Validation
- Order Status Tracking
- Order Event Publishing
- Merchant Validation Integration
Responsible for payment processing and orchestration.
- Payment Creation
- Payment Validation
- Payment Processing
- Payment Status Management
- Payment Event Publishing
- Idempotent Payment Handling
Adapter Pattern is used for payment method routing.
Supported Payment Methods:
- Card
- UPI
- Bank Transfer
Based on user selection, the appropriate payment adapter is dynamically selected.
Responsible for merchant settlement processing.
- Settlement Generation
- Settlement Tracking
- Settlement Status Management
- Settlement Event Publishing
Responsible for platform notifications.
- Event Driven Notifications
- RabbitMQ Consumers
- Retry Processing
- Dead Letter Queue Handling
- Email Sending
Supported Notification Categories:
- User Notifications
- Merchant Notifications
- Order Notifications
- Payment Notifications
- Settlement Notifications
Acts as the platform audit trail.
- Audit Event Persistence
- Cross-Service Event Tracking
- Correlation ID Tracking
- Compliance-Oriented Event Storage
Every business-critical event is persisted for traceability.
PayFlowX uses RabbitMQ as the messaging backbone.
User Events
- USER_CREATED
- USER_KYC_SUBMITTED
- USER_KYC_APPROVED
- USER_ACCOUNT_BLOCKED
Merchant Events
- MERCHANT_CREATED
- MERCHANT_VERIFIED
- MERCHANT_SUSPENDED
Order Events
- ORDER_CREATED
- ORDER_UPDATED
Payment Events
- PAYMENT_CREATED
- PAYMENT_SUCCESS
- PAYMENT_FAILED
Settlement Events
- SETTLEMENT_CREATED
- SETTLEMENT_COMPLETED
Audit Events
- Cross-Service Audit Records
The platform incorporates multiple production-grade resilience patterns.
- Saga Pattern
- Transactional Outbox Pattern
- Idempotency Pattern
- Retry Mechanisms
- Dead Letter Queue Handling
- Resilience4j Circuit Breakers
- Resilience4j Retry
- Resilience4j Rate Limiting
These patterns ensure fault tolerance and consistency across distributed services.
Redis is used for:
- Caching
- Performance Optimization
- Fast Data Access
Implemented using:
- Spring Boot Actuator
- Micrometer
- Prometheus
Business metrics are exposed from services and visualized through Grafana.
Centralized logging configuration includes:
- Trace ID
- Span ID
- Correlation ID
Logback configuration is shared across services through a common logging strategy.
Implemented using:
- Micrometer Tracing
- Zipkin
Allows end-to-end request tracing across service boundaries.
Available Grafana Dashboards:
- API Gateway Dashboard
- Merchant Dashboard
- Orders Dashboard
- Payment Dashboard
- Settlement Dashboard
- Notification Dashboard
- Notification DLQ Dashboard
- Platform Health Dashboard
AlertManager is configured for platform alerts.
Current Alerts Include:
- Notification Dead Letter Queue Growth
- Service Health Monitoring
- Java 21
- Spring Boot
- Spring Security
- Spring Data JPA
- Spring Cloud
- OpenFeign
- PostgreSQL
- RabbitMQ
- Redis
- Micrometer
- Prometheus
- Grafana
- Zipkin
- AlertManager
- Docker
- Docker Compose
- Kubernetes
- Jenkins
- GitHub Actions
- OpenAPI 3
- Swagger UI
Automated pipeline for:
- Build Validation
- Maven Packaging
- Docker Image Creation
- GitHub Container Registry Publishing
All services are built and published independently using matrix builds.
Jenkins pipeline supports:
- Parallel Service Builds
- SonarQube Analysis
- Maven Packaging
Kubernetes resources are available for:
- Deployments
- Services
- ConfigMaps
- Secrets
- Horizontal Pod Autoscaling
- Ingress
- Namespace Isolation
payflowx-platform
│
├── services
│ ├── discovery-server
│ ├── api-gateway
│ ├── auth-service
│ ├── user-service
│ ├── merchant-service
│ ├── order-service
│ ├── payment-service
│ ├── settlement-service
│ ├── notification-service
│ └── audit-service
│
├── infra
│ ├── prometheus
│ ├── grafana
│ ├── alertmanager
│ ├── jenkins
│ └── sonarqube
│
├── k8s
│
├── docs
│
└── scripts
- Strategy Pattern (JWT Algorithm Selection)
- Adapter Pattern (Payment Method Routing)
- Saga Pattern
- Transactional Outbox Pattern
Completed:
- Microservices Architecture
- API Gateway
- Service Discovery
- Authentication & Authorization
- User Management
- Merchant Management
- Order Management
- Payment Management
- Settlement Management
- Notification Processing
- Audit Logging
- RabbitMQ Integration
- Redis Integration
- Saga Pattern
- Transactional Outbox Pattern
- Idempotency Handling
- Resilience4j
- Distributed Tracing
- Metrics & Monitoring
- Dockerization
- Kubernetes Deployment Assets
- CI/CD Pipelines
- Payment Reconciliation Engine
- Refund Management
- Partial Refund Support
- OpenTelemetry Migration
- Centralized Log Aggregation (ELK/Loki)
- Multi-Region Deployment
- Advanced Fraud Detection
This project demonstrates practical experience with:
- Distributed Systems
- Microservices Architecture
- Event-Driven Design
- Domain-Driven Service Boundaries
- Secure Authentication
- Messaging Systems
- Fault Tolerance
- Observability
- CI/CD Automation
- Kubernetes Deployments
- Enterprise Backend Development
Licensed under the MIT License.