Skip to content

Robust Fantasy Premier League Application built on Flask w/ Python Server and React Frontend.

License

Notifications You must be signed in to change notification settings

anthonyBosek/fpl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fantasy Premier League

Robust Fantasy Premier League Application built on Flask w/ Python Server & React Frontend.

Jump directly to the deployed application here: fantasy-eleven.


Installation

  1. Fork and clone this repo from Github to your local environment
  2. Navigate into your local directory and open the contents in your preferred code editor
  3. Run pipenv install to install dependencies
  4. Run pipenv shell to create virtual environment
  5. From the main project directory, run cd server to enter the server directory

.env set up

  1. Create .env file in the server directory with touch .env
  2. Add a line for SECRET_KEY=
  3. In your terminal, run python -c 'import secrets; print(secrets.token_hex()) to generate your own key
  4. Copy the result into the .env file as the value for the secret key
  5. Make sure .env is added to your .gitignore
  6. Add a line for DATABASE_URI=
  7. Copy the link to the external database you would like to connect. If you are using Render, start the link with postgresql:// -- not just postgres://. You can find full instructions here.

Configuring the database

bookish ERM diagram

  1. export FLASK_APP=app.py
  2. flask db init
  3. flask db upgrade head
  4. Run python seed.py to seed the database

Starting the client

  1. In another terminal, cd into the client directory
  2. Run npm install to install dependencies
  3. Run npm start to open the app in the browser

Starting the app

  1. Once you've installed all client and server dependencies, you can also run the app in one terminal from the main directory: gunicorn --chdir server app:app

Licensing

MIT License Copyright (c) 2023

References and Acknowledgements

API-Football
RapidAPI-sports
Securing your session key
Create a Flask application with Google Login

About

Robust Fantasy Premier League Application built on Flask w/ Python Server and React Frontend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published