This is a web application built with React.js, Node.js, and SQL that allows a food delivery company to self-onboard restaurants and collect basic merchant details.
- Collects restaurant details such as name, contact name, Pincode, location, website, phone number, and average daily transactions.
- Stores the collected data in a SQL database.
- Provides client-side form validation to ensure all required fields are filled before submission.
- Resets the form after successful submission.
- Responsive design for a better user experience on different devices.
- React.js
- Node.js
- Express.js
- MySQL
- HTML
- CSS
-
Install Xampp sever: phpMyAdmin: Install Xampp to manage your MySQL database through phpMyAdmin. You can download phpMyAdmin from the official website: https://www.apachefriends.org/download.html Open the Xampp control panel and start Apache and MYSQL.
-
Create a MySQL database from phpMyAdmin or use given SQL code below //CREATE DATABASE databasename;
CREATE DATABASE merchant;
- Create Table for the above database from phpMyAdmin or use given SQL code below
CREATE TABLE restaurants (
restaurantName varchar(30) NOT NULL,
contactName varchar(50) NOT NULL,
pincode int(6) NOT NULL,
location varchar(20) NOT NULL,
website varchar(20) NOT NULL,
phoneNumber varchar(100) NOT NULL,
avgDailyTransactions int(10)
);
- Clone the repository:
git clone https://github.com/your-username/restaurant-onboarding-app.git
- Navigate to the project directory:
cd restaurant-onboarding-app
- Install the dependencies for the server-side:
npm install
- Create a MySQL database and update the connection details in server.js. Start the server:
npm start
- Open another terminal window, navigate to the client-side directory:
cd client
- Install the dependencies for the client-side:
npm install
- Start the client:
npm start
- Open your web browser and visit http://localhost:3000 to access the application.