The Chef-Restaurant app is a web application showcasing a variety of food items, allowing users to browse, filter, and search for meals based on their preferences. It consists of a React-based frontend and a Node.js backend, both deployed using Vercel.
- View a selection of food items with details like name, description, price, and image.
- Filter food items by categories: Breakfast, Lunch, Dinner.
- Search food items by name.
- Dynamic image loading from the backend.
- Frontend: React, Styled-Components
- Backend: Node.js, Express
- Deployment: Vercel
git clone https://github.com/Prakashkumar88/Chef-Restaurant.git
cd Chef-RestaurantNavigate to the server folder and install dependencies:
cd server
npm installTo run the backend locally:
npm startThe backend server will be available at http://localhost:9000 and serves static images from the server/public/images folder.
Navigate to the app folder and install dependencies:
cd ../app
npm installTo run the frontend locally:
npm run devThe frontend will be available at http://localhost:3000.
Deployed using Vercel. Visit:
Frontend Deployment
Deployed using Vercel. Visit:
Backend Deployment
Chef-Restaurant/
│
├── server/
│ ├── public/
│ │ └── images/ # Image files (e.g., egg.png, ramen.png, etc.)
│ ├── src/
│ │ └── index.ts # Backend server code
│ └── package.json # Backend dependencies
│
├── app/
│ ├── public/
│ │ └── logo.webp # App logo
│ ├── src/
│ │ └── App.js # Frontend React code
│ └── package.json # Frontend dependencies
│
├── .gitignore # Git ignore file
├── vercel.json # Vercel configuration
└── README.md # Project documentation
-
Backend Images:
- Place images in the
server/public/imagesdirectory. - The backend serves them at
/images. Example:https://chef-restaurant-server.vercel.app/images/egg.png
- Place images in the
-
Frontend Images:
- Use
BASE_URLto dynamically load images:<img src={`${BASE_URL}${image}`} alt="Food Item" />
- Set
BASE_URLto the deployed backend URL:https://chef-restaurant-server.vercel.app.
- Use
- Ensure the images are deployed in the
server/public/imagesdirectory. - Verify the image URL by accessing it directly in the browser, e.g.,
https://chef-restaurant-server.vercel.app/images/egg.png.
- Check the backend server status. Ensure it is running and accessible.
- Verify the API endpoint URL in the frontend.
We welcome contributions to improve the Chef-Restaurant app. To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name. - Make your changes and commit:
git commit -m 'Add new feature'. - Push to your fork:
git push origin feature-name. - Submit a pull request.
This project is licensed under the MIT License. Feel free to use and modify it as needed.
Let me know if additional details are required or if you’d like further adjustments!