You are browsing as a guest. Sign up (or log in) to start making projects!

2h 50m 44s logged

Overview :
Refactored the DuskCoffee client and backend to replace static mockups with a dynamic, data-driven system. Implemented checkout calculations, order submission endpoints, schema updates for order persistence, and a local JSON fallback mechanism for offline development.

File Changes SummaryEdited Files:
checkout.html — Updated UI container structure to support dynamic order rendering.checkout.

js — Added localStorage cart parsing, dynamic item rendering, price computations (subtotal, tax, delivery), and API POST triggers.

menu.html — Removed duplicate static .menu-full-card markup to rely on JavaScript rendering.

script.js — Refactored fetch logic to hit live API endpoints first, falling back to static JSON on failure.

schema.sql — Extended database schema with orders and order_items tables; verified product image paths.

server.js — Mounted orders API route and configured server initialization.

Added Files:
orders.js — Express route handler to process incoming checkout payloads and persist orders to MariaDB.

menu-fallback.json — Static fallback dataset containing all 16 menu items for local development.

checkout.html - Static checkout page but with dynamic/sync data with what item’s user add to cart

1
9

Comments 0

No comments yet. Be the first!