How chetannada/namaste-react works
Project Type & Purpose
• This is a front-end Single-Page Application (SPA) built in React.js (the “FoodFire” app), with each “Chapter” folder showing an incremental build of the same app. The final production code lives under Chapter 09 – Optimizing our App/Coding.
• Purpose: demonstrate React concepts (components, hooks, optimization) while consuming an external API (FoodFire Server) to display restaurant and menu data.
File Structure Analysis
• Top-level:
• index.html, index.css – root entrypoint and CSS
• package.json / package-lock.json – dependencies & scripts
• .env – environment variables (e.g., API base URL)
• netlify.toml, _redirects – hosting configuration
• public/ – static assets (images, constants.js)
• Source code:
• Chapter 09/Optimizing our App/Coding/
– App.js – root React component & router setup
– Components/ – presentational & container components
– Hooks/ – custom hooks (useAuth, useResData, etc.)
– Utils/ – helper functions
– index.css – chapter-specific styling
README Insights
• Built with React.js + Parcel.js (bundler)
• Deployed on Netlify
• Fetches data from a separate “FoodFire Server” (hosted on Render) to avoid CORS issues
• Environment variable (e.g. REACT_APP_API_URL) points at the API server