The purpose of this challenge is to develop a functioning shopping cart. It should demonstrate your ability with several languages in the typical Web development stack. Build the application in such a way that you would feel comfortable putting it in production and comfortable maintaining.
You can use any tools, framework, dependencies, or methodology you choose. If you use a framework or dependencies, be sure to separate them from the source code you actually write.
⚠️ Additional instructions may be provided to tweak these requirements. For example, a specific language or framework may be required or restricted, depending on the focus of the challenge.
To be clear, this shopping cart is like any other; it should provide a summary of items in the cart, as well as their quantities, subtotal, grand total, including GST and QST. It is a step before actually checking out, when payment and address must be registered. There is no need to build a product catalog and mechanism for adding items to a cart. Assume there are products in a cart already.
- The cart's content is stored in a database
- Enable the user to adjust the quantities of the items in the cart
- State is maintained, per session
- PHP or Python
- HTML
- JavaScript
- CSS
-
Source code
- Hosted on GitHub
-
Installation instructions
- Example: utilitizing dependency management configuration via Composer or PiP.
-
Tools used for development
-
Online demo
There is a live demo available at https://carttest.johnathonwood.com
- open a terminal, cd to base dir of where you want it installed:
git clone [email protected]:watchwood/carttest.git
- Create Homestead.yaml file for project in root dir, based on included example. Map the information in that file to the conditions of your local setup
- create .env file for project in root dir, based on included example.
composer install
vagrant up
vagrant ssh
(to access VM internally, password issecret
)cd code
php artisan key:generate
php artisan migrate --seed
php artisan optimize:clear
- resources/views/home.blade.php
- public/main.css
- app/Http/Controllers/Controller.php
- app/Http/Controllers/ApiController.php
- app/Models/CartItem.php
- app/Models/Item.php
- The project was written using Laravel, Vue, and Axios
- VSCode was used as the IDE, and local development was done with a Laravel Homestead VN.
- Laravel's default bootstrapping code (NOT Bootstrap the front end tools, to be clear) was largely left in place.