This is a React application for ordering food online. It allows users to browse through available food items, add them to their cart, and place orders.
- Browse Food Items: Users can browse through a variety of food items available in the app.
- Add to Cart: Users can add food items to their cart for ordering.
- State management with Context API
- Reusable hooks for HTTP requests
- Responsive design for various devices
- React: The frontend of the application is built using React.js.
- Demo Backend: A demo backend is used for fetching data related to food items and orders.
- Custom Hook (UseHttp): A custom hook named UseHttp is used for making HTTP requests to the backend.
- Context API: The Context API is used for managing global state, including cart state, throughout the application.
To get started with this project, follow these steps:
1- Clone the Repository:
git clone https://github.com/your-username/food-order-react-app.git
2- Install Dependencies:
cd food-order-react-app npm install
3- Run the Application:
npm run dev
4- Run demo backend
cd backend
npm start
This will start the development server.
- Upon running the application, users can browse through the available food items on the homepage.
- They can click on any item to view details and add it to their cart.
- The cart icon at the top right corner shows the number of items in the cart.
- Clicking on the cart icon opens the cart, where users can view the items they've added and place orders.
Contributions are welcome! If you'd like to contribute to this project, feel free to open a pull request.