Git Product home page Git Product logo

8pack's Introduction

8 Pack

8-Pack is a draft simulation tool. Play through the first 8 picks of a draft (before your old picks influence your new picks), let your friends do the same, and compare!

Wizzerinus's submission for the Spicerack Hackathon 2024

Development Setup

Backend

Requires Docker. I recommend that you download this file if you prefer premier drafts (bo1), or this file if you prefer traditional drafts (bo3). The import-drafts command changes according to the type of draft you chose:

python -m eightpack.cli import-drafts  # downloaded premier drafts
python -m eightpack.cli import-drafts local-traditional  # downloaded traditional drafts
python -m eightpack.cli import-drafts 17lands-premier  # automatically download premier drafts
python -m eightpack.cli import-drafts 17lands-traditional  # automatically download traditional drafts

Note that if you use the 17lands one, you will have to download the file a lot during development if you mess with the database, I don't recommend that.

cd backend
pip install requirements.txt
python -m eightpack.cli dev-db
# In a different terminal window:
python -m eightpack.cli import-drafts
python -m eightpack.app  # this starts the webserver, default port 8003
# if you change the port make sure to change the backend URL on the frontend

Frontend

Most functionality requires a running backend.

cd frontend
npm install
npm run dev  # this starts the webserver, default port 5173
# if you change the port make sure to change the CORS header sent by the backend

Production setup

# this starts the servers
docker-compose up
# this creates the database and imports the drafts, change 17lands-traditional to 17lands-premier if you prefer these
docker exec -it $(docker container ls | grep 8-pack | grep backend | awk '{print $1}') \
  python -m eightpack.cli import-drafts 17lands-traditional \
  'postgresql+psycopg2://user:password@postgres/8pack'

8pack's People

Contributors

wizzerinus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.