Skip to content

Latest commit

 

History

History
97 lines (59 loc) · 3.26 KB

File metadata and controls

97 lines (59 loc) · 3.26 KB

Car-Insurance-Quote-App-with-TDD

This repository contains the code and documentation for building the backend of an insurance purchasing process while following the principles of Test-Driven Development (TDD).

Tech Stack

Client

React Javascript Tailwind

Server

Typescript node js

DataBase

MySql

Test

Mocha


Screen.Recording.2023-10-03.at.9.15.58.AM.mov

APIs

I worked on three RESTful APIs that are essential for the insurance purchasing process. These APIs are:

API 1: Convert "Model" and "Year" to a Suggested "Car Value"

  • This API takes parameters "model" and "year" and returns a suggested car value in JSON format based on specific business rules.

API 2: Convert "Claim History" to a "Risk Rating"

  • This API takes the parameter "claim_history" and calculates a risk rating for a driver based on a set of keywords in the claim history text.

API 3: Convert "Car Value" and "Risk Rating" to a "Quote"

  • This API takes parameters "car_value" and "risk_rating" and calculates monthly and yearly premium values for an insurance policy.

TDD

Task 1: Created Test Cases

  • Wrote comprehensive test cases for the APIs to verify their functionality.

Task 2: Implemented Unit Tests

  • Implemented 5 of the test cases as automated unit tests using the recommended unit testing framework.

Task 3: Built API

  • Built the API and continuously tested it against the unit tests to ensure it passed all cases.

Screenshot 2023-10-03 at 9 20 29 AM

Screenshot 2023-10-03 at 9 20 41 AM


Getting Started

To get started with this mission, follow these steps:

  1. Clone this repository to your local development environment.

    git clone https://github.com/HelenaMission/Car-Insurance-Quote-App-with-TDD.git
  2. Set appropriate env file to connect with database.

  3. Open backend folder in terminal and run dev

    npm run dev
  4. To run test, open backend folder in terminal and run test

    npm run test
  5. Open frontend folder in terminal and run start script

    npm start

Feel free to reach out if you have any questions or need assistance during this mission.