Digital Dojo is a consumer electronics E-Commerce store where customers can buy gadgets like laptops, smartphones, videogames, etc...
Tech stack used for this project: HTML, CSS, Bootstrap, Javascript, RESTful APIs with CRUD methods, MongoDB for the backend hosted on https://striveschool-api.herokuapp.com/.
Digital Dojo can be accessed by any device (fully responsive) by clicking on the following link: https://alex188dot.github.io/E-Commerce/
The website will display all the available products, that are fetched directly from the database.
![Homepage](https://private-user-images.githubusercontent.com/117444853/263451699-58921952-ecd4-4a06-9eec-193d769e3828.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDA3NzcsIm5iZiI6MTcyNDMwMDQ3NywicGF0aCI6Ii8xMTc0NDQ4NTMvMjYzNDUxNjk5LTU4OTIxOTUyLWVjZDQtNGEwNi05ZWVjLTE5M2Q3NjllMzgyOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNDIxMTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNzUxNDE1ODIxYzI3MWM4Zjk4MDFjZjJiNjU0NTNjZDY2YTNmY2NlMWE4ZjA1M2YxNmEyMGFjYzU0OWQ2OTc1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.KeJb4Ov-oFxGSpl2-tqGzP3ty1r6aKFXA9Gb06424BQ)
By clicking on each product, the user will be able to see more details like a full description and a larger image (this is obtained with only one product.html page, by using query strings).
![Screenshot 2023-08-25 at 09 56 35](https://private-user-images.githubusercontent.com/117444853/263215405-19909cdf-feb5-498a-9525-853c56892d08.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDA3NzcsIm5iZiI6MTcyNDMwMDQ3NywicGF0aCI6Ii8xMTc0NDQ4NTMvMjYzMjE1NDA1LTE5OTA5Y2RmLWZlYjUtNDk4YS05NTI1LTg1M2M1Njg5MmQwOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNDIxMTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMmU3YjI4MjQ5NmYxNTNmOWJiOWRkMjg1MzdlMzkxMDg4YTY2YWIwMjhiZDc4MTg1OTA5YzI1MjFmNjcxMDUwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.qdGEoIbdjv9WP8gXkRxivgq0A6DHEWSRIM2AJPDc7lE)
Furthermore the user will be able to add each product to a cart, through the Add to cart button, which can be found either in the homepage or in the product.html page. By leveraging the use of local storage the cart progress is not lost and can be carried with ease through the different webpages, so that when the user decides to proceed to payment, they can click on the top right of the screen and they will be redirected to the cart summary. If the cart is empty the user will find this message:
![Screenshot 2023-08-25 at 15 56 59](https://private-user-images.githubusercontent.com/117444853/263289724-6e280431-9838-4c0b-9cb9-1cc633ca0df3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDA3NzcsIm5iZiI6MTcyNDMwMDQ3NywicGF0aCI6Ii8xMTc0NDQ4NTMvMjYzMjg5NzI0LTZlMjgwNDMxLTk4MzgtNGMwYi05Y2I5LTFjYzYzM2NhMGRmMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNDIxMTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZTk3OTRkMDEyYzk5NzBhMTU1Y2Y5ZWI2MmNhYmZkZGYwMjY2ODhjMzg2ZTQxNTcwNmE1MGEzYjA2NjZlMTg4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.7otGfC-oXYWCSvbUdFA3t8mkdkp5TIFdGVIDX583plc)
On the other hand, if there are items in the cart, a summary like the one below will be displayed:
![Screenshot 2023-08-25 at 09 57 54](https://private-user-images.githubusercontent.com/117444853/263216688-51288a45-eadb-4ec0-a7fe-d596e6cad513.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDA3NzcsIm5iZiI6MTcyNDMwMDQ3NywicGF0aCI6Ii8xMTc0NDQ4NTMvMjYzMjE2Njg4LTUxMjg4YTQ1LWVhZGItNGVjMC1hN2ZlLWQ1OTZlNmNhZDUxMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNDIxMTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NmMxNjk4Njk4OWUyYTA3NjBkNmMwYTI4ZTQyNTBhYTFlZTJkY2RjNzUwZTE0MzMzZmI1NzZhZDI0YWQ5MWQ3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.LKlQ0GKuDoqiVJtTb2jKKLbF5zw6eA5r6N6e5fxIzj4)
Here they will be able to see the total, remove items and proceed to payment. If they click on the button the following message will appear:
By clicking on the top right of the homepage, on Admin Login, the admin will be able to sign into a private area where they will be able to communicate with the database. To access this part use: Admin01 (username) and 01 (password):
![Screenshot 2023-08-26 at 12 45 18](https://private-user-images.githubusercontent.com/117444853/263459498-d5a9103a-e413-45f1-84ef-b89767917898.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDA3NzcsIm5iZiI6MTcyNDMwMDQ3NywicGF0aCI6Ii8xMTc0NDQ4NTMvMjYzNDU5NDk4LWQ1YTkxMDNhLWU0MTMtNDVmMS04NGVmLWI4OTc2NzkxNzg5OC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNDIxMTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wMDIyZGY4ODU0MWE0M2RmZTBiY2IwOGJhNmVjZDBkMTMxNjZlNTA5NGM2MTdjYmY5M2Y2MDk4ZjMxYzU4NDI1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.duxdcF7p3riQuNc197GWXxENn0wzWePslwaSd3itjns)
Once succesfully logged in, the admin will be able to add, update, search and remove a product. Success or error messages will be displayed every time an action is performed.
![Admin_area](https://private-user-images.githubusercontent.com/117444853/263452129-86a90422-53ba-4d89-a75e-19202b884784.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMDA3NzcsIm5iZiI6MTcyNDMwMDQ3NywicGF0aCI6Ii8xMTc0NDQ4NTMvMjYzNDUyMTI5LTg2YTkwNDIyLTUzYmEtNGQ4OS1hNzVlLTE5MjAyYjg4NDc4NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMlQwNDIxMTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZWQ1MWUwYjQ0NzY4MjgyMjE4ZDAxOTllMWFkNDVlZDA2MDhhNDI1NDkxZDdlZjhjZjM1ODU4OWJmMWY3ZDY5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.KjF2lHolaLbL9mQuL0tovtYFAHip--gF8AG8mrg3ACU)
a) Example of adding a product. The admin inserts all the info in the form (all are required) for an Xbox Controller:
By going back to the homepage we will be able to see that the product has been successfully added also on the front-end:
b) Example of updating a product. Let's say the admin wants to change the image for this product: by specifying only the ID (mandatory) and the new image the system will update the imageurl both on the server side and the client side.
Hence the front-end will now show the new image:
c) Example of searching a product. Let's say the admin needs to get the ID of an item quickly, for instance the Xbox, they can just type in the name of the product, and the system will return all the items in the db, matching that query:
d) Example of deleting a product. Let's say the admin needs to delete a product because it is no longer available, they can do so just by inserting the ID in the relative field and click on the Delete Product button:
A confirmation message will be displayed and the product will disappear from the front-end: