How duongnotnhan/alihaiba works
AliHaiBa is a browser-based storefront with product browsing, account flows, a shopping cart and demo checkout. Users interact with page controls; js/main.js handles page events and initializes the cart and product listing, while feature modules render and update the interface. Accounts, cart contents and favorites use browser storage. The tree also includes Bootstrap and Font Awesome runtime assets. HTML script wiring and several module implementations were not shown, so relationships requiring those details are omitted.
Main entry points: main.js Page events · auth.js Account flows · cart.js Cart and checkout · layout.js Shared layout
Components 20
Storefront flows
- Page events
js/main.js - Account flows
js/auth.js - Cart and checkout
js/cart.js - Browser storage
js/storage.js - Form handling
js/forms.js
Catalog and content
- Product data
js/data.js - Product listing
js/products.js - Shared layout
js/layout.js - Home page
index.html - Products page
products.html - About page
about.html - Contact page
contact.html
UI libraries
- Bootstrap bundle
css/bootstrap-5.3.8-dist/js/bootstrap.bundle.js - Bootstrap ESM
css/bootstrap-5.3.8-dist/js/bootstrap.esm.js - Bootstrap JS
css/bootstrap-5.3.8-dist/js/bootstrap.js - Font Awesome engine
css/fontawesome/js/fontawesome.js - Regular icons
css/fontawesome/js/regular.js - Legacy icon shims
css/fontawesome/js/v4-shims.js - Icon conflict checks
css/fontawesome/js/conflict-detection.js
Other components
- Shopper
Connections 11
- Shopper → Page events: triggers events
js/main.js - Page events → Cart and checkout: handles cart actions
js/main.js - Page events → Account flows: opens account
js/main.js - Page events → Product listing: renders products
js/main.js - Page events → Shared layout: renders cart root
js/main.js - Cart and checkout → Product data: looks up products
js/cart.js - Cart and checkout → Browser storage: reads and writes
js/cart.js - Account flows → Browser storage: reads and writes
js/auth.js - Shared layout → Account flows: checks current user
js/layout.js - Shared layout → Cart and checkout: renders cart
js/layout.js - Account flows → Bootstrap bundle: uses modal API
js/auth.js