sameh-tarek / Bank-Api

This project is a simple banking system API that allows users to authenticate, register, deposit money into their accounts, withdraw money from their accounts, and view their account balance and transaction history. It is built using Java Spring Boot and MySQL database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This project is a simple banking system API that allows users to authenticate, register, deposit money into their accounts, withdraw money from their accounts, and view their account balance and transaction history. It is built using Java Spring Boot and MySQL database.

Test the API here:

Run In Postman

Requirements

  • Java Development Kit (JDK) 17 or above
  • MySQL Database (You can either use a local MySQL instance or connect to a remote one)

How to Run

1- Clone the project repository from Git (if it's not already cloned).

2- Import the project into your favorite Java IDE (e.g., IntelliJ, Eclipse, etc.).

3- Build the project to resolve dependencies.

Features

No. Feature Description Endpoint
1. Authenticate Authenticate user credentials POST /bank/auth/authenticate
2. Register Register a new user POST /bank/auth/register
3. Deposit Deposit money into an account POST /bank/transaction/deposit
4. Withdraw Withdraw money from an account POST /bank/transaction/withdraw
5. View Account Balance View balance of an account GET /bank/account/balance
6. View Account Transactions View transactions of an account GET /bank/account/transactions
7. View Account Card Number View card number associated with an account GET /bank/account/cardNumber

ERD

erDiagram
       ACCOUNTS {
        Long id PK
        String card_number "Unique"
        String name 
        String email
        String password 
        double balance 
        boolean enable "Active or Not"
    }
     ACCOUNTS ||--o{ TRANSACTIONS : have
    TRANSACTIONS {
        Long id PK
        Long account_id FK "fk referencing ACCOUNTS.id"
        double amount
        String transaction_type "DEPOSIT or WITHDRAW"
        LocalDateTime created_at
        String payment_method "credit card"
    }

About

This project is a simple banking system API that allows users to authenticate, register, deposit money into their accounts, withdraw money from their accounts, and view their account balance and transaction history. It is built using Java Spring Boot and MySQL database.


Languages

Language:Java 100.0%