This is a comprehensive delivery service application with two main interfaces: one for customers and one for restaurants. The backend handles API requests and database interactions.
- backend/: Contains the backend server code.
- customer/: Contains the customer site frontend code.
- restaurant/: Contains the restaurant site frontend code.
Before you begin, ensure you have met the following requirements:
- Node.js (version 14.x or later)
- npm (version 6.x or later) or yarn (version 1.22.x or later)
- MySQL server
- MySQL Workbench (for database management)
-
Navigate to the
backend
directory:cd backend
-
Install the dependencies:
npm install
-
Set up your MySQL database and configure the connection in the
index.js
file which is already in 'backend' folder. To set up MySQL database, scroll to the end of this file
- Navigate to the
customer
directory:cd customer
- Install the dependencies:
Or if you are using yarn:
npm install
yarn install
- Navigate to the
restaurant
directory:cd restaurant
- Install the dependencies:
Or if you are using yarn:
npm install
yarn install
- Start the backend server:
npm start
- The backend server should be running at
http://localhost:8800
.
-
Navigate to the
customer
directory:cd customer
-
Start the development server:
npm start
Or if you are using yarn:
yarn start
-
Open your browser and navigate to
http://localhost:3000
. -
Log in with the following credentials:
- Username:
[email protected]
- Password:
110404
- Username:
- Navigate to the
restaurant
directory:cd restaurant
- Start the development server:
Or if you are using yarn:
npm start
yarn start
- Open your browser and navigate to
http://localhost:3001/110
.
This application is compatible with the following browsers:
- Google Chrome (latest version)
- Mozilla Firefox (latest version)
- Microsoft Edge (latest version)
- Safari (latest version)
The major dependencies for the backend are:
- Express:
^4.x
- MySQL:
^2.x
- cors:
^2.x
The major dependencies for the customer site are:
- React:
^17.x
- Axios:
^0.21.x
- Ant Design:
^4.x
- React Router DOM:
^5.x
The major dependencies for the restaurant site are:
- React:
^17.x
- Axios:
^0.21.x
- Ant Design:
^4.x
- React Router DOM:
^5.x
- Open MySQL Workbench and connect to your database.
- Select the database you want to export from the left-hand side panel.
- Go to
Server
in the menu and selectData Export
. - In the
Data Export
tab:- Select the database and tables you want to export.
- Choose
Export to Self-Contained File
. - Specify the path and filename for the SQL dump file (e.g.,
delivery_service_dump.sql
). - Click
Start Export
.
- The SQL dump file (
delivery_service_dump.sql
) is in our repository. - You should open MySQL Workbench and connect to our MySQL server.
- Create a new database (schema):
- Go to
Server
in the menu and selectData Import
. - Choose the
Import from Self-Contained File
option. - Select the SQL dump file.
- Select or create a new schema where the data should be imported.
- Click
Start Import
.
- Go to
If you have any questions or suggestions, please open an issue or contact the repository owner.