/restaurant-merchant-details

A system that collects basic merchant details of Restaurants

Primary LanguageJavaScript

Restaurant Onboarding Application

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.

Features

  • 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.

Technologies Used

  • React.js
  • Node.js
  • Express.js
  • MySQL
  • HTML
  • CSS

Getting Started

Connecting to MYSQL database

  1. 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.

  2. Create a MySQL database from phpMyAdmin or use given SQL code below //CREATE DATABASE databasename;

CREATE DATABASE merchant; 
  1. 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)
);

To run this application locally, follow these steps:

  1. Clone the repository:
git clone https://github.com/your-username/restaurant-onboarding-app.git
  1. Navigate to the project directory:
cd restaurant-onboarding-app
  1. Install the dependencies for the server-side:
npm install
  1. Create a MySQL database and update the connection details in server.js. Start the server:
npm start
  1. Open another terminal window, navigate to the client-side directory:
cd client
  1. Install the dependencies for the client-side:
npm install
  1. Start the client:
npm start
  1. Open your web browser and visit http://localhost:3000 to access the application.