How vegetarian-restaurant/vegetarian_restaurant_front-end works
Project type and purpose
• This is a single-page application (SPA) built with Create React App.
• It provides a public-facing Home page (with hero, featured products, categories, footer, etc.), an authentication flow (login page with Google OAuth), and a user Dashboard.
• State is managed client-side with Redux, and assets/data (meal_data.json) are bundled at build time.
File structure
• public/ – static HTML entrypoint (index.html), PWA manifest, robots.txt.
• src/index.js – React entrypoint that renders <App/> into the DOM.
• src/App.* – top-level application component and styles.
• src/pages/ – routes grouped by feature:
– /home – Home_screen.jsx plus sub-components (Header, Hero, FeaturedProducts, Categories, About, Footer).
– /auth – login.jsx for authentication.
– /dashboard – dashboard.jsx and related CSS.
• src/components/ – shared UI components (e.g., menu.jsx).
• src/features/ – feature-scoped code (menu behavior).
• src/hooks/ – custom hooks (database.jsx).
• src/lib/ – library wrappers (google_login.jsx).
• src/redux/ – Redux store configuration and API slice (api.jsx).
• src/data/ – static JSON data (meal_data.json).
• src/assets/ – images, SVGs.
Extract insights from README
• Built with Create React App – uses Webpack, Babel, ESLint under the hood.
• Standard npm scripts for start, test, build, eject.
• No backend code here – likely calls external REST endpoints (configured in src/redux/api.jsx).
Final reminders
• Be granular: break the React app into routing, UI, state, data layers.
• External dependencies (OAuth, REST API).
• Both build-time (static assets) and run-time (API calls) flows.