Skip to content

KRYSTALM7/banking-system

Repository files navigation

🏦 Banking System — Microservices Backend

A production-grade, multi-service banking backend built with Spring Boot 3, Spring Cloud, and MySQL.

🏗️ Architecture

React Frontend (Port 3000)
        ↓
API Gateway (Port 8080)
        ↓
┌─────────────────────────────────────┐
│         Eureka Discovery (8761)     │
└─────────────────────────────────────┘
        ↓
┌──────────┬──────────┬──────────┬──────────┬──────────┐
│   Auth   │ Account  │  Trans.  │   Loan   │  Admin   │
│  (8081)  │  (8082)  │  (8083)  │  (8084)  │  (8085)  │
└──────────┴──────────┴──────────┴──────────┴──────────┘
        ↓
┌─────────────────────────────────────┐
│   MySQL (banking_auth, _accounts,   │
│   _transactions, _loans, _admin)    │
└─────────────────────────────────────┘

🚀 Services

Service Port Database Description
discovery-server 8761 Eureka Service Registry
api-gateway 8080 Single entry point, routing
auth-service 8081 banking_auth Registration, login, sessions
account-service 8082 banking_accounts Bank accounts, beneficiaries
transaction-service 8083 banking_transactions Fund transfers, statements
loan-service 8084 banking_loans Loan applications, EMI
admin-service 8085 banking_admin Admin dashboard

⚙️ Tech Stack

  • Java 17
  • Spring Boot 3.2.3
  • Spring Cloud (Eureka, Gateway)
  • Spring Security
  • Spring Data JPA
  • MySQL 8.0
  • BCrypt password hashing
  • Swagger / OpenAPI 3
  • Log4j2

🗃️ Prerequisites

  • Java 17+
  • Maven 3.8+
  • MySQL 8.0+
  • Node.js 18+ (for frontend)

🛠️ Setup

1. Database

mysql -u root -p < database/init.sql

2. Build common library

cd common-lib
mvn clean install

3. Start services in order

# 1. Discovery Server
cd discovery-server && mvn spring-boot:run

# 2. Auth Service
cd auth-service && mvn spring-boot:run

# 3. Account Service
cd account-service && mvn spring-boot:run

# 4. Transaction Service
cd transaction-service && mvn spring-boot:run

# 5. Loan Service
cd loan-service && mvn spring-boot:run

# 6. Admin Service
cd admin-service && mvn spring-boot:run

# 7. API Gateway (last)
cd api-gateway && mvn spring-boot:run

4. Verify

📖 API Documentation

Each service exposes Swagger UI:

🔐 Default Credentials

⚠️ Change these immediately after first login!

Username Password Role
superadmin Admin@123456 SUPER_ADMIN
admin1 Admin@123456 ADMIN

📁 Project Structure

banking-system/
├── common-lib/          # Shared enums, exceptions, responses
├── discovery-server/    # Eureka server
├── api-gateway/         # Spring Cloud Gateway
├── auth-service/        # Authentication & users
├── account-service/     # Bank accounts
├── transaction-service/ # Transactions
├── loan-service/        # Loans & EMI
├── admin-service/       # Admin operations
└── database/            # SQL init scripts

🤝 Contributing

See CONTRIBUTING.md for guidelines.

📄 License

MIT License

About

Production-grade microservices banking backend built with Spring Boot 3, Spring Cloud, MySQL — featuring auth, accounts, transactions, loans and admin services

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages