How manjuramkh/customer-service works
This repository implements a Spring customer service: clients register and retrieve customer records, update KYC status, and an internal account-service endpoint checks verification. The main runtime path is HTTP controller → service logic → repository, with customer and KYC domain state persisted through Spring Data JPA. The README describes a wider banking ecosystem, but this repository contains only the customer-service portion. Event publication appears disabled in the sampled service; its producer is shown as an optional subsystem, not an active workflow. Some runtime wiring and persistence configuration were not sampled.
Main entry points: CustomerService.java Customer Service · CustomerController.java Customer Controller · GlobalExceptionHandler.java Exception Handler · CustomerRepository.java Customer Repository
Components 18
HTTP API
- Customer Controller
src/main/java/com/bank/customer_service/rest/CustomerController.java - Registration Request
src/main/java/com/bank/customer_service/dto/CustomerRegistrationRequest.java - KYC Update Request
src/main/java/com/bank/customer_service/dto/KycStatusUpdateRequest.java - Customer Response
src/main/java/com/bank/customer_service/dto/CustomerResponse.java
Customer Workflow
- Customer Service
src/main/java/com/bank/customer_service/service/CustomerService.java
Customer State
- Customer Repository
src/main/java/com/bank/customer_service/repos/CustomerRepository.java - Customer Entity
src/main/java/com/bank/customer_service/domain/Customer.java - KYC Status
src/main/java/com/bank/customer_service/domain/KycStatus.java - Customer Database
Errors and Responses
- Exception Handler
src/main/java/com/bank/customer_service/util/GlobalExceptionHandler.java - Error Response
src/main/java/com/bank/customer_service/util/ErrorInfo.java - Not Found Error
src/main/java/com/bank/customer_service/exception/CustomerNotFoundException.java - Duplicate Error
src/main/java/com/bank/customer_service/exception/DuplicateCustomerException.java - Invalid KYC Transition
src/main/java/com/bank/customer_service/exception/InvalidKycTransitionException.java
Events
- Customer Event Producer
src/main/java/com/bank/customer_service/event/CustomerEventProducer.java
Other components
- Mobile / Web Client
- API Gateway
- Account Service
Connections 21
- Mobile / Web Client → API Gateway: sends requests
README.md - API Gateway → Customer Controller: routes requests
README.md - Account Service → Customer Controller: checks verification
src/main/java/com/bank/customer_service/rest/CustomerController.java - Customer Controller → Customer Service: invokes
src/main/java/com/bank/customer_service/rest/CustomerController.java - Customer Controller → Registration Request: accepts
src/main/java/com/bank/customer_service/rest/CustomerController.java - Customer Controller → KYC Update Request: accepts
src/main/java/com/bank/customer_service/rest/CustomerController.java - Customer Controller → Customer Response: maps results
src/main/java/com/bank/customer_service/rest/CustomerController.java - Customer Service → Registration Request: reads fields
src/main/java/com/bank/customer_service/service/CustomerService.java - Customer Service → Customer Repository: queries and saves
src/main/java/com/bank/customer_service/service/CustomerService.java - Customer Repository → Customer Entity: persists entity
src/main/java/com/bank/customer_service/repos/CustomerRepository.java - Customer Service → Customer Entity: creates and updates
src/main/java/com/bank/customer_service/service/CustomerService.java - Customer Service → KYC Status: checks transitions
src/main/java/com/bank/customer_service/service/CustomerService.java - Customer Repository → Customer Database: persists records
- Customer Service → Not Found Error: throws
src/main/java/com/bank/customer_service/service/CustomerService.java - Customer Service → Duplicate Error: throws
src/main/java/com/bank/customer_service/service/CustomerService.java - Customer Service → Invalid KYC Transition: throws
src/main/java/com/bank/customer_service/service/CustomerService.java - Exception Handler → Not Found Error: handles
src/main/java/com/bank/customer_service/util/GlobalExceptionHandler.java - Exception Handler → Duplicate Error: handles
src/main/java/com/bank/customer_service/util/GlobalExceptionHandler.java - Exception Handler → Invalid KYC Transition: handles
src/main/java/com/bank/customer_service/util/GlobalExceptionHandler.java - Exception Handler → Error Response: builds response
src/main/java/com/bank/customer_service/util/GlobalExceptionHandler.java - Customer Service → Customer Event Producer: may publish events