Skip to content

KarthikDigiMantra/technical_test

Repository files navigation

Task - Submit loan application - Status of each tasks updated inline - Postgres DB port changed to 5432

Create the functionality for a broker to submit a new loan application.

  1. Show a modal after clicking the "Submit application" button, and allow the broker to enter the following information:

    • applicant_name
    • applicant_email
    • applicant_mobile_phone_number
    • applicant_address
    • annual_income_before_tax
    • incoming_address
    • incoming_deposit
    • incoming_price
    • incoming_stamp_duty
    • loan_amount
    • loan_duration
    • monthly_expenses
    • outgoing_address
    • outgoing_mortgage
    • outgoing_valuation
    • savings_contribution

I have made the form submitted to backend with all form data by replacing method calling from form tag to submit onclick event

image
  1. Add a backend endpoint to receive the application submission

There was create application end point (brokers/applications/create-applications?) available, I have reused it to submit the form application . I have rewritten to make it more applicable for the tasks given.

image
  1. Query all existing applications and get the average loan_amount

There was method to query average loan of all application which i have leveraged further for below tasks

image
  1. Save the new application to the applications table

I have saved all of the form fields onto respective application table on postgres db. There was issue for strring columns which i thought it's was isolated issue on my side, however i have resolved them as well by having expliciate mapping of form body to application DTO

image
  1. Return if new loan's loan_amount is above or below the average

I have checked the current application loan amount is greater than average and send the boolean flag accordingly as below

image image

Bridgit competency test

Welcome to the Bridgit technical test. There are three tasks of increasing complexity. After you have set up the software complete as many tasks as you can in the allotted timeframe.

Project Description
Database PostgreSQL managed by Sequelize Migrations
Backend NodeJS/Typescript with NestJS framework
Frontend VueJS/Typescript

Table of contents

Broker portal

Setting up

Prerequisites:

  • NodeJS 16
  • Docker

Setting up the database on postgres://user:password@localhost:5436/technical_test:

# start postgresql server using Docker's "Compose"
$ docker-compose up -d 
# create and populate the database using Sequelize
$ cd database
$ cp .env.localdev .env
$ npm install
$ npm run build
$ npm run migrate
$ npm run seed:all

Setting up the backend on http://localhost:7100 with Swagger on http://localhost:7100/swagger:

$ cd backend
$ cp .env.localdev .env
$ npm install
$ npm run start:dev

Setting up the frontend on http://localhost:7200:

$ cd frontend
$ cp .env.localdev .env
$ npm install 
$ npm run start:dev

Log in to the frontend as broker 1. You can find the login information in the database seeder script.

Task - Submit loan application

Create the functionality for a broker to submit a new loan application.

  1. Show a modal after clicking the "Submit application" button, and allow the broker to enter the following information:

    • applicant_name
    • applicant_email
    • applicant_mobile_phone_number
    • applicant_address
    • annual_income_before_tax
    • incoming_address
    • incoming_deposit
    • incoming_price
    • incoming_stamp_duty
    • loan_amount
    • loan_duration
    • monthly_expenses
    • outgoing_address
    • outgoing_mortgage
    • outgoing_valuation
    • savings_contribution
  2. Add a backend endpoint to receive the application submission

  3. Query all existing applications and get the average loan_amount

  4. Save the new application to the applications table

  5. Return if new loan's loan_amount is above or below the average

Commit your code to your personal git and share the link with us.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published