⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

This is an API to simulate some bank actions, like transfer money, Deposit and withdeaw. We have a JWT and login system for your users.

Notifications You must be signed in to change notification settings

Babiel09/Bank-API

Repository files navigation

Bank API

This repository contains an API designed to simulate various banking actions, including:

  • Money Transfers: Transfer funds between accounts.
  • Deposits: Add money to an account.
  • Withdrawals: Take money out of an account.

The API also includes a robust authentication system using JWT (JSON Web Tokens) and a login feature to manage user sessions securely.

Features

  • Banking Operations: Perform transactions like deposits, withdrawals, and money transfers.
  • User Authentication: Secure login system with JWT for authentication and session management.
  • Database Integration: Leverages a database for storing user and transaction data.

Technologies Used

Node.js


Nest.js


Bcrypt


Typescript


Prisma


Postgres


Redis


BullMQ


Installation

  1. Clone the repository:

    git clone https://github.com/Babiel09/Bank-API.git
  2. Navigate to the project directory:

    cd Bank-API/src
  3. Install dependencies:

    npm install
  4. Set up environment variables:

    • Create a .env file in the root directory.
    • Add the following variables:
      PORT=4857
      JWT_SECRET=your_jwt_secret
      DB_URL=your_database_uri 
  5. Start the server:

    npm start
  6. The API will be available at http://localhost:4857.

Endpoints

Banking Endpoints

  • POST /transfer/v1/deposit: Deposit money into an account.

  • POST /transfer/v1/withdraw: Withdraw money from an account.

  • POST /transfer/v1/transfer: Transfer money to another account.

  • User Endpoints

  • GET /user/v1: Get all users.

  • GET /user/v1/search: Search from one user in the DB.

  • GET /user/v1/:id : Get one specified user for the id.

  • GET /user/v3/login : Try to made the user login.

  • POST /user/v1 : Post a new user.

  • PUT /user/v1/:id : Updated a user with the specified id.

  • DELETE /user/v2/:id : Delte one user with a specified id.

Contributing

Feel free to submit issues or pull requests for improvements or bug fixes.

About

This is an API to simulate some bank actions, like transfer money, Deposit and withdeaw. We have a JWT and login system for your users.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published