This is the ESPCI student bar web app, still in development. Written using Python Flask.
This projet's development is therefore stopped, and the repository archived.
- 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
- 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
- Configure Flask:
(venv) $ echo "export FLASK_APP=espci_bar_web_app.py" >> ~/.profile
- 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;
- Run the database migrations:
(venv) $ flask db upgrade
- Run the web application:
(venv) $ flask run
- Connect to http://localhost:5000/.
- 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.
- Samuel Diebolt - Initial work - Stryars
This project is licensed under the MIT License - see the LICENSE.md file for details
- The Flask Mega-Tutorial by Miguel Grinberg