{"id":41466351,"url":"https://github.com/ajharry69/dt-bank","last_synced_at":"2026-01-23T16:32:45.375Z","repository":{"id":293532679,"uuid":"984347080","full_name":"ajharry69/dt-bank","owner":"ajharry69","description":"This project implements a simplified banking platform using a microservices' architecture. It includes services for managing customers, accounts, and cards, along with common cloud infrastructure patterns like service discovery, configuration management, API gateway, and security.","archived":false,"fork":false,"pushed_at":"2025-11-01T15:33:11.000Z","size":464,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T17:22:38.764Z","etag":null,"topics":["banking-applications","cards","docker","feign","interservice-communication","microservices","rabbitmq","testcontainers"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajharry69.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-15T19:31:24.000Z","updated_at":"2025-11-01T15:33:14.000Z","dependencies_parsed_at":"2025-07-14T07:22:17.404Z","dependency_job_id":"aabc2ebe-e8b5-4dba-af53-a241c27b7eb8","html_url":"https://github.com/ajharry69/dt-bank","commit_stats":null,"previous_names":["ajharry69/dt-bank"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ajharry69/dt-bank","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajharry69%2Fdt-bank","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajharry69%2Fdt-bank/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajharry69%2Fdt-bank/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajharry69%2Fdt-bank/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajharry69","download_url":"https://codeload.github.com/ajharry69/dt-bank/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajharry69%2Fdt-bank/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28695535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T15:57:05.722Z","status":"ssl_error","status_checked_at":"2026-01-23T15:56:27.656Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["banking-applications","cards","docker","feign","interservice-communication","microservices","rabbitmq","testcontainers"],"created_at":"2026-01-23T16:32:44.836Z","updated_at":"2026-01-23T16:32:45.363Z","avatar_url":"https://github.com/ajharry69.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DT Bank - Microservices Platform\n\n[![CI/CD Pipeline](https://github.com/ajharry69/dt-bank/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/ajharry69/dt-bank/actions/workflows/ci-cd.yml)\n[![CodeQL](https://github.com/ajharry69/dt-bank/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/ajharry69/dt-bank/actions/workflows/github-code-scanning/codeql)\n[![Dependabot Updates](https://github.com/ajharry69/dt-bank/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/ajharry69/dt-bank/actions/workflows/dependabot/dependabot-updates)\n\nThis project implements a simplified banking platform using a microservices' architecture.\nIt includes services for managing customers, accounts, and cards, along with common cloud\ninfrastructure patterns like service discovery, configuration management, API gateway, and\nsecurity.\n\n---\n\n## Architecture Overview\n\nThe platform is composed of several Spring Boot microservices that communicate with each other, often via REST APIs\norchestrated through an API Gateway.\n\n* **Customer Service:** Manages customer biographical data.\n* **Account Service:** Manages customer bank accounts.\n* **Card Service:** Manages customer cards (virtual and physical) linked to accounts.\n* **Spring Cloud Gateway:** Acts as the single entry point for all client requests, handling routing, security, and\n  other cross-cutting concerns.\n* **Eureka Discovery Service:** Allows services to register and discover each other dynamically.\n* **Spring Cloud Config Server:** Provides centralized configuration management for all microservices.\n* **PostgreSQL:** The relational database used by each microservice for persistence.\n* **RabbitMQ:** The messaging queue for inter-service communication.\n* **Keycloak:** An open-source identity and access management tool that secures API endpoints using JWT Bearer token\n  authentication.\n\n---\n\n## Microservices\n\nEach microservice is a Spring Boot application built with Maven.\n\n### Customer Service (`customer-service`)\n\n* **Description:** Handles CRUD operations for customer's biographical data.\n* **API Documentation:** Exposes Swagger UI at http://localhost:8080/swagger-ui.html?urls.primaryName=Customers.\n\n### Account Service (`account-service`)\n\n* **Description:** Manages customer bank account data.\n* **API Documentation:** Exposes Swagger UI at http://localhost:8080/swagger-ui.html?urls.primaryName=Accounts.\n\n### Card Service (`card-service`)\n\n* **Description:** Manages customer card data.\n* **API Documentation:** Exposes Swagger UI at http://localhost:8080/swagger-ui.html?urls.primaryName=Cards.\n\n---\n\n## Infrastructure Services\n\nThese services support the microservices architecture.\n\n### Spring Cloud Gateway (`gateway`)\n\n* **Description:** Single entry point for all API requests. Handles routing to appropriate microservices and load\n  balancing.\n* **Port:** 8080\n* **Configuration:** Fetches its configuration (including routes) from the Spring Cloud Config Server.\n\n### Eureka Service Discovery (`eureka-server`)\n\n* **Description:** Allows microservices to register themselves and discover other registered services dynamically.\n  The Gateway uses Eureka to find downstream services.\n* **Port:** 8761\n* **Dashboard:** Accessible at http://localhost:8761\n\n### Spring Cloud Config Server (`config-server`)\n\n* **Description:** Provides centralized externalized configuration for all microservices and the gateway. Configurations\n  are typically backed by a Git repository.\n* **Port:** 8888\n\n---\n\n## Core Technologies\n\n* **Java 24**\n* **Spring Boot 3.4.5**\n* **Spring Cloud 2024.0.1**\n* **Spring Cloud Gateway (Reactive)**\n* **Spring Cloud Netflix Eureka**\n* **Spring Cloud Config**\n* **OpenFeign:** For inter-service communication.\n* **PostgreSQL:** As the RDBMS for each service.\n* **RabbitMQ:** As the messaging queue for inter-service communication.\n* **Keycloak:** An open-source identity and access management tool that secures API endpoints using JWT Bearer token\n  authentication.\n* **Maven:** For project build and dependency management.\n* **Testcontainers:** For integration tests and running application services, providing ephemeral Docker containers for\n  dependencies like PostgreSQL, RabbitMQ, etc.\n* **JUnit 5:** For unit and integration testing.\n* **Lombok:** To reduce boilerplate code.\n* **MapStruct:** For DTO-entity mapping.\n* **Springdoc OpenAPI (Swagger):** For API documentation.\n\n---\n\n## Prerequisites\n\n* **Java 24 JDK** (or compatible)\n* **Gradle 8.14+**\n* **Docker**\n* **Git** (for cloning the project)\n* An IDE (e.g., IntelliJ IDEA, Eclipse, VS Code)\n\n---\n\n## Setup and Running the Platform\n\nThis section outlines how to run the entire platform locally.\n\n### Using docker compose\n\nThe following command starts all the services that are used internally by microservices.\n\n```bash\nmake compose\n```\n\n\u003e **N/B:** To access the services as [documented](#api-documentation-swagger), replace `localhost` with\n`host.docker.internal`.\n\n### Using test containers and Spring boot compose integration\n\nLocate and run the main applications referenced in the following list.\n\n\u003e Ensure Docker is running on your system and start the applications in the order they are listed in.\n\u003e\n\u003e **Video reference:** https://drive.google.com/file/d/1PieCRJWxzD3R71tVUKQEufj_lphJWrlk/view\n\n| Service             | Start Command                             | Main Application                                                                                                                        |\n|---------------------|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| `config-server`     | `./gradlew :config-server:bootRun`        | [ConfigServerApplication.java](config-server/src/main/java/com/github/ajharry69/config/server/ConfigServerApplication.java)             |\n| `discovery-service` | `./gradlew :discovery-service:bootRun`    | [DiscoveryServiceApplication.java](discovery-service/src/main/java/com/github/ajharry69/discovery/DiscoveryServiceApplication.java)     |\n| `customer-service`  | `./gradlew :customer-service:bootTestRun` | [TestCustomerServiceApplication.java](customer-service/src/test/java/com/github/ajharry69/customer/TestCustomerServiceApplication.java) |\n| `account-service`   | `./gradlew :account-service:bootTestRun`  | [TestAccountServiceApplication.java](account-service/src/test/java/com/github/ajharry69/account/TestAccountServiceApplication.java)     |\n| `card-service`      | `./gradlew :card-service:bootTestRun`     | [TestCardServiceApplication.java](card-service/src/test/java/com/github/ajharry69/card/TestCardServiceApplication.java)                 |\n| `gateway`           | `./gradlew :gateway:bootRun`              | [GatewayApplication.java](gateway/src/main/java/com/github/ajharry69/gateway/GatewayApplication.java)                                   |\n\nWait for each service to start and register with Eureka (check Eureka dashboard) before starting dependent services or\nthe gateway.\n\n---\n\n## API Documentation (Swagger)\n\nAPI documentation is generated using Springdoc OpenAPI.\n\n* OpenAPI UI: http://localhost:8080/swagger-ui.html\n\n---\n\n## Testing\n\nThe project includes both unit and integration tests.\n\n`./gradlew --info --rerun-tasks --exclude-task :gateway:test test`\n\n\u003e **Video reference:** https://drive.google.com/file/d/1VxS-deQrexQ3mpeLVd9cLlRDgV9M42TP/view\n\n### Unit Tests\n\n* Located in `src/test/java` of each microservice.\n* Use JUnit 5 and Mockito.\n\n### Integration Tests (Testcontainers)\n\n* Located in `src/test/java` of each microservice (e.g., `customer-service`, `card-service`, `account-service`).\n* Leverage **Testcontainers** to spin up required external dependencies, such as a PostgreSQL database, for each test\n  run.\n  This ensures tests are isolated and run against a clean environment.\n* The Testcontainers setup for each service starts all its required Docker containers.\n\n---\n\n## Further Development\n\n* Enhance error handling and logging.\n* Add more comprehensive integration tests covering inter-service communication.\n* Implement distributed tracing (e.g., using Micrometer Tracing with Zipkin).\n* Set up CI/CD pipelines.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajharry69%2Fdt-bank","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajharry69%2Fdt-bank","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajharry69%2Fdt-bank/lists"}