Scalable RESTful API which provides functionality for using and managing the car rental network. Authenticated users can choose and rent a car from list of available rental branches.
User with respective access rights has ability to manage any entity of the system including the following:
- users
- user roles/actions
- products
- product types
- countries (in which branches are available)
- cities (in which branches are available)
- branches
- discount system
- rental plans (amount of hours for rent)
- payment types
- payment statuses
- orders
Web application built on Laravel framework. Authentication uses OAuth protocol. Also there is implemented RBAC (Role Based Access Control) as an additional middleware. Extended validation rules during order creation ensures that correct price provided by the user.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
git clone git@github.com:michael-ignatiev/car-rental.git project-folder
composer install && composer update
php -r "copy('.env.example', '.env');"
php artisan key:generate
- update db connection credentials in the
.env
file php artisan migrate
- also add to
.env
file the following settingAPI_CURRENT_VERSION=v1
php artisan db:seed
php artisan passport:install
- copy generated keys and paste to .env file:
PERSONAL_CLIENT_ID=1
PERSONAL_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PASSWORD_CLIENT_ID=2
PASSWORD_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
php artisan serve
- Laravel - The PHP Framework