# 5013 Final Project - Online Cup Store ### Team Ruowen Niu, Linfan Gan, Jiaen Zhang ### Link To CodePen: Customer side:https://codepen.io/niur735/pen/qBRyLKo Business side:https://codepen.io/niur735/pen/OJWwbzb ### Link To Firebase: https://console.firebase.google.com/u/0/project/testing-f0d50/firestore/data ***collection: products & sold*** ## Description By using realtime data, we want to create a platform that allow customers and sellers to communicate. Customers can see products' status, modify their cart and buy products through the customer end. Sellers can modify products' status, add/delets products, and see how many products they have sold and how much money they have earned via the Business end. With the using of realtime database, customers can see updated products' status immediately when selles modified them. ## C-End: ### Feature 1 Generate a product list with firebase data.Users can see price or stock change immediately. ***(onSnapshot)*** ### Feature 2 Click "Add to Cart" button to add a product to "Your Cart", which works as a shopping list. ***(push & loop)*** ### Feature 3 On the right section which is "Your Cart", users could increase or decrease the number of the items by clicking the buttons. ***(increase & decrease)*** ### Feature 4 Then, users can make the orders according to their shopping lists. After they clicked "Check Out", the order info will be updated to the firebase, and their shopping list will be clean. ***(set)*** ## B-End ### Feature 1 Generate a product list with firebase data. ***(onSnapshot)*** ### Feature 2 Click "Add Now" button to add filled info as a new product to the products collection. ***(set)*** ### Feature 3 Click "Edit" button on the left-side screen to open the editor on the right-side screen. Use "save" button or "delete" button to update changes to the database. ***(update & delete)*** ### Feature 4 Check the amount of sold products and calculate earned money in total. When user made order, sellers can see it immediately. ***(for loop)*** ## Bug to Fix On the C-End, when customers add discount product to the shopping list, they will have original price in the cart. ***(C-End CodePen Line 102)***