This web application was developed for help the commercial business to manage their reservations. The owner must be follow the setup section and deploy on own server. After that the admins can be manage all the reservations and the customers can create a new user and ask for new / manage appointment. Contributes are welcome 😄
Some of the technologies used
- https://github.com/pallets/flask
- https://github.com/coleifer/peewee
- https://github.com/angular/angular
- https://github.com/mattlewis92/angular-calendar
- https://github.com/vimalloc/flask-jwt-extended
- https://github.com/flask-restful/flask-restful
- https://github.com/ColorlibHQ/AdminLTE
[Important!] Make sure to have a mysql database property setup and a empty database
cd backend
- Create the virtualenv:
virtualenv -p python3 env
- Activate the venv:
source env/bin/activate
- Install all requirements:
pip install -r requirements.txt
Settings
- Generate the salt for password encryption
python
>>> import bcrypt
>>> bcrypt.gensalt(10)
b'$2b$10$5Ij/lH/3/NcJSPMkf.AKPe' # Example ...
- Copy the .dist setting to settings.json
cp settings.json.dist settings.json
- Edit the settings.json file like this example:
{
"EMAIL": {
"SMTP": "smtp.gmail.com",
"PORT": 587,
"EMAIL": "youbestemail@gmail.com",
"PASSWORD": "youbestpassword (i hope)"
},
"SALT": "$2b$10$5Ij/lH/3/NcJSPMkf.AKPe",
/* Copy only the string and not the bytes char (b) */
"JWT_SECRET_KEY": "lxVYbvu7ZwFNlt1gkx9K",
/* You can generate a random password here: https://passwordsgenerator.net */
"DATABASE": {
"NAME": "ops",
"USER": "root",
"PASSWORD": "root",
"HOST": "127.0.0.1",
"PORT": 3306
}
}
- Create the first business and admin just execute the
python initdb.py
and follow the steps - Start the service (with venv activate):
python main.py
- Navigate to folder:
cd frontend
- Install all node_mdoules:
npm i
- If you are out of localhost edit the API_ENDPOINT variable located at:
src/app/common/constants.ts
- Start the service:
ng serve --open
or build the project and host on a web server
Admin:
Here the admin can set up a general info for business activity and set the timetable of the store.
In this page the admin can create/edit/delete the services offered by the business.
Each service must have a name and can have description, duration and price.
The core of the project.
The calendar where the admin can see all reservation and create a new one or edit a existing reservation.
With the edit option obviously the admin can approve or reject the reservation.
In this page the admin can search for a customer, see the related info and the reservation history.