Skip to content

Latest commit

 

History

History
85 lines (67 loc) · 3.36 KB

File metadata and controls

85 lines (67 loc) · 3.36 KB

DareToWin Webapp

Connecting daredoers everywhere

Introduction

The DareToWin Webapp acts as a companion social media app to the Telegram Bot game DareToWin (@daretowinbot)
With this webapp, registered users are able to:

  • upload videos of their dares (supports mp4 and webm files)
  • upvote other users' dares and gain upvotes for their own
  • earn badges based on the total number of upvotes they have
  • comment on other users' dares
  • follow other users so that their dares show up on their main feed
  • send private messages to other users
  • report inappropriate dares and comments,
    after which an admin will review said content and decide whether to ban it,
    doing so will cause the offending user to get a demerit

Video Demo (Telegram Bot + Webapp)

IMAGE ALT TEXT HERE

Setup

To test this webapp on your own machine:

  1. In your terminal, navigate to the root directory of the webapp and enter:
    For Python 3:

    $ sudo apt-get install python3-venv
    $ python3 -m venv venv
    

    Alternatively, if the above does not work, enter:

    $ sudo apt install virtualenv
    $ virtualenv venv
    

    This creates the virtual environment folder named venv.

  2. Enter the virtual environment by entering
    $ source venv/bin/activate

  3. To install the requirements in the current environment, enter:
    (venv) $ pip3 install -r requirements.txt

    Alternatively, if the above does not work, enter:
    (venv) $ pip install -r requirements.txt

  4. Enter the following commands to initialise the db database file

    (venv) $ flask db init
    (venv) $ flask db migrate -m "initial_migration"
    (venv) $ flask db upgrade
    

    You should see a new file named app.db in the root directory

  5. Before starting the webapp, open config.py and
    edit the UPLOAD_FOLDER variable with the path to your directory of choice
    This directory will be used to store uploaded video files.
    The following command can be used to find the full path to your current working directory.
    (venv) $ pwd

  6. To start the webapp, enter:
    (venv) $ flask run

  7. Navigate to http://localhost:5000 in your web browser of choice

NOTE: In the current build, the first user to register will have access to admin privileges
Additionally, this user will not be able to send or receive messages

Tech Stack

  • Python
  • Flask
  • SQLite/SQLAlchemy
  • HTML
  • Bootstrap
  • Firebase Cloud Storage
  • Heroku Cloud Application Platform

Contributions

This DareToWin webapp was created by Visnu and Jonathan.

Acknowledgements

The code for this webapp is inspired by the Flask Tutorial by Miguel Grinberg