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 ❤️
