Code Monkey home page Code Monkey logo

test-task-bank-cli's Introduction

Test Task Bank CLI

Node.js project implemented to perform operations using console interface on bank, client, account, transaction. Task was implemented using Node.js, PrismaORM, PostgreSQL.

Installation

  1. Create .env file in the root of the project;
  2. Copy content from .env.development.local in newly created .env and replace all <your_value> with your values;
  3. Run command:
  docker compose up
  1. Check is database working.
  2. Install dependencies:
npm install
  1. Run Prisma migrations:
npm run prisma:migrate
  1. Run application:
npm run start

Available commands

Bank:

  • bank info - Log information about banks;
    • Usage example: bank info all
    • Usage example: bank info <bank_id>
  • bank reg - Registering new bank in application
    • Usage example: bank reg <bank_name>
  • bank update - Update data of the existing bank by id
    • Usage example: bank update <bank_id> <new_bank_name>
  • bank delete - Delete existing bank by id
    • Usage example: bank delete <bank_id>
  • bank add-client - Adding client to bank and open new account
    • Usage example: bank add-client <client_id> <bank_id> <initial_balance>

Client:

  • client info - Log information about clients
    • Usage example: client info all
    • Usage example: client info <client_id>
  • client reg - Registering new client in application (Type can be INDIVIDUAL or LEGAL_ENTITY)
    • Usage example: client reg <client_name> <client_type>
  • client update - Update data of the existing client by id
    • Usage example: client update <client_id> <client_name> <client_type>
  • client delete - Delete existing client by id
    • Usage example: client delete <client_id>

Account:

  • account info - Log information about client accounts
    • Usage example: account info <client_id>

Transaction:

  • transaction new - Create new transaction
    • Usage example: transaction new <from_account_id> <to_account_id> <amount>
    • Usage example: transaction new 1 2 123
  • transaction history - Log transactions history for account by period (Period format type: YYYY-MM-DDTHH:mm)
    • Usage example: transaction history <client_id> <date_from> <date_to>
    • Usage example: transaction history 1 2024-02-28T06:00 2024-02-28T11:00

Other:

  • list - list all available commands;
    • Usage example: list
  • exit - end current application session.
    • Usage example: exit

test-task-bank-cli's People

Contributors

fresemin 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.