Online shopping business implementation
- Laravel - PHP web framework
This project runs on Laravel 9 and requires PHP 8.0+ .
- git clone MyShop
- Run
composer install
to install packages . - Copy .env.example file, create a .env file if not created and edit database credentials there .
- Copy .env.example file, create a .env.testing file if not created and edit database credentials there for testing, you can use in-memory db sqlite (If using in memory do not forget to create a database.sqlite file).
- Run
php artisan key:generate
to set application key to secure user sessions and other encrypted data . - Run
php artisan migrate:fresh --seed
to run database migrations and seed data. - Run
php artisan passport:client --personal
to generate passport client ID. - Run
php artisan serve
to start the server (Ignore if using valet) . - Run
php artisan test
to run tests .
-
Admin Email : admin@myshop.com , Password : password.
-
User Email : user@myshop.com , Password : password.
-
Sales Rep Email : salesrep@myshop.com , Password : password.
- Please click here to access the Postman Collection
This is the basic flow of the application.
- Register
- Login
- To create a new product, be logged in as an admin (Only an admin can access this endpoint)
- A user can create an order.
- A user can remove a product from cart.
- A user can checkout order.
- A sales rep can login and hit the "removed items" endpoint to get the list of products that were removed before checkout
- Caching is not implemented