Sajal Halder

Banking Microservices

A banking platform designed around six services (users, accounts, transactions, cards, payments and notifications) behind an API gateway.

By Sajal Halder

  • Java 17
  • Spring Boot
  • Maven
  • Docker
  • SonarQube

Banking Microservices is a Maven multi-module Spring Boot project by Sajal Halder that lays out a banking backend as independent services. It follows hexagonal architecture, clean code principles and SOLID design.

The repository is architecture-first. This page describes how it is organized and the engineering practices it sets down, and it is not a claim that every module is a production banking system.

Services

Six business services each own one part of a banking domain.

  • user-managementUser accounts and authentication.
  • account-serviceAccount management.
  • transaction-serviceTransaction processing.
  • card-serviceCard management.
  • payment-servicePayment processing.
  • notification-serviceNotifications.

Infrastructure and shared modules

  • api-gatewayThe single entry point for external communication.
  • service-discoveryEureka, so services find each other without hard-coded addresses.
  • saga-coordinatorThe place for the saga pattern, which sequences a multi-service operation such as a payment as a series of local transactions with compensation when a step fails.
  • common modulesShared DTOs, event definitions for asynchronous communication, and utilities.

Hexagonal architecture inside each service

Every service is split into three layers so business rules never depend on frameworks or databases.

  • DomainModels, value objects, domain services, and the input and output ports that define how the outside world may interact with them.
  • ApplicationUse-case orchestration built on the input and output ports.
  • InfrastructureThe adapters: Spring configuration, persistence, Kafka messaging and REST controllers.

Engineering practices

  • Clean codeMeaningful names, single responsibility, small functions, self-explanatory code and appropriate exceptions.
  • SOLIDAll five principles are documented as the design baseline, with dependencies pointing at abstractions.
  • Git workflowBranches for main, develop, feature, bugfix and release, conventional commit messages, pull requests into develop with a reviewer's approval and passing CI, and squash merges.
  • CI/CD stagesBuild and unit tests, integration tests with Testcontainers, a security scan, a SonarQube quality gate, then deployment to staging and production.

More projects by Sajal Halder

  • Spring RAG AI

    A retrieval-augmented generation system where agents route each question, retrieve context and check the answer before it is returned.

  • Expense Tracker AI

    A full-stack expense tracker that reads receipt photos with AI, answers questions about spending in chat, and charts where the money goes.

  • Hybrid Fanout Feed System

    A Twitter-style feed that switches strategy by audience size: fan-out on write below 10K followers, fan-out on read above.

  • Inventory Service

    A hexagonal-architecture microservice for inventory with concurrency-safe stock adjustments.