This is an example of an Cafe web application that offers online Cafe orders management. It uses the Flask as Back-End server and also different Flask Extensions to improve and increase the speed and performance and Bootstrap for responsiveness and better display on different devices.
Challenges that I faced in this project:
-
Component based development and architecture of placing files in order to reusability and increase speed
-
Integrating Celery tasks to send email asynchronously in the background
-
Implementing Landing section of website as single-page-application (SPA)
-
Integrating a self-customized admin panel to manage models
Clone the repo
git clone https://github.com/cybera3s/B-S-Cafe
change to root folder
cd B-S-Cafe
create virtual environment
python -m virtualenv venv
activate venv
source venv/bin/activate
install required packages
pip install -r requirements.txt
change to Project folder
cd Cafe_project/
add and Open .env file to add Required Configurations:
nano .env
Add threse required Configurations to .env file:
MAIL_USERNAME=<your username>
MAIL_PASSWORD=<your email host password>
# redis://<username:<password>>@<host>:<port>
CELERY_BROKER_URL=<your Celery Broker Url>
CELERY_RESULT_BACKEND=<your celery reult backend url>
Save Your changes with CTRL+X then in the level of manage.py:
Run Celery Server:
celery -A celery_runner.celery worker --loglevel=info
Start development Server
python run.py
if everything goes well visit site at: http://127.0.0.1:5000/
You can access and manage project through command line:
set manage.py as flask application environment:
export FLASK_APP=manage.py
run flask shell:
flask shell
in flask shell you have access to db, and all registered models in database
run below command:flask create_new_cashier
Enter your personal information then you can visit Login Page loggin with your newly created Email Address and Password
flask tests
Distributed under the GPL License
Sajad Safa - cybera.3s@gmail.com
Project Link: https://github.com/cybera3s/B-S-Cafe