How rohitsharma50/food-orderinf-website works
Project type and purpose
• This is a single-page web application built with React.js and Parcel.js.
• It presents a “foodie” ordering interface, fetching live restaurant and menu data from Swiggy public APIs, allowing users to browse, filter, search, add items to a cart, and place orders (front-end only).
File structure
• Top-level config & build files:
• .babelrc, .postcssrc, tailwind.config.js → code transpilation and styling
• package.json / package-lock.json → dependencies & scripts (npm run start invokes Parcel dev server)
• index.html, index.css → HTML entry point and global styles
• src/ directory:
• src/App.js → application root (React Router setup, Context/Provider wrapping)
• src/components/ → UI building blocks (Header, Footer, pages: About, Cart, Contact, Error, Instamart, etc.)
• src/utils/ → helper functions, constants, Redux Toolkit slice (cartSlice.js), store.js, custom hooks (useOnline, useRestaurant)
• src/assets, src/Images → static assets
• Routing, lazy loading, and state management are present.
README for additional insights
• Key features: multi-select filters, search, shimmer UI placeholders, CORS workaround, Tailwind CSS, class-based components, React Router DOM, lazy loading, Context API, “lifting state up.”
• The app fetches from Swiggy public APIs, implying an external service boundary.