A university project by KTU students for the Program systems engineering module
Demo: restoresa.lt
KTU students of the academic group IFF-1/2:
- Mantas Petrauskas
- Markas Klimovas
- Nojus Stasiūnas
- Dovydas Katinas
Restaurant reservation web application which also features food ordering at the same time.
The objective is to develop a sophisticated website that offers customers the convenience of reserving a table at a dining establishment and selecting from a diverse range of menu items. This ambitious endeavor utilizes popular technologies such as "React," "Firebase," "Docker," "Stripe," and "NodeJS."
The utilization of React facilitates the creation of an elegant and intuitive user interface, ensuring a seamless and engaging booking experience. The comprehensive backend infrastructure, powered by Firebase, handles critical aspects such as secure data storage, robust user authentication, and real-time updates, providing a secure and scalable system.
The integration of Docker simplifies the deployment and management of the application, enabling portability across different environments. The incorporation of Stripe, a trusted payment processing platform, ensures secure online transactions, allowing customers to make reservations and additional orders with confidence.
NodeJS handles the server-side logic, facilitating seamless communication between the frontend and backend components.
In summary, this website combines the power of React, Firebase, Docker, Stripe, and NodeJS to deliver a user-friendly platform. Customers can easily reserve tables, explore the menu, and make secure online payments, while the backend systems ensure efficient management and scalability.
Our project consist of Server side as well as client side defined functions in order to make requests as secure as possible in each way.
Node.JS is being stored inside a Docker image container for easier hosting across different platforms. Primarly, our project uses Node.JS in order to initiate payment intents. From that point it calls Stripe API endpoint with its own predefined function to create an intent and send back into Node.JS server. Lastly, Node.JS server returns client's requested payment intent for payment completion.
Stripe API is being used on Client-side too for confirming payments as well as checking the current intent' progress.
Firebase is easy to implemenent. It creates an opportunity of implementing authentication feature in a matter of minutes. Changing password, number or getting free tables for the selected hour and date is done with the help of Firebase Functions. Those functions are Node.JS based environment, which stays active only on endpoint calls - that why it sometimes called serverless.
The method of our choice for testing out the system was manual testing. We prepared an excel spreadsheet, that was filled withtests that were to be executed. And then our team members tested out the functionality and filled out the results.
For development, you will only need Node.js and a node global package, Yarn, installed in your environement.
-
Just go on official Node.js website and download the installer. Also, be sure to have
git
available in your PATH,npm
might need it (You can find git here). -
You can install nodejs and npm easily with apt install, just run the following commands.
$ sudo apt install nodejs $ sudo apt install npm
-
You can find more information about the installation on the official Node.js website and the official NPM website.
If the installation was successful, you should be able to run the following command.
$ node --version
v19.7.0
$ npm --version
9.6.5
If you need to update npm
, you can make it using npm
! Cool right? After running the following command, just open again the command line and be happy.
$ npm install npm -g
After installing node, this project will need yarn too, so just run the following command.
$ npm install -g yarn
$ git clone https://github.com/Mantofka/restoresa.git
$ cd restoresa
$ npm install /(or)/ yarn install
You will also need to clone restoresa-backend if you do not have the ability to host your own backend heroku-api
$ git clone https://github.com/Mantofka/restoresa-backend.git
$ cd restoresa-backend
$ npm install /(or)/ yarn install
Run dev
$ npm start /(or)/ yarn start
Run backend
$ node server.js
$ npm build /(or)/ yarn build
$ docker build -t restoresa .
$ docker run -p 443:443 -p 80:80 restoresa:latest
upon running the project you can choose to
- use the local site: http://localhost:3000/
- use our implemented and hosted website: https://restoresa.lt/
After opening up an instance of the site you are greeted by our homepage
main way of navigation trhoughout the site is the menu. It contains the following buttons:
-"Restoresa" button (redirects to the main page)
-"Foods" button (Currently unimplemented)
-"Restaurants" button (redirects to the restaurant select page)
-"Profile" or "Sign in" button (used to access the users profile or to sign in)
In this screen you can sign in using a "Google" account or "Restoresa" account and also sign up to create a new "Restoresa" user.
After logging in you will see the user profile created. The profile contains:
- Full name
- Password (it can be changed)
- Phone number (it can be changed)
- Order history (you can review past orders)
- Select a restaurant to dine at:
- Select number of guests:
- Pick date and time:
- Select items to be ordered:
- Review the order and procced to the payment:
- To pay with a credit card;
- To pay via "Google Pay". If you have chosen to pay with card fill out the fiels: