Key Features • Architecture • Technologies • Application Details • Getting Started • Usage • License
Zaprove is a robust microservices-based application designed to handle the complexities of loan approval management. It is built with a modern Java stack, featuring a suite of services that work together to provide a scalable and maintainable system. The architecture includes service discovery, centralized configuration, asynchronous messaging, and a full monitoring stack.
-
Microservice Architecture: The application is broken down into logical, independently deployable services for better scalability and maintenance.
-
Service Discovery: Utilizes Netflix Eureka for dynamic registration and discovery of services within the ecosystem.
-
Asynchronous Messaging: Employs Apache Kafka for reliable, asynchronous communication between services, ensuring loose coupling and resilience.
-
Comprehensive Monitoring: Features a monitoring solution with Prometheus for metrics collection and Grafana for visualization, including a pre-configured JVM dashboard.
-
Relational Data Store: Uses PostgreSQL for persistent data storage, managed via pgAdmin.
-
Containerized Deployment: The entire application stack is containerized using Docker and orchestrated with Docker Compose for easy setup and deployment.
The system is composed of several microservices that communicate with each other through a combination of synchronous REST APIs and asynchronous events via Kafka.
eureka-server: Handles service registration and discovery, allowing services to find and communicate with each other dynamically.core-service: The central service responsible for core business logic related to loan applications.disbursement-service: Manages the disbursement of funds after a loan is approved.notification-service: Handles sending notifications (e.g., email, SMS) to users based on events in the system.
The following diagrams provide a visual overview of the system architecture:
| ERD Diagram | Sequence Diagram |
|---|---|
![]() |
![]() |
This project is built with a range of modern technologies:
- Backend: Java 21, Spring Boot 3, Spring Cloud, Spring Security, Spring Data JPA
- Database: PostgreSQL
- Messaging: Apache Kafka
- Service Discovery: Netflix Eureka
- Monitoring: Prometheus, Grafana
- Containerization: Docker, Docker Compose
- Build Tool: Apache Maven
- Frontend: React, TypeScript, Vite, Tailwindcss
| Role | Description |
|---|---|
| Admin | Creates users |
| Customer | Submits applications |
| Credit Officer (CO) | Reviews applications initially |
| Risk Officer (RO) | Conducts secondary review |
| Manager | Approves or rejects applications |
Handles user management, authentication, and application submission.
Endpoints:
POST /api/v1/core/create-user— Create user (Admin only)POST /api/v1/auth/login— LoginPOST /api/v1/auth/logout— LogoutPOST /api/v1/core/loan-application— Submit application
Listens to Kafka topics and sends role-specific updates.
Endpoints:
GET /api/v1/notifications/customer/{userId}GET /api/v1/notifications/credit-officer/{userId}GET /api/v1/notifications/risk-officer/{userId}GET /api/v1/notifications/manager/{userId}
Handles application decisions made by CO, RO, and Manager.
Endpoints:
GET /api/v1/applications/active/credit-officer/{userId}— View applications assigned to COGET /api/v1/applications/active/risk-officer/{userId}— View applications assigned to ROGET /api/v1/applications/active/manager/{userId}— View applications assigned to ManagerPOST /api/v1/decisions/credit-officer/{applicationId}POST /api/v1/decisions/risk-officer/{applicationId}POST /api/v1/decisions/manager/{applicationId}
| Event | Topic | Emitted By | Consumed By |
|---|---|---|---|
UserCreatedEvent |
audit |
Core | Audit |
ApplicationSubmittedEvent |
application |
Core | Notification, Disbursement |
DecisionEvent (CO/RO/MGR) |
decision |
Disbursement | Notification |
- Admin creates user → emits
UserCreatedEvent - Customer logs in and submits application → emits
ApplicationSubmittedEvent - Notification service informs Customer, CO, and RO of the new application
- Credit Officer (CO) gives verdict → emits
DecisionEvent→ notifies Manager - Risk Officer (RO) gives verdict → emits
DecisionEvent→ notifies Manager - Manager gives final verdict → emits
DecisionEvent→ notifies Customer - Application lifecycle ends after Customer receives final decision
You can import this dashboard to see your project. https://grafana.com/dashboards/11378
To get the full application stack running, you will need Docker and Docker Compose installed on your machine.
1. Environment Configuration
Before starting, you need to create a .env file in the project root directory. This file will hold the necessary credentials for services like PostgreSQL and kafka.
For the simplicity of the project I have used the free services from Aiven (https://aiven.io/)
2. Launch the Application
Once the services are built, you can start the entire stack using Docker Compose:
docker-compose up -dThis command will build the Docker images for your services and start all the containers defined in the docker-compose.yml file in detached mode.
After a successful launch, the following services and UIs will be available:
- Frontend Application:
http://localhost:5173 - Eureka Server:
http://localhost:8761 - Core Service:
http://localhost:8081 - Notification Service:
http://localhost:8082 - Disbursement Service:
http://localhost:8083 - Prometheus (Metrics):
http://localhost:9090 - Grafana (Dashboard):
http://localhost:3000(Default login:admin/admin)
The Grafana instance comes pre-configured with a Prometheus data source and a "JVM (Micrometer)" dashboard to monitor the health of your Java services. You can also download the Postman Collection to check each individual endpoint.
This project is licensed under the MIT License. See the LICENSE file for details.
- set spring cloud config server
- set spring cloud gateway
- reactive programming and virtual threads
- integrate keycloak
- ELK stack
- deploy in ec2 server with kubernetes
- manual kafka configuration with docker and monitor with provectus kafka ui.

