Giter VIP home page Giter VIP logo

moloke / mern-recipe-book-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prakash-s-2210/mern-recipe-book-app

0.0 0.0 0.0 1.21 MB

This is a full-stack web app built with React and Express.js/MongoDB for the frontend and backend respectively. It features a sign-up page with validation and file upload, a home page with a search bar for data from Spoonacular API, and a profile page displaying user info and saved recipes.

Home Page: https://flavor-verse.netlify.app/

JavaScript 75.36% CSS 0.36% HTML 2.97% SCSS 21.31%

mern-recipe-book-app's Introduction

Recipe Book Application - MERN Stack

Live Site URL : Recipe Book

This project is a full-stack web application built using React for the frontend and Express.js with MongoDB for the backend. The frontend uses various packages such as Formik, Yup, FontAwesome, and React-Axios to create a sign-up page with form validation and file upload, a home page with a search bar to fetch data from Spoonacular API, and a profile page that displays user details and saved recipes.

The backend uses packages such as bcrypt, body-parser, cors, helmet, jsonwebtoken, mongoose, and multer to handle user authentication, password encryption, and database operations. It checks whether the user exists before storing the user's information in the database and uses JSON web tokens for secure communication between the client and server.

The Redux store is used to store the user's details, saved recipes, and the authentication token. The state is also persisted using Redux persist to ensure that the user's details are saved even after refreshing the page.

The application also has a recipe detail page that displays information such as cooking time, instructions, summary, and ingredients for each recipe. Users can save recipes to their profile, and the application provides a way to search for recipes based on keywords.

To use the application, users must first sign up with their name, email, password, and profile picture. Once signed in, they can search for recipes, save their favorite recipes, and view their saved recipes on their profile page. The application also provides a logout button to ensure the user's privacy and security.

Installation

To run this project, you'll need to have Node.js and MongoDB installed on your system. You can download Node.js from the official website: https://nodejs.org/, and install MongoDB by following the instructions provided here: https://docs.mongodb.com/manual/installation/.

To install the project dependencies, follow these steps:

Clone the repository to your local machine using the following command:

bash Copy code git clone https://github.com/your-name/your-project-name.git Navigate to the project directory:

bash Copy code

cd your-project

Install the frontend dependencies:

npm install

Navigate to the backend directory:

cd backend

Install the backend dependencies:

npm install

Create a .env file in the backend directory, and set the following environment variables:

makefile

PORT=5000
MONGODB_URI=<your-mongodb-uri>
JWT_SECRET=<your-jwt-secret>

Replace with the URI of your MongoDB database, and with a secret key of your choice.

Start the backend server:

npm start

Open a new terminal window, navigate to the project directory, and start the frontend server:

npm start

Open your web browser and navigate to http://localhost:3000 to view the application.

That's it! You should now be able to run the application locally. If you encounter any issues, please refer to the project documentation or create a new issue on the project's GitHub repository.

Deployment

Create a GitHub repository for your project.

Push your code to the GitHub repository.

Sign up for a Render account.

Create a new web service on Render, and select "Custom" as the type.

Fill in the required details such as the name of the service, the region, the startup command

npm start

the build command

npm install

Under the Environment section, add the necessary environment variables such as the

MongoDB URL
port number
JWT secret

Click on the "Create Web Service" button to create your backend server.

Once your backend server is live, update the frontend code with the new backend URL (the one provided by Render).

Run npm run build in the client-side code to create a build folder.

In the build folder, create a new file called _redirects and add the following line of code: /* /index.html 200.

Upload the build folder to a hosting service such as Netlify.

Create a new live site link in Netlify and change the domain namer.

Your project should now be live and accessible via the new domain name.

Make sure to test your application thoroughly after deployment to ensure that everything is working as expected.

Screenshots

Video

Untitled.video.-.Made.with.Clipchamp.1.mp4

Register Page Screenshot

Register

Login Page Screenshot

Login

Home Page Screenshot

home

Profile Page Screenshot

profile

Author

mern-recipe-book-app's People

Contributors

prakash-s-2210 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.