Giter Site home page Giter Site logo

soham908 / banking-service Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 674 KB

A dummy bank created so that you can integrate the banking api service in your finance web apps.

Home Page: https://banking-service.vercel.app

HTML 3.75% JavaScript 95.86% Batchfile 0.14% CSS 0.24%
banking-api banking-application banking-system dummy-api express mock-bank react dummy-bank mockbank test-bank

banking-service's Introduction

Banking Service - dummy bank application

The main goal of this web app is to provide a banking API service to users who want to integrate a dummy bank into their finance applications. Initially, this project was going to be only a backend service providing APIs, but then I decided to build the frontend too.
Frontend Link Backend Link

Technologies Used

React NodeJS Express.js MongoDB Mongoose MUI Vercel Docker

Table of contents

Features

  • User Authentication (Login, Register)
  • Add Money to Account
  • Transfer Money Between Accounts
  • View Transaction History
  • View user account balance
  • Responsive UI, mobile responsive UI
  • Notifications received when request from other app
  • Integrate payment service with BookNest (working on it)

Screenshots

Screenshot 2024-06-14 224220

Screenshot 2024-06-14 224925

Screenshot 2024-06-14 224938

Getting started

Prerequisites

  • Node.js
  • Ensure you have MongoDB Atlas set up. Obtain your connection string.

Installation

You can directly run container of this application using this docker image which is available publicly on dockerhub

  1. Clone the repo:
    git clone https://github.com/yourusername/banking-service.git
  2. Install NPM packages for backend:
    cd backend
    npm install
  3. Install NPM packages for frontend:
    cd backend
    npm install

Running the app

  1. Start the backend server
    cd backend
    npm start
  2. Start the frontend server
    cd frontend
    npm start

API Documentation

This section provides detailed documentation for the API endpoints available in this project. The API is divided into two main sections: /userAuth and /userMoney. The API documentation currently is sort of outdated, will change and add all the additional routes that were created. Some api routes response data was also changed. Will post the entire API documentation of the base path of the api link possibly.

/userAuth Endpoints

Register New User

  • Endpoint: /userAuth/register-new
  • Method: POST
  • Description: Creates a new user in the MongoDB database and returns the user object.
  • Request Body:
    {
      "username": "your_username",
      "password": "your_password"
    }
  • Response: The whole user object is returned

Login user

  • Endpoint: /userAuth/login
  • Method: POST
  • Description: Login for the user, required for using in the frontend.
  • Request Body:
    {
      "username": "your_username",
      "password": "your_password"
    }
  • Response: The whole user object is returned

'/userMoney' Endpoints

Get User Balance

  • Endpoint: /userMoney/balance/:username
  • Method: GET
  • Description: Retrieves the balance amount for the specified user.
  • URL Parameters: username (string): The username of the user.
  • Response:
    {
    "balance": 1000
    }

Add Money to User Account

  • Endpoint: /userMoney/addMoney
  • Method: POST
  • Description: Adds money to the user's account and returns the updated balance and transaction details.
  • Request Body:
    {
      "username": "your_username",
      "amount": 100,
      "description": "Deposit"
    }
  • Response:
    {
      "balance": 1100,
      "transaction": {
        "amount": 100,
        "description": "Deposit",
        "transactionType": "Debit"
      }
    }

Transfer Money from User Account

  • Endpoint: /userMoney/transferMoney
  • Method: POST
  • Description: Credits or debits money from the user's account and returns the updated balance and transaction details.
  • Request Body:
    {
      "username": "your_username",
      "amount": 50,
      "description": "Transfer"
    }
  • **Response:- **
    {
      "balance": 1050,
      "transaction": {
        "amount": 50,
        "description": "Transfer",
        "transactionType": "Credit"
      }
    }

Get Transaction History

  • Endpoint: /userMoney/transaction-history/:username
  • Method: GET
  • Description: Retrieves the transaction history for the specified user.
  • URL Parameters: username (string): The username of the user.
  • Response:
    {
      "transactions": [
        {
          "amount": 100,
          "description": "Deposit",
          "transactionType": "Debit",
          "date": "2024-06-12T12:34:56.789Z"
        },
        {
          "amount": 50,
          "description": "Transfer",
          "transactionType": "Credit",
          "date": "2024-06-12T12:45:56.789Z"
        }
      ]
    }

banking-service's People

Contributors

soham908 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.