FoodExplorer is a React-based web application built with Vite, that allows users to explore and discover dishes from a restaurant, like a digital menu. You can visit the deploy here. Admins are able to manage the restaurant's dishes. I followed the mobile-first approach, using styled-components, focusing on the user experience on all devices. I also use the Context API to manage the state and the authentication, as well as the use of cookies to store the user's session. For previewing admins features, please use email: teste_admin@teste.com; pwd: teste_admin. Don't worry with changes! It will reset automatically...
- Sign up and login
- See the dishes from the restaurant sorted by category
- Search for a dish by name and by ingredients
- Set a quantity and add it to the order
- See the details of the dish
- See the ingredients of the dish
- Add a dish to the favorites
- See their favorite dishes and unfavorite them
- Add, edit and delete dishes
- See the favorited dishes, ordered by the number of times they were favorited and sorted by category
- Search for a dish by name and by ingredients
- Order history and tracking
- CRUD for Categories
- Edition and deletion of Ingredients
- Enable or disable comments and rating
- Order tracking and history
- Comment and Rate a dish, and see comments from other users
Before you begin, ensure you have met the following requirements:
- Node.js (version 20.10.0 or higher)
- npm or yarn
-
Clone the repository:
git clone https://github.com/Edwardmaster7/foodexplorer.git -
Navigate to the Backend directory:
cd foodexplorer/Backend -
Run the build script:
npm run build -
Set up environment variables:
- Create a
.envfile in the Backend directory - Add necessary environment variables (e.g., DATABASE_URL, JWT_SECRET)
- Create a
-
Run database migrations:
npm run migrate -
Start the backend server:
npm run dev
-
Navigate to the App directory:
cd ../App/foodexplorer-app -
Install dependencies:
npm install -
Set up environment variables:
- Create a
.envfile in the App/foodexplorer-app directory - Add necessary environment variables (e.g., VITE_API_URL)
- Create a
-
Start the development server:
npm run dev
- Add the admin user to the database:
npm run add-admin
This will start both the backend and frontend development servers. The frontend will be accessible in your default browser.
This project uses two official Vite plugins:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
For detailed information about the FoodExplorer API endpoints and how to use them, please refer to our Postman API Documentation.
This documentation provides a comprehensive guide to all available API routes, request/response formats, and authentication requirements.
This project is licensed under the MIT licence - see the LICENSE.md file for details.
If you have any questions or feedback, please reach out:
- Your Name - Eduardo Batista
- Project Link: https://github.com/Edwardmaster7/foodexplorer
- Deploy: https://foodexplorer-prod.netlify.app