Skip to content

WillianMafra/Car-Rental

Repository files navigation

Car Rental

📝 Car rental is a full stack api rest web application made to rent cars. The application have admin and user role, only admins can create brands, car models and cars. Users only can rent cars to use.

car-rental-api

🛠️ Made with Laravel, VueJS Composer, NPM, PHP, Postgres, Swagger and Docker

What you need to use Car Rental:

  • Docker
  • Docker Compose
  • Git

Initial Configuration 🚀

  1. Clone this repository
    git clone https://github.com/WillianMafra/Car-Rental.git
  1. Access the project directory.
    cd Car-Rental
  1. Install Composer dependencies.
    docker run --rm \
        -u "$(id -u):$(id -g)" \
        -v "$(pwd):/var/www/html" \
        -w /var/www/html \
        laravelsail/php83-composer:latest \
        composer install --ignore-platform-reqs
  1. Create an alias to simplify using Sail.
    alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
  1. Rename the .env copy file to .env.
    mv '.env.example' .env
  1. Initialize the Docker environment using Sail.
    sail up -d
  1. Access the application container.
    sail shell
  1. Generate an application key.
    php artisan key:generate
  1. Run database migrations.
    php artisan migrate --seed
  1. Create the jwt secret key.
    php artisan jwt:secret
  1. Create the link to storage files.
    php artisan storage:link
  1. Run npm install to install Node.js dependencies and npm run dev to compile assets.
    npm install
    npm run dev

Accessing the Application

After following the steps above, the Car Rental app should be up and running and accessible through the web browser at the following address:

http://localhost/login

You can login in the application as user with the email => '[email protected]' and password '12345' or login as admin using email => '[email protected] and password '12345'

Stopping the Sail Environment

To stop the Sail environment, exit the application shell by typing

    exit

and then execute the following command in the project directory:

sail down

😄 Made by:

Foto do Willian no LinkedIn
Willian Mafra