The Recipes app is a web application built on the MERN (MongoDB, Express.js, React.js, Node.js) stack. It provides users with the ability to create accounts, post recipes, view recipes shared by others, and save their favorite recipes.
-
User Authentication
- Users can register and login securely to access the app.
-
Recipe Management
- Users can create, edit, and delete their own recipes.
-
Recipe Sharing
- Users can view recipes posted by other users.
-
Recipe Saving
- Users can save recipes posted by others to their profile.
-
Frontend
- React.js
- React Router
- Axios (for API requests)
-
Backend
- Node.js
- Express.js
- MongoDB (using MongoDB Atlas for cloud hosting)
- Mongoose (for MongoDB object modeling)
- JSON Web Tokens (JWT) for authentication
- Node.js (latest LTS version)
- MongoDB Atlas account for database hosting (or use local server)
- Git (for version control)
- IDE (e.g., Visual Studio Code)
-
Clone the repository:
git clone https://github.com/farazokc/recipe-app-MERN/
-
Install dependencies:
cd client npm install cd ../server npm install
-
Configure environment variables:
- Create a
.env
file in theserver
directory and set the following variables:USER=your_mongodbAtlas_username DATABASE=your_mongodbAtlas_db_name PASSWORD=your_mongodbAtlas_db_password SECRET=jwt_secret_key
- Create a
-
Start the development server:
-
Start the backend server:
cd server npm start
-
Start the frontend server (in a separate terminal):
cd client npm run dev
-
-
Access the app:
- Open a web browser and navigate to
http://localhost:5173
to use the Recipes app.
- Open a web browser and navigate to
- Register a new account or login with existing credentials.
- Navigate to the recipes section to view and post recipes.
- Save recipes from other users to your profile for quick access.