How hesersu/menu-please-client works
Project type and purpose
• Project type: Single‑Page Application (SPA) front end only
• Purpose: Allow users to browse Chinese, Japanese, Korean menus; place orders; use speech‑to‑text; view order history; translate menus.
File structure
• Top level:
– public/: static assets and redirect configuration
– src/: application source code
• components/: reusable UI widgets (Shadcn/ui)
• contexts/: React Context providers (auth, menu, speech)
• pages/: route‑specific page components
• lib/: utility functions
• assets/: images/fonts etc.
• App.jsx & main.jsx: app bootstrap with Vite
• Config & tooling: vite.config.js, eslint.config.js, package.json, vercel.json
README for additional insights
• Tech stack: React, Vite, Tailwind v4, Shadcn/ui, Context API for state, Axios/Fetch for API calls, ESLint
• Features: browsing, ordering, reservations, speech‑to‑text, translation, responsive design
Main components & interactions
– Browser / Client Device (Mobile/Desktop)
– Static Hosting / CDN (Netlify/Vercel) serving index.html and bundle
– React SPA
• App shell (App.jsx)
• Page components (LoginPage, TranslateMenuPage, etc.)
• UI library components (button, card, dialog, etc.)
• Context Providers (AuthContext, MenuContext, SpeechContext)
– External Services
• Authentication API (login/signup)
• Menu Data API (fetch menus, history)
• Order Processing API
• Translation API (menu translation)
• Speech‑to‑Text API (speech recognition)
b. Relationships & Flows
– User clicks → React Router → Page component
– Page accesses Context → performs state changes or API calls
– Context or utility functions (src/lib/utils.js) make HTTP requests via Axios/Fetch
– Data returned flows back through Context into components
– SpeechContext streams audio to Speech‑to‑Text API and returns transcript
c. Architectural patterns
– SPA (client‑side routing via React Router)
– Context API for global state (auth, menu, speech)
– Component‑based UI (Shadcn/ui & Tailwind)
– Separation of concerns: pages vs. shared components vs. contexts vs. utils
d. Key technologies & libraries
– Vite (dev server, bundler)
– React & React Router
– Tailwind CSS & Shadcn/ui for styling
– Context API for state management
– Axios / Fetch for HTTP
– Speech SDK / Web Speech API for speech‑to‑text