How vampirer1986-nguyen/kfc works
This repository implements a browser-based food-ordering demo, not a live commerce backend. The principal flow loads a CSV menu, lets a shopper add and edit cart items, collects buyer details, then reviews and saves a demo order in browser storage. The checkout offers COD, bank-transfer, and e-wallet demo choices; it does not process real payments or delivery. The source excerpts establish the JavaScript interactions; the HTML and CSV contents were not sampled, so their internal structure is not detailed here.
Main entry points: checkout.js Checkout modal · cart.js Cart and buyer form · checkout-logic.js Saved demo orders · app.js Menu loader and cards
Components 9
Menu browsing
- Menu loader and cards
js/app.js - Product catalog
data/products.csv
Cart and buyer
- Cart and buyer form
js/cart.js
Demo checkout
- Checkout modal
js/checkout.js - Order rules
js/checkout-logic.js
Browser persistence
- Cart and buyer storage
js/cart.js - Saved demo orders
js/checkout-logic.js
Other components
- Shopper
- Browser localStorage
Connections 9
- Menu loader and cards → Product catalog: fetches CSV
js/app.js - Shopper → Cart and buyer form: adds items
js/cart.js - Cart and buyer form → Cart and buyer storage: saves cart and buyer
js/cart.js - Cart and buyer storage → Browser localStorage: reads and writes
js/cart.js - Cart and buyer form → Checkout modal: dispatches checkout
js/cart.js - Checkout modal → Order rules: validates and builds order
js/checkout.js - Checkout modal → Saved demo orders: requests order save
js/checkout.js - Saved demo orders → Browser localStorage: reads and writes
js/checkout-logic.js - Checkout modal → Cart and buyer form: signals completion
js/checkout.js