Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Latest commit

 

History

History
96 lines (70 loc) · 3.23 KB

README.md

File metadata and controls

96 lines (70 loc) · 3.23 KB

ESPCI Logo

ESPCI Bar Web App

Build Status Coverage Status Requirements Status GitHub license

This is the ESPCI student bar web app, still in development. Written using Python Flask.

Fusion with PC est magique

⚠️ October 2022: this project has been merged within PC est magique, as a module of it.

This projet's development is therefore stopped, and the repository archived.

Quickstart

  1. Install requirements:
$ sudo apt -y update
$ sudo apt -y install python3 python3-venv python3-dev
$ sudo apt -y install mysql-server postfix supervisor nginx git
$ git clone https://github.com/Stryars/espci-bar-web-app.git
$ cd espci-bar-web-app
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
  1. Configure your environment in a .env at the root of the project:
SECRET_KEY=yoursecretkey
DATABASE_URL=mysql+pymysql://user:password@localhost:3306/bar_webapp

USERS_PER_PAGE=12
ITEMS_PER_PAGE=10

CURRENT_GRAD_CLASS=137

MAX_ALCOHOLIC_DRINKS_PER_DAY=4
MINIMUM_LEGAL_AGE=18
QUICK_ACCESS_ITEM_ID=1
  1. Configure Flask:
(venv) $ echo "export FLASK_APP=espci_bar_web_app.py" >> ~/.profile
  1. Create the MySQL database:
mysql> create database bar_webapp character set utf8 collate utf8_bin;
mysql> create user 'user'@'localhost' identified by '<db-password>';
mysql> grant all privileges on bar_webapp.* to 'user'@'localhost';
mysql> flush privileges;
mysql> quit;
  1. Run the database migrations:
(venv) $ flask db upgrade
  1. Run the web application:
(venv) $ flask run
  1. Connect to http://localhost:5000/.

Built With

  • Flask - Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions.
  • jQuery - jQuery is a fast, small, and feature-rich JavaScript library.
  • Popper.js - A kickass library used to manage poppers in web applications.
  • Bootstrap - Bootstrap is an open source toolkit for developing with HTML, CSS, and JS.
  • Chart.js - Simple yet flexible JavaScript charting for designers & developers.
  • jsQR - A pure javascript QR code reading library.

Authors

  • Samuel Diebolt - Initial work - Stryars

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments