SnackBite is a MERN stack application that allows users to search for different types of snacks, view detailed information about each snack, and more. This project demonstrates the capabilities of the MERN stack (MongoDB, Express.js, React.js, and Node.js) in creating a dynamic, full-featured web application.
- Search Snacks: Users can search for snacks by name or type.
- Snack Details: View detailed information about each snack including ingredients, nutritional value, and user reviews.
- User Authentication: Secure user registration and login functionality.
- Responsive Design: Mobile-friendly design ensures a great user experience on all devices.
-
Clone the repository:
git clone https://github.com/yourusername/snackbite.git cd snackbite -
Install server dependencies:
cd server npm install -
Install client dependencies:
cd client npm install -
Set up environment variables: Create a
.envfile in theserverdirectory with the following:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret
-
Run the application:
cd server npm run dev
- Register: Create an account to start exploring snacks.
- Login: Log in with your credentials.
- Search Snacks: Use the search bar to find snacks by name or type.
- View Details: Click on a snack to view detailed information.
- MongoDB: For the database.
- Express.js: For the backend framework.
- React.js: For the frontend framework.
- Node.js: For the backend runtime environment.
- JWT: For user authentication.
snackbite/
├── client/ # React frontend
│ ├── public/
│ └── src/
│ ├── components/
│ ├── pages/
│ ├── App.js
│ └── index.js
├── server/ # Express backend
│ ├── config/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── app.js
│ └── server.js
├── .gitignore
├── README.md
└── package.json