How faraz-rahimi/restaurant works
Foodino is a bilingual restaurant-ordering SPA. Visitors browse the landing page or menu, add food to a cloud-backed cart, then sign in or register to manage and submit orders; the cart page also displays order history. The diagram preserves the documented landing-page sections, responsive navigation, localization, and account flows. API request links follow the excerpts and README; unsampled implementation details are not inferred.
Main entry points: App.tsx SPA routes · Header.tsx Navigation · users.ts Users client · Home.tsx Landing page
Components 27
Visitor experience
- SPA routes
src/App.tsx - Site layout
src/Components/Layout.tsx - Navigation
src/Components/Header.tsx - Landing page
src/Pages/Home.tsx - Hero section
src/Components/Hero.tsx - About section
src/Components/About.tsx - Contact section
src/Components/Contact.tsx - Footer
src/Components/Footer.tsx - Not found page
src/Pages/PageNotFound.tsx
Ordering
- Menu page
src/Pages/Menu.tsx - Food cards
src/Components/FoodCard.tsx - Cart and orders
src/Pages/Cart.tsx - Products client
src/API/products.ts - Orders client
src/API/orders.ts - Products API
- Orders API
Accounts
- Sign in
src/Pages/Profile/Login.tsx - Registration
src/Pages/Profile/SignUp.tsx - Users client
src/API/users.ts - Users API
Shared services
- Localization setup
src/I18n/I18n.ts - Translation files
src/I18n/Locales - Local storage hook
src/Hooks/useLocalStorage.ts - Mobile breakpoint hook
src/Hooks/useIsMobile.ts - Login icon
src/Components/LoginIcon.tsx - Brand logo
src/Components/Logo.tsx
Other components
- Visitor
Connections 31
- Visitor → SPA routes: opens
- SPA routes → Site layout: routes through
src/App.tsx - SPA routes → Landing page: routes to
src/App.tsx - SPA routes → Menu page: routes to
src/App.tsx - SPA routes → Cart and orders: routes to
src/App.tsx - SPA routes → Sign in: routes to
src/App.tsx - SPA routes → Registration: routes to
src/App.tsx - SPA routes → Not found page: routes fallback
src/App.tsx - Site layout → Navigation: renders
src/Components/Layout.tsx - Site layout → Footer: renders
src/Components/Layout.tsx - Landing page → Hero section: renders
src/Pages/Home.tsx - Landing page → About section: renders
src/Pages/Home.tsx - Landing page → Food cards: renders
src/Pages/Home.tsx - Landing page → Contact section: renders
src/Pages/Home.tsx - Menu page → Food cards: renders
src/Pages/Menu.tsx - Food cards → Products client: fetches catalog
src/Components/FoodCard.tsx - Products client → Products API: requests products
README.md - Food cards → Users client: reads and updates cart
src/Components/FoodCard.tsx - Cart and orders → Users client: reads and clears cart
src/Pages/Cart.tsx - Cart and orders → Orders client: submits and fetches
src/Pages/Cart.tsx - Orders client → Orders API: requests orders
README.md - Users client → Users API: requests users
src/API/users.ts - Sign in → Users client: checks credentials
src/Pages/Profile/Login.tsx - Registration → Users client: checks and registers
src/Pages/Profile/SignUp.tsx - Navigation → Users client: loads user
src/Components/Header.tsx - Navigation → Local storage hook: persists language
src/Components/Header.tsx - Navigation → Mobile breakpoint hook: checks viewport
src/Components/Header.tsx - Navigation → Brand logo: renders
src/Components/Header.tsx - Navigation → Login icon: renders
src/Components/Header.tsx - SPA routes → Localization setup: loads localization
src/main.tsx - Localization setup → Translation files: loads dictionaries
src/I18n/I18n.ts