Skip to content

a sample of Cafe web application

Notifications You must be signed in to change notification settings

cybera3s/B-S-Cafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn

Bitter & Sweet Cafe

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

Landing

Landing_home Landing_menu

Admin Panel

admin_dashboard admin_menu

Built With

Some of the Utilized Plugins in this project

Prerequisites

  • Python +3.10
  • Redis
  • PIP
  • virtualenv
    pip install virtualenv

Usage

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/

CLI Management

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

Create New Cashier To Access Admin Panel:

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

Run Unit Tests

flask tests

License

Distributed under the GPL License

Contact

Sajad Safa - cybera.3s@gmail.com

Project Link: https://github.com/cybera3s/B-S-Cafe

(back to top)