A restaurant booking system made with Vue 3 and PHP
Here are the steps to set up the development environment for this project:
-
Download and install XAMPP and NodeJS, if you haven't already.
-
Start Apache and MySQL through XAMPP if not already running.
-
Clone or download this repository to your XAMPP htdocs folder. The final path should be
path_to/xampp/htdocs/seat-n-savor
. -
Copy
app/config/config.example.php
toapp/config/config.php
, then modify the database connection settings in the new file. -
Inside phpMyAdmin, create a MySQL database named
seat-n-savor
and import seat-n-savor.sql into it. -
Open the terminal and navigate to the project directory seat-n-savor.
-
Execute the following commands to install the required dependencies:
npm install
-
Compile and run the development server with hot reloading:
npm run dev
-
Open your web browser and access http://localhost:5001/seat-n-savor/ to view the application.
Follow these steps to set up the APIs for this project:
-
Sign up for free at
reCAPTCHA | Google for Developers
, if you haven't already. Don't worry, Google provides this service for free. -
After signing up, Go to Settings and create a label for the reCAPTCHA (preferably the project name, Ex:
seat-n-savor
). -
Add your domain name (Ex:
ronhedwigzape.com
), or if the program is running on localhost, mark it aslocalhost
as the domain for the project. Obtain yourSITE_KEY
andSECRET_KEY
. -
In the index.html file, replace the placeholder
YOUR_RECAPTCHA_SITE_KEY
with your actualSITE_KEY
at line #7 in the following line of code:<script src="https://www.google.com/recaptcha/api.js?render=YOUR_RECAPTCHA_SITE_KEY"></script>
-
In your
app/config/config.php
, replace the placeholderYOUR_RECAPTCHA_SECRET_KEY
with your actualSECRET_KEY
at line #41 in the following line of code:const RECAPTCHA_SECRET_KEY = 'YOUR_RECAPTCHA_SECRET_KEY';
-
Sign up for free at
Vonage
, if you haven't already. Vonage has €2.00 for free trial after signup. -
After signing up, login and copy your API key and API Secret
-
In your
app/config/config.php
, replace the placeholderYOUR_VONAGE_API_KEY
with your actualVONAGE_API_KEY
at line #42 in the following line of code:const VONAGE_API_KEY = 'YOUR_VONAGE_API_KEY';
-
Similarly, replace the placeholder
YOUR_VONAGE_API_SECRET
with your actualVONAGE_API_SECRET
at line #43 in the following line of code:const VONAGE_API_SECRET = 'YOUR_VONAGE_API_SECRET';
By following these steps, you will have the necessary API keys configured for your project.
Here's how to compile the project for production deployment:
-
Generate the public folder by running the following command:
npm run build
-
Access the application by visiting
http://[host_name]/seat-n-savor
, wherehost_name
is the IP address or host name of the server in the network. For example: