Distributed banking system with clean architecture and REST API support.
- User and account management
- Transfers between accounts with varying commission (0%, 3%, 10%)
- Operation history storage
- Asynchronous communication via Kafka
- Password encryption (BCrypt), JWT-based authentication
- Java 21 (Maven)
- Spring Boot
- Hibernate / JPA
- Spring MVC
- PostgreSQL
- Flyway for DB migrations
- Kafka for event-driven architecture
- JUnit 5 and Mockito for testing
The system allows creation and management of users and their bank accounts. All operations are recorded in history. External interaction is handled via REST API through the ApiGateway.
Application — core service containing business logic.
StorageService — separate Spring Boot service that subscribes to Kafka events and stores user and account changes in its own database.
- Java 21
- Maven
- PostgreSQL
- Docker Desktop
- Git
-
Clone the repository:
git clone https://github.com/lim0sha/BankSystem.git cd BankSystem -
Pull and run Kafka using Docker Compose:
docker run -d --name kafka-container -p 9092:9092 bitnami/kafka docker-compose -f docker/docker-compose.yml up -d
-
Configure PostgreSQL:
- Make sure your local PostgreSQL server is running.
- Check configurations in
resources/application.ymlin each module for correct DB connection settings.
-
Build the project:
mvn clean install
-
Run the main service:
cd Application && mvn spring-boot:run
-
Run ApiGateway:
cd ../ApiGateway/PresentationApiGateway && mvn spring-boot:run
-
Run StorageService:
cd ../../StorageService && mvn spring-boot:run
-
Launch the client application (Presentation):
cd ../Presentation && mvn exec:java -Dexec.mainClass="Presentation.Console.Main"
This project is licensed under the MIT License – see the LICENSE.md file for details.
For questions or feedback, feel free to reach out at limosha@inbox.ru
Feel free to customize this further to better fit your needs!