How vegan-food/vegetarian_restaurant_front-end works
Project type and purpose
• This is a single-page React application bootstrapped with Create React App.
• It serves as a restaurant ordering system (user pages: home, cart, payment, profile; manager pages: dashboard, food management, order list, profile).
• State is managed via Redux; data comes from local JSON and remote APIs (e.g., Google login, payment gateway).
File structure
• Top-level: public (static HTML, manifest), src (all React code), package.json (dependencies), README.
• src/index.js: app entrypoint; src/AppPage.jsx (core router).
• src/components: reusable UI (Header, Footer, Banner, About, Sidebar).
• src/pages: page-level components organized by feature (home, cart, payment, profile, auth, dashboard, manager).
• src/features/menu.jsx: specific feature module.
• src/hooks/database.jsx: custom hook(s) for data fetching.
• src/redux/api.jsx: API client (thunks or RTK Query).
• src/data: local JSON (meal_data, discounts, order_history).
• src/lib/google_login.jsx: OAuth integration.
• Styling: CSS files colocated with components/pages.
Key insights from README
• Standard CRA scripts (start, build, test).
• No backend code here—assumes external API(s).
• Mentions react-bootstrap/bootstrap (UI framework).