Food Delivery App: React, Node, AWS
Overview
The Kitchenshop Handyman Company wanted to create a mobile app that allowed customers to request handymen to pick up and deliver food from local restaurants. They decided to use AWS for the development and hosting of the app.
Requirements
Our client wanted following features in the app:
- Customers should be able to search for local restaurants and
browse their menus. - Customers should be able to place orders for food and specify the
pickup and delivery locations. - Handymen should be able to view the orders and accept or reject
them. - Customers should be able to track the status of their orders and
communicate with the handymen. - The app should have secure authentication and authorization
features.
Solution
The development team decided to use React Native for the frontend of the app because of its cross-platform capabilities and the availability of many libraries and tools. They also decided to use NodeJS for the backend because of its scalability and the availability of numerous libraries. They chose to use AWS for the development and hosting of the app because of its wide range of services and global infrastructure.
For the restaurant search and menu browsing feature, the team implemented a React Native component that displayed a list of the restaurants and their menus. They used the AWS Amplify DataStore to store the restaurant data in a NoSQL database and the AWS AppSync service to retrieve the data and update it in real-time
The handymen acceptance feature was implemented using another React Native component that displayed a list of the orders and allowed handymen to accept or reject them. The component was connected to the backend using another AWS Lambda function that updated the order data in the database and notified the customers of the acceptance or rejection.
The order tracking and communication feature was implemented using another React Native component that displayed the status of the orders and allowed customers to communicate with the handymen. The component was connected to the backend using yet another AWS Lambda function that stored the communication data in the database.
Here are some technical details of the handyman app for food delivery:
The frontend of the app was implemented using React Native, a framework for building cross-platform mobile apps using JavaScript and React. The team used various libraries and tools, such as React Navigation and Expo, to build the UI and add functionality to the app.
The backend of the app was implemented using NodeJS, a JavaScript runtime for building server-side applications. The team used various libraries and frameworks, such as Express and MongoDB, to build the APIs and connect to the database.
The team used MongoDB as the database for the app, storing the data for the restaurants, orders, and communication in separate collections. They used the AWS Amplify DataStore and AppSync service to store and retrieve the data in real- time and the AWS Lambda functions to update the data and notify the users.
The team implemented secure authentication and authorization using JSON Web Tokens (JWTs) and the AWS Cognito service. They implemented a login page that used the Cognito service to authenticate users and send them to the dashboard page. They also implemented an API that verified the JWT included in the request header before processing the request. This ensured that only authenticated and authorized users had access to the app.
The team used the AWS Amplify Console to host the frontend and backend of the app, with the frontend being hosted as a static website and the backend as a serverless application. They used the AWS CloudFront service to distribute the frontend and the AWS API Gateway and AWS Lambda functions to host the backend APIs. This allowed them to scale the app easily and ensure high availability.
Here are some technical details of the AWS services used in the handyman app for food delivery:
AWS Amplify is a set of tools and services that allows developers to build and deploy cloud-powered applications easily. The team used the following features of AWS Amplify in the handyman app:
- AWS Amplify DataStore: This is a NoSQL database that allows developers to store and retrieve data in real-time using
GraphQL. The team used it to store the data for the restaurants and orders. - AWS Amplify AppSync: This is a service that allows developers to build and deploy GraphQL APIs easily. The team used
it to retrieve the data from the database and update it in real-time. - AWS Amplify Console: This is a service that allows developers to host and deploy web and mobile applications easily.
The team used it to host the frontend and backend of the app.
AWS Lambda is a service that allows developers to run code in response to events or HTTP requests without having to worry about the underlying infrastructure. The team used it to host the backend APIs of the app and to update the data in the database and notify the users.
AWS Cognito is a service that allows developers to add authentication and authorization to their applications easily. The team used it to authenticate the users of the app and send them to the dashboard page.
AWS CloudFront is a content delivery network (CDN) that allows developers to deliver content, such as HTML, CSS, and JavaScript files, to users with low latency and high availability. The team used it to distribute the frontend of the app to users.
AWS API Gateway is a service that allows developers to create, publish, maintain, and secure APIs easily. The team used it to host the backend APIs of the app and to manage the incoming requests.
Industry - : Fooding
Technology Leveraged
- React Native
- Node
- AWS
- Javascript
- NoSQL