A real-time fintech transaction processing platform built with Spring Boot microservices, Apache Kafka, PostgreSQL, MongoDB, Redis, RabbitMQ, Docker, and Spring Cloud.
The system processes financial transactions through an event-driven pipeline that includes validation, fraud detection, balance updates, notifications, and transaction archiving.
Copy .env.example to .env and replace every password and JWT_SECRET before starting the stack. .env is intentionally ignored by Git.
The Docker Compose defaults expose only the frontend, API gateway, and local-only operational interfaces. Internal microservices, databases, and brokers are reachable only on the Docker network.
For an existing PostgreSQL volume, apply schema updates with ./manage.sh migrate before starting a version that requires a new table or column.
The project uses a Kafka topic pipeline where each microservice is responsible for one stage of the transaction lifecycle.
- Real-time transaction processing
- Event-driven microservice architecture
- Fraud and AML validation pipeline
- Account balance update and transaction persistence
- Email / SMS / push notification support
- PostgreSQL for operational data
- MongoDB for completed transaction archive
- Redis for cache, session, and distributed lock support
- RabbitMQ for asynchronous notification delivery
- Eureka-based service discovery
- API Gateway routing with Spring Cloud Gateway
- Immutable audit trail for account and transaction access/changes
- Docker Compose environment for all services
- Kafka UI for topic monitoring
- Java 21
- Spring Boot
- Spring Cloud Gateway
- Spring Security
- Spring Data JPA
- Hibernate
- Spring Cloud Netflix Eureka
- Apache Kafka
- Kafka Connect
- RabbitMQ
- PostgreSQL
- MongoDB
- Redis
- React
- Docker
- Docker Compose
- Kafka UI
- Zookeeper
Port: 8080
Responsibilities:
- Single entry point for the frontend
- Route requests to microservices
- Future support for rate limiting, JWT validation, and logging
Port: 8081
Responsibilities:
- User registration and authentication
- JWT token generation
- Role-based access control
Database schema:
user_service
Port: 8082
Responsibilities:
- Update account balances
- Process transfer operations
- Persist account and transaction information
- Store account/transaction audit records in
audit_service.audit_logs
Consumes:
transaction-checked
Produces:
transaction-processed
Database schema:
account_service
GET /api/v1/audit-logs?page=0&size=50 is routed through the API Gateway and is restricted to the ADMIN role. Optional actorUsername, action, and resourceType filters are supported. It returns the actor, time, action, account/transaction resource, service, and trusted client IP.
Successful account and transaction reads/creates are recorded automatically. Audit records are append-only at the application level; no update or delete API is exposed.
Port: 8083
Responsibilities:
- Receive transaction requests
- Perform initial validation
- Publish transaction events to Kafka
Produces:
transaction-raw
Database schema:
transaction_service
Port: 8084
Responsibilities:
- Fraud and AML checks
- Detect suspicious transaction behavior
- Validate transaction amount and frequency
Consumes:
transaction-raw
Produces:
transaction-checked
Database schema:
fraud_service
Port: 8085
Responsibilities:
- Send email, SMS, or push notifications
- Forward notification tasks to RabbitMQ workers
Consumes:
transaction-processed
Produces:
transaction-completed
Port: 8086
Responsibilities:
- Dashboard and reporting APIs
- Query completed transactions from MongoDB
- Provide analytics and statistics
Port: 8761
Responsibilities:
- Service registration and discovery
- Dynamic routing and load balancing support
transaction-raw
↓
transaction-validated
↓
transaction-checked
↓
transaction-processed
↓
transaction-completed
Each topic represents a stage of the transaction lifecycle.
The money-movement path uses the Transactional Outbox and Consumer Inbox patterns:
transaction-servicestores the new transaction and itstransaction-rawoutbox event in the same PostgreSQL transaction.account-serviceatomically claims each transaction event inprocessed_events, updates balances, and writes the next outbox event.- Duplicate Kafka deliveries are ignored by the
(consumer_name, event_id)primary key, so a balance operation is applied once. - Outbox publishers wait for Kafka acknowledgement before marking an event
PUBLISHED. Failed sends stayPENDINGand are retried. - Account consumer failures are retried and then published to
transaction-dlqinstead of being swallowed.
Because outbox delivery is intentionally at-least-once, downstream consumers must also be idempotent when they perform non-repeatable side effects.
Used for operational and transactional data.
Schemas:
user_serviceaccount_servicetransaction_servicefraud_service
Example tables:
usersaccountstransactionsfraud_checks
Used to archive completed transactions and support reporting queries.
The archive flow:
transaction-completed
↓
Kafka Connect Sink
↓
MongoDB
All services register themselves in Eureka.
Example configuration:
spring:
application:
name: transaction-service
eureka:
client:
service-url:
defaultZone: http://localhost:8761/eureka/Example gateway route:
uri: lb://TRANSACTION-SERVICEgit clone <repository-url>
cd fintech-realtime-processingdocker-compose up -dThis starts:
- PostgreSQL
- MongoDB
- Redis
- RabbitMQ
- Kafka
- Zookeeper
- Kafka UI
cd eureka-server
mvn spring-boot:runOpen:
http://localhost:8761
Run the following services in order:
user-servicetransaction-servicefraud-detection-serviceaccount-servicenotification-servicereporting-serviceapi-gateway
Example:
cd transaction-service
mvn spring-boot:runKafka UI:
http://localhost:9090
Eureka Dashboard:
http://localhost:8761
API Gateway:
http://localhost:8080
- Distributed transaction management with Saga Pattern
- Extend Consumer Inbox idempotency to notification and reporting side effects
- Operational DLQ replay tooling
- Centralized logging with ELK or Grafana
- OpenTelemetry and tracing
- Resilience4j circuit breaker and retry
- Kubernetes deployment
- AI-based fraud detection model
Developed a real-time fintech transaction processing platform using Spring Boot microservices, Apache Kafka, PostgreSQL, MongoDB, Redis, RabbitMQ, and Docker. Designed an event-driven Kafka topic pipeline for fraud detection, balance processing, notifications, and transaction archiving.










