Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.
/ espci-bar-web-app Public archive

Web app for the ESPCI student bar, made with Python Flask.

License

Notifications You must be signed in to change notification settings

sdiebolt/espci-bar-web-app

Repository files navigation

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.

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

About

Web app for the ESPCI student bar, made with Python Flask.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published