Test Backend Inosoft API

Test Backend Inosoft API is a Laravel-based application that provides Rest API for vehicle sales.

Requirements

Before installing this project, make sure you have the following prerequisites:

  • PHP 8.0
  • Laravel 8
  • MongoDB 4.2

Installation

Follow these steps to install and set up Project Name:

  1. Clone the repository:

    git clone https://github.com/sakukode/test-inosoft-api.git
  2. Install the dependencies using Composer:

    composer install
  3. If you prefer to use Laravel Sail for local development, build the Docker images:

    ./vendor/bin/sail build --no-cache
  4. Start the application on your local machine:

    ./vendor/bin/sail up -d
  5. Copy the .env file:

    cp .env.example .env
  6. Generate an application key:

    php artisan key:generate
  7. Generate jwt secret using the Artisan command:

    php artisan jwt:secret
    
  8. Run the database migrations and seed the database:

    php artisan migrate --seed

Testing

To run the tests for this project, follow these steps:

  1. Create a copy of the .env.example file and name it .env.testing. Update the configuration accordingly.

  2. Generate jwt secret using the Artisan command:

    php artisan jwt:secret --env=testing
    
    
  3. Run the tests using the Artisan command:

    php artisan test

License

Test Backend Inosoft API is open-source software licensed under the MIT License.