How karanratiya123/coffee-shop-management-system works
Purpose and Delivery Model
BrewOS is a browser-only coffee-shop POS prototype built with vanilla HTML, CSS, and JavaScript. Each screen is a separate static HTML entry point; no server, API, database, build system, or framework is present. Client-side browser storage provides persistence.
Entry and Session Boundary
Operator sign-in begins at index.html, with PIN/operator validation in script.js. Successful authentication writes operator/session context to sessionStorage, which downstream POS pages use; logout returns the user to the sign-in flow. The defined operator PINs are embedded application behavior rather than externally managed identity.
POS Dashboard and Order Lifecycle
dashboard.html and dashboard.js form the primary cashier workflow:
• Search and category controls filter the product catalog.
• Product selections populate a live cart.
• Cart logic calculates subtotal, threshold discount, tax, and total.
• Payment produces a receipt-oriented checkout flow and clears the active cart.
• Hold actions generate a reference and preserve an unfinished transaction.
This is the central control boundary between transient active-cart state and persisted transaction records.
Local Transaction Persistence and History
Completed and held orders are persisted in browser localStorage by the dashboard flow. history.html and history.js read that local order store, render transaction status and totals, and provide history filtering/search. Data is therefore scoped to the browser/device profile and is not shared between terminals.
Catalog Exploration
menu.html and menu.js provide a menu-board/catalog-oriented view separate from checkout. It supports search and category/dietary filtering while exposing product details such as ingredients, nutrition, and stock. The dashboard and menu views represent distinct consumption contexts over catalog state, though no central backend catalog service exists.
Feedback and Operator Preferences
feedback.html with feedback.js accepts ratings/comments, validates submissions, persists reviews locally, and recomputes visible feedback metrics. settings.html and settings.js manage operator-oriented UI preferences—such as display/font behavior and checkout preferences—persisted per operator in localStorage. These are local personalization domains, not access-control or administrative systems.
Shared Presentation Runtime
style.css is the shared responsive visual system across all static views. bg-circles.js supplies reusable ambient background animation. Assets under assets provide visual media, including the README-referenced dashboard and login imagery. The runtime dependency surface is limited to standard browser DOM APIs, sessionStorage, localStorage, and browser printing/modal behavior.
Main entry points: dashboard.html Cashier dashboard · style.css Shared visual system · script.js PIN validation · settings.js Preference management
Components 19
Entry & Session
- Sign-in · Validates embedded operator PINs and starts a session.
index.html - PIN validation
script.js - Session context · Operator context shared only within the browser session.
POS Workflow
- Cashier dashboard · Primary checkout entry point.
dashboard.html - Cart & checkout · Builds carts, calculates discount/tax/totals, and completes or holds orders.
dashboard.js - Local orders · Held and completed transactions scoped to one browser profile.
Supporting Views
- Order history
history.html - History search · Renders and filters locally stored transactions.
history.js - Menu board
menu.html - Catalog exploration · Filters catalog items and exposes detail, nutrition, and stock.
menu.js - Feedback
feedback.html - Review handling · Validates reviews and recomputes visible metrics.
feedback.js - Operator settings
settings.html - Preference management · Stores display and checkout preferences per operator.
settings.js
Browser Runtime
- Local reviews
- Local preferences · Per-operator UI and checkout personalization.
- Shared visual system · Responsive presentation shared by static views.
style.css - Background animation
bg-circles.js - Visual assets · Login and dashboard imagery.
assets
Connections 21
- Sign-in → PIN validation: loads
- PIN validation → Session context: writes on sign-in
- PIN validation → Cashier dashboard: redirects after auth
- Session context → Cashier dashboard: operator context
- Cashier dashboard → Cart & checkout: loads
- Cart & checkout → Local orders: persists held/completed orders
- Order history → History search: loads
- History search → Local orders: reads and filters
- Menu board → Catalog exploration: loads
- Feedback → Review handling: loads
- Review handling → Local reviews: persists reviews
- Operator settings → Preference management: loads
- Preference management → Local preferences: persists per operator
- Session context → Preference management: identifies operator
- Cashier dashboard → Shared visual system: shared styling
- Menu board → Shared visual system: shared styling
- Order history → Shared visual system: shared styling
- Feedback → Shared visual system: shared styling
- Operator settings → Shared visual system: shared styling
- Sign-in → Background animation: ambient runtime
- Cashier dashboard → Visual assets: uses imagery