













































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Food Delivery Application using Mern Stack Food Delivery Application using Mern Stack Food Delivery Application using Mern Stack Food Delivery Application using Mern Stack
Typology: Study Guides, Projects, Research
1 / 85
This page cannot be seen from the preview
Don't miss anything!














































































I hereby declare that the work presented in this report entitled Food Delivery Application using MERN Stack in partial fulfilment of the requirements for the award of the degree of Bachelor of Technology in Computer Science and Engineering/Information Technology submitted in the Department of Computer Science & Engineering and Information Technology, Jaypee University of Information Technology, Waknaghat is an authentic record of my work carried out over a period from July 2022 to May 2023 under the supervision of Dr Vipul Kumar Sharma, Assistant Professor (Senior Grade). The matter embodied in the report has not been submitted for the award of any other degree or diploma. (Student Signature) Manan Mehta, 191386 This is to certify that the above statement made by the candidate is true to the best of my knowledge. (Supervisor Signature) Dr Vipul Kumar Sharma Assistant Professor (Senior Grade) Computer Science & Engineering and Information Technology Dated: 15 May 2023 I
Firstly, I express my heartiest thanks and gratefulness to almighty God for his divine blessing in making it possible to complete the project work successfully. I am grateful and wish our profound indebtedness to Supervisor Dr Vipul Kumar Sharma, Assistant Professor (Senior Grade) , Department of Computer Science and Engineering , Jaypee University of Information Technology, Solan. The deep knowledge & keen interest of my supervisor in the field of ‘Web Development’ helped us to carry out this project. His endless patience, scholarly guidance, continual encouragement, constant and energetic supervision, constructive criticism, valuable advice, reading many inferior drafts and correcting them at all stages have made it possible to complete this project. I am also grateful to my mentors- Utkarsh Singhal (Software Developer) , Shivani Premi (Software Developer) , Varun Kapoor (Full-Stack Lead) , and Team Lead- Anand Bhargava (VP Engineering and Product Strategy) at Paxcom India Pvt. Ltd - A Paymentus Company , for their guidance, support and encouragement throughout our development training period and for the successful completion of this project. I thank my team members for assisting me and helping me in times when I got stuck and had no clue on how to proceed during the development time. I would also generously welcome each one of those individuals who have helped us straightforwardly or in a roundabout way in making this project a win. In this unique situation, I might want to thank the various staff individuals, both educating and non-instructing, which have developed their convenient help and facilitated my undertaking. Finally, I must acknowledge with due respect the constant support and patience of our parents. Manan Mehta [191386] II
Certificate I Acknowledgement II Table of Contents III List of Figures IV Abstract V Chapter-1 Introduction 1-1 1 Chapter-2 Literature Survey 12- Chapter-3 System Development 14- Chapter-4 Performance Analysis 44- Chapter-5 Conclusion 47- References 49- Appendix 52- III
This project report presents the development and implementation of a Food Delivery Application utilizing the MERN stack (MongoDB, Express.js, React.js, and Node.js). The purpose of this project was to create a user-friendly and efficient platform that connects customers with the Pizza Restaurant, providing a convenient food ordering and delivery experience. The objectives of the project include designing an intuitive user interface, implementing a robust backend system, and ensuring data security. The MERN stack was chosen for its versatility, scalability, and ability to handle complex web applications. The development process is detailed, starting with the database design using MongoDB to store user information and order details. The backend system was built using Node.js and Express.js, providing a RESTful API for handling various operations such as user authentication and order processing. The front-end development was accomplished using React.js, focusing on creating a responsive and interactive user interface. Customers can view menus and place orders. The report discusses the technical challenges faced during the development process and the corresponding solutions implemented. In conclusion, the Food Delivery Application developed using the MERN stack demonstrates the successful implementation of a feature-rich platform that facilitates seamless food ordering and delivery services. The utilization of modern web technologies and robust development methodologies ensures a user-friendly experience while meeting the demands of both customers and restaurant owners. V
Building modern and dynamic online apps now necessitates a strong grasp of web development. The MERN stack is a well-known and powerful mix of technologies that enables programmers to create extremely scalable and successful online applications. In this introduction, the components of the MERN stack will be covered, as well as their significance in web development. The MERN stack is comprised of MongoDB, Express, React, and Node.js. Each component is critical to the development process and aids in the overall operation and execution of the web application.
1. MongoDB: MongoDB is a NoSQL database that employs an adaptive document-based data model. It saves data as JSON-like documents, making it simple to integrate and alter data within the application. Because of its scalability and ability to handle massive amounts of data, MongoDB is the best solution for web applications that require dynamic data storage. 2. Express.js: Express.js is a simple and versatile Node.js web application framework. It provides a comprehensive set of API and web app development tools and information. Express.js makes it simpler to manage routes, process requests and responses, and build middleware. It is extremely adaptable and effective for developing web apps due to its lightweight and modular architecture. 3. React.js : React.js is a JavaScript library for developing user interfaces. It allows for the design of reusable UI components as well as their effective updating and rendering in response to data changes. React.js' component-based architecture promotes reuse, modularity, and maintainability. It also has a virtual DOM (Document Object Model) for increased performance and rendering. 1
A persistent need for effective and scalable technologies that allow for the construction of contemporary and dynamic web applications exists in the field of web development. The conventional method of using several technologies for various web development tasks frequently results in complexity, inefficiency, and integration difficulties. The issue at hand is the requirement for a thorough and coherent framework that simplifies web development from front-end to back-end while guaranteeing great speed, scalability, and maintainability. The absence of a cohesive approach frequently reduces developer productivity, lengthens the development process, and limits their capacity to quickly adjust to changing project needs. Additionally, developers who need to migrate between several technologies frequently have compatibility problems and a high learning curve as a result of the lack of a standardised stack. In addition to raising development costs, this makes it more difficult to maintain and update online applications over time. The MERN stack, which consists of MongoDB, Express, React, and Node.js, offers a potential remedy for these problems. By using the advantages of these technologies, the problem of fragmented and inefficient web development may be resolved. However, it is vital to recognise and comprehend the precise problems and challenges that developers deal with while using conventional web development techniques. Some of the key issues that need to be addressed include
1. Fragmented Development Environment : Developers frequently use many frameworks and programming languages for various web development tasks, creating a confusing and complex environment. 2. Integration Issues: Integrating several technologies, databases, and frameworks can be difficult and time-consuming, which can cause compatibility problems and reduce the speed of development. 3
3. Scalability and Performance Limitations: Conventional techniques to web development could not offer the performance and scalability needed to handle massive volumes of data and concurrent queries. 4. Lack of Reusability: Unreliable code reuse causes duplication of work during development and raises the risk of mistakes and problems. 5. Steep Learning Curve : The requirement for developers to learn and adapt to a variety of technologies, each with its syntax and conventions, can impede productivity and slow down the development process. By addressing these issues and creating a comprehensive solution utilising the MERN stack, web development productivity will be much improved, developer cooperation will be improved, and the process of creating contemporary, scalable, and high-performance online apps will be streamlined. 4
Methodology for Enhancing Web Development Efficiency using the MERN Stack: ● Needs analysis : Conduct a comprehensive requirements analysis to pinpoint the particular difficulties and pain points that developers have while using conventional web development techniques. This will assist in outlining the project's needs and goals. ● Framework Design : Design a thorough and well-rounded framework that makes use of the MERN stack to offer a combined frontend and backend development solution. This framework will assure excellent performance, scalability, and maintainability while addressing the highlighted pain areas. ● Development : Using the MERN stack, put the planned framework into use while making sure best practices and standards are followed. Create reusable React.js components to encourage the reuse of code and cut down on development time. To guarantee great performance, scalability, and reliability, test the designed solution. ● Integration : To ensure compatibility and lessen integration issues, integrate the generated solution with other pertinent technologies, databases, and frameworks. Figure 1: Integration of MERN stack. 6
● Deployment: Put the designed solution into production, assuring scalability, dependability, and security. Load-test the solution to ensure that it can handle big volumes of data and concurrent requests. ● Training: Provide developers with training and assistance so that they can use the generated solution efficiently. This will shorten the learning curve while increasing developer productivity and cooperation. ● Maintenance and updates: Maintain and update the produced solution continuously to ensure that it stays current and relevant. This will give a long-term and forward-thinking approach to web development. Overall, the goal of this technique is to provide a comprehensive and coherent solution that streamlines web development, increases efficiency, and assures excellent performance and maintainability of modern online applications utilising the MERN stack. To provide a sustainable and future-proof approach to web development, the methodology emphasizes best practices, adherence to standards, and continuing repairs and improvements. 7
In addition to the back-end, the front-end of the software is critical. React is a popular choice for developing the application's front-end. React enables you to design reusable user interface components declaratively and quickly. It also enables state management, making it easy to manage application data and user interface state. To control user input and data delivery, the literature suggests using HTTP methods and REST APIs. HTTP methods such as GET, POST, PUT, and delete are frequently used to retrieve, produce, update, and remove data. REST APIs standardise data access and manipulation, making application design and maintenance easier. In addition to the technologies indicated above, the literature suggests using a variety of other libraries and frameworks to enhance the capabilities of the application. Body-parser is a middleware that parses incoming request bodies, making it easier to manage form input and JSON payloads. Cors is a middleware that enables the server to receive and respond to requests from other domains by enabling cross-origin resource sharing. React Router is a framework that provides React with routing capabilities, allowing for simple navigation between application pages. Overall, the study demonstrates that using the MERN stack to build a food delivery service provides a scalable and customizable architecture. The usage of Node.js and Express on the backend, React on the front-end, and MongoDB on the database allows for fast data storage, retrieval, and processing. Chapter 3 : The chapter summarises the system development and architecture. The MERN (MongoDB, Express.js, React.js, and Node.js) stack was used to create a web-based meal delivery application. The application's goal is to allow users to purchase meals from a restaurant and have them delivered to their preferred location. The system is designed to be user-friendly and easy to use. The home page of the application displays the website's landing page. Users may view the menu by selecting the Menu button and then the things they want to order. After making their selections, customers can move to the checkout page to complete their orders. Users can register and submit personal information and preferences. 9
The backend of the application is built utilising Node.js and Express.js. It handles communication between the front end and the MongoDB database. Menu items, users, and orders are all stored in the database. The front end of the application is built with React.js. It communicates with the backend via HTTP requests and displays the information collected from the server understandably. The user interface is designed to be responsive and usable on a variety of platforms, including smartphones, tablets, and desktop computers. Various software testing methodologies were used during the development process to ensure that the application worked as expected. Test cases covered all aspects of the software, including user authentication, order processing, and database interfaces. Overall, the built system is a functioning and user-friendly meal delivery application that allows users to order food from their favourite restaurants in a simple manner. The application is created with the MERN stack in mind, with an emphasis on security, responsiveness, and usability in mind. The programme, with its varied features and testing methods, is well-equipped to suit the demands of both users and restaurant owners. Chapter 4: By documenting the tests that were carried out and the results that were achieved at different stages of the project, this chapter of the report gives a detailed picture of the software's accuracy. The purpose of the experiment was to evaluate how well the MERN stack-based food delivery application worked. The test bed configuration included running the application on a local server and carrying out various user operations including joining up, logging in, adding items to the cart, and placing orders. In the beginning, system analysis was done analytically, with the code being checked for errors and inconsistencies. This technique made it easier to find and fix programming flaws of a minor nature. The second method was experimental, involving a variety of user behaviours with documented outcomes. 10
The well-known MERN stack for web development consists of four technologies: MongoDB, Express.js, React.js, and Node.js. This stack is well-known for its versatility, efficacy, and usefulness. One of the primary advantages of utilising the MERN stack is that programmers may construct full-stack web apps using only JavaScript. In this review of the literature, we'll look at various facets of creating a web application with the MERN stack, such as setting up the environment for development, sending data from React to Node.js, utilising middleware like body-parser in Express.js, fetching data in React, handling post requests in Express.js, and connecting to a MongoDB database. Developers may use a variety of online instructions to build up the development environment for a web application using the MERN stack. The procedures to link React and Node.js are described in one such tutorial, available at codedamn.com. The usage of package.json to manage dependencies and concurrently to execute the front end and back end simultaneously are highlighted in this guide. There are numerous ways to accomplish the frequent need of sending data from React to Node.js in web development. One tutorial (tutsmake.com) explains how to use Axios to transmit data from React to a Node.js server via an HTTP POST request. It also describes how to parse the request body using the Express.js middleware body-parser. Express.js's robust middleware capability enables developers to extend the server's capabilities. The usage of the body-parser middleware in Express.js is described in one article on Stack Overflow (stackoverflow.com). Before the handlers, this middleware is used to process incoming request bodies. To update the front-end with fresh data, it is usual practice in web development to retrieve data from a server. One tutorial (developerway.com) describes how to utilise React's fetch API to get data from a server. Additionally, it explains how asynchronous functions are used and guarantees that the response data will be handled. 12
Express.js's post-request handling is a crucial component of server-side web development. How to handle post requests in Express.js and deliver a response to the client is covered in one article on Stack Overflow. This post also describes how to handle asynchronous activities by using the async/await syntax. Using the MERN stack to construct a website requires connecting to a MongoDB database. The procedures to set up an Express.js server with a MongoDB database are described in one tutorial at (mongodb.com). It also teaches how to build models for MongoDB collections using the Mongoose library. There are some tips and tactics for developers in addition to the technical elements of web development utilising the MERN stack. How to duplicate a multidimensional array in JavaScript is described in one article on Stack Overflow. The usage of Axios to send HTTP requests in React is covered in another article on zetcode.com. On Telerik's website, there are lessons on how to build dynamic forms. Last but not least, there are some online resources you can utilise to learn more about React Router, the tool used to manage navigation in a React application. Resources for upgrading to React Router v6 are also available at reactrouter.com as well as React Router's ability to transmit data across pages. In conclusion, there are many online resources for learning how to utilise the MERN stack, which is a potent technological stack for developing web applications. 13