The Online Shopping Platform is a robust online store designed to track which items are added to a basket but removed before checkout. This data is beneficial for the sales team to offer targeted discounts. The application is built with Laravel 8 and MySQL.
- Git clone this repository and cd into the project directory:
git clone https://github.com/alainmucyo/shop-app-backend.git
cd shop-app-backend
- PHP 8.2 or greater
- Laravel 8
- MySQL
- Composer
- Docker (optional)
- Install PHP if you don't have it installed.
- Install Composer if you don't have it installed.
- Install MySQL and create a new database for the project.
- Install Docker and Docker Compose (optional).
- Copy
.env.example
to.env
in the project root:cp .env.example .env
- Set your database credentials in the
.env
file. - Run
composer install
to install PHP dependencies. - Run
php artisan key:generate
to generate your application key. - Run
php artisan migrate
to run the database migrations. - Run
php artisan db:seed
to seed the database with test data.
- Run
php artisan serve
to start the server. The API will be running athttp://localhost:8000
.
- Set your testing database credentials in the
.env.testing
file. - Run
php artisan migrate --env=testing
to run the database migrations for testing. - Run
php artisan test
to run the tests.
API doc can be accessed here: https://documenter.getpostman.com/view/11889963/2s93sjUUfw
-
Admin user:
-
Email:
[email protected]
-
Password:
password
-
Role: Allows creation, deletion, and updating of products.
-
Sales user:
-
Email:
[email protected]
-
Password:
password
-
Role: Allows creation of products.
The application is designed to be easily deployed to Fly.io. The Dockerfile
provided is tailored for Fly.io deployment. Follow the instructions in the official Fly.io documentation.
You can access the deployed application at https://alainmucyo-shop.fly.dev.
- PHP 8.2
- Laravel 8
- MySQL
- Docker
- Alain MUCYO - Github Profile
This software is published under the MIT licence.