AUTOCHECK ASSESSMENT

Prerequisites

  • Node.js installed
  • Git installed
  • Postman installed
  • A code editor (e.g Visual Studio Code)

Installation

  1. Clone the repository:

    git clone https://github.com/preciousaffiah/AutoCheck_Assessment.git
    
  2. Change to the project directory:

    cd AutoCheck_Assessment
    
  3. install project dependencies:

    npm install
    
  4. Create a .env file in the project root with the following environment variables:

    # Server
    APP_NAME=
    APP_ENV=
    APP_PORT=
    
    # JWT Token
    JWT_SECRET=
    JWT_EXPIRE=
    JWT_REFRESH_EXPIRE=
    
    # Database
    DB_CONNECTION=sqlite
    DATABASE='./autocheck.sqlite'
    
    #API
    VINAPIKEY=
    VINURL=

Update the values with yours.

  1. Start the application:
    npm run start
    
  2. On start of the application: Admin data will be seeded automatically

API Documentation

  1. In the project folder, you'll see a folder called postman_doc

postman_doc

  1. Open your postman and import both files in the folder

postman_import

  1. In the newly exported collection, set the environment to the newly exported one called auto_check_dev

postman_env

  1. Endpoints that require auth_token will be automatically set via a script that will be ran when the either login or register

  2. The postman requests have already been populated with placeholder data

  3. Admin login details have already been placed in the postman request body. incase you don't find it, please check adminSeed service for details

  4. Go ahead and make other requests!