A comprehensive, production-ready cloud-native finance system built with Spring Boot microservices architecture. Demonstrates modern distributed systems patterns including service discovery, messaging, configuration management, and observability.
Finance System is a complete banking simulation featuring:
- Customer management
- Account management
- Payment processing
- Messaging layer for inter-service communication
- Cloud-native architecture patterns
- Comprehensive monitoring and observability
Perfect for learning microservices, Spring Cloud, distributed systems, and cloud-native application development.
- π€ Customer Management - Register and manage customers
- π³ Account Management - Open and manage bank accounts
- π° Payment Processing - Send money between accounts
- π¨ Event-Driven Architecture - Redis-based messaging
- βοΈ Configuration Management - Centralized config server
- π Monitoring - Prometheus and Grafana integration
- ποΈ Microservices Architecture - Separate services for each domain
- π Service Discovery - Eureka-based service registration
- βοΈ Load Balancing - Distributed load handling
- π Security - JWT authentication (planned)
- π Observability - Metrics, logging, and tracing
- π³ Docker Support - Containerized deployment
- βΈοΈ Kubernetes Ready - Cloud-native deployment
- Java - Core programming language
- Spring Boot - Application framework
- Spring Cloud - Microservices toolkit
- Redis - Message broker and caching
- Maven - Build and dependency management
- MapStruct - Object mapping
- Lombok - Boilerplate reduction
- Prometheus - Metrics collection
- Grafana - Visualization and dashboards
- Docker - Containerization
βββββββββββββββββββ
β Config Server β (Port 8085)
ββββββββββ¬βββββββββ
β
ββββββ΄βββββ
β β
βββββΌββββ ββββΌβββββ
βConfig β βConfig β
βββββ¬ββββ βββββ¬ββββ
β β
βββββΌββββββββββΌββββ
β Messaging Layer β (Port 6379)
ββββββββββ¬βββββββββ
β
ββββββ΄βββββ¬ββββββββββββββ
β β β
βββββΌββββ ββββΌβββββ ββββββββΌββββ
βAccountβ βPaymentβ β Customer β
β(8081) β β(8082) β β (8083) β
βββββββββ βββββββββ ββββββββββββ
-
Config Server (Port 8085)
- Centralized configuration management
- Spring Cloud Config
-
Messaging Layer (Port 6379)
- Redis-based message broker
- Event-driven communication
-
Account Service (Port 8081)
- Account management
- Account operations
-
Customer Service (Port 8083)
- Customer registration
- Customer management
-
Payment Service (Port 8082)
- Payment processing
- Transaction management
- Java 8+
- Maven 3.x
- Docker (for containerized deployment)
- Redis (for messaging layer)
- Clone the repository:
git clone https://github.com/bhanuchaddha/Finance-System.git
cd Finance-System- Build all services:
mvn clean installStartup Sequence:
- Config Server
- Messaging Layer (Redis)
- Account Service
- Customer Service
- Payment Service
Using Maven:
# Terminal 1 - Config Server
cd config-server
mvn spring-boot:run
# Terminal 2 - Messaging Layer
cd messaging-layer
mvn spring-boot:run
# Terminal 3 - Account Service
cd accounts
mvn spring-boot:run
# Terminal 4 - Customer Service
cd customers
mvn spring-boot:run
# Terminal 5 - Payment Service
cd payments
mvn spring-boot:runBuild all Docker images:
mvn clean install -Ddocker-buildRun Docker containers:
docker run -p 8085:8085 config-server
docker run -p 6379:6379 messaging-layer
docker run -p 8081:8081 accounts
docker run -p 8083:8083 customers
docker run -p 8082:8082 paymentsComplete API documentation available at: Postman API Documentation
Customer Service:
POST /customers # Register customer
GET /customers/{id} # Get customer detailsAccount Service:
POST /accounts # Open account
GET /accounts/{id} # Get account detailsPayment Service:
POST /payments # Process payment
GET /payments/{id} # Get payment detailsThe system includes comprehensive monitoring:
- JVM Metrics - Memory, CPU, threads
- Application Metrics - Request rates, response times
- Custom Metrics - Business-specific metrics
Setup:
- Start Prometheus with
prometheus.yml - Access Grafana at
http://localhost:3000 - Import dashboards from
wiki/directory
Detailed setup guide: Application Monitoring
Finance-System/
βββ accounts/ # Account Service
βββ customers/ # Customer Service
βββ payments/ # Payment Service
βββ messaging-layer/ # Redis Messaging
βββ config-server/ # Configuration Server
βββ api-testing/ # API Tests (Rest Assured)
βββ wiki/ # Documentation
βββ pom.xml # Parent POM
Centralized configuration in config-server:
- Database connections
- Service URLs
- Feature flags
- Environment-specific settings
Each service has its own application.properties:
server.port=8081
spring.application.name=account-service
# Add service-specific configurationsAPI Testing with Rest Assured:
cd api-testing
mvn testTests include:
- Payment processing tests
- Traffic generation
- Integration tests
- β Service Discovery - Eureka integration
- β Load Balancing - Spring Cloud LoadBalancer
- β Configuration Management - Spring Cloud Config
- β Health Checks - Spring Boot Actuator
- β Monitoring - Prometheus metrics
- β Distributed Tracing - Zipkin integration (planned)
- β Circuit Breaker - Resilience patterns (planned)
- β API Gateway - Edge service (planned)
- Customer Service
- Account Service
- Payment Service
- Messaging Layer
- Loan Service
- Payment event caching and replay
- Rest input validations
- Enhanced logging
- Distributed tracing (Zipkin)
- Docker Compose setup
- Kubernetes deployment
- Authentication & JWT
- Cassandra integration
- Circuit breaker (Hystrix)
- Error handling framework
- Flyway migrations
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available for educational purposes.
- Learning Microservices - Complete microservices tutorial
- Cloud-Native Development - Modern architecture patterns
- Spring Cloud - Spring Cloud ecosystem reference
- Distributed Systems - Event-driven architecture
- Observability - Monitoring and metrics
Built with Spring Boot & Spring Cloud β€οΈ
