How ronaldkwan93/cafe_on_click works
Project type and purpose
• This is a single‐page e-commerce frontend built with React.js (via Vite) and styled with SASS modules.
• It has no separate backend service; instead it uses Firebase/Firestore as a BaaS (Backend-as-a-Service).
File structure
• Top level:
• vite.config.js, package.json, eslint.config.js – build and linting configs
• firebase.js – initializes Firebase SDK (Firestore)
• src folder:
• components/ – reusable UI pieces (CartItem, CartModal, FeatureSection, Footer, InputBar, Menu, NavBar, ProductCard, ProductModal)
• pages/ – page‐scoped views (Main page, Cart page)
• context/CartContext.jsx – React Context for cart state & actions
• services/CafeServiceProvider.js – abstraction over Firestore reads/writes
• App.jsx + main.jsx – root setup (<App> wrapped in CartContext provider)
README for additional insights
• Describes core features (product modal, cart modal and page, favorites).
Elements
• Blue for client‐side components
• Green for service/data layer
• Orange for external/third‐party (Firestore, Hosting)