Giter VIP home page Giter VIP logo

mtg-deckbuilder's Introduction

mtg-deckbuilder

mtg-deckbuilder is an online tool for deckbuilding similar to for example https://deckstats.net/deckbuilder/ or https://manastack.com/home. It is made purely for fun & practice purposes, but it will also have a few useful features!

Currently, both the frontend and backend are deployed in https://mtg-deckbuilder-api.herokuapp.com, and its usable with a few bugs and some missing functionality.

The project

Backend

The backend API of the project is built with Flask and SQLAlchemy. It uses a PostgreSQL database supplied by Heroku and The Magic: the Gathering Card and Set data is essentially the same as the publicly available data from Scryfall. I populate the database with the mtg data by using another project of mine (take a look at the populate_database.py script).

Along with serving a bunch of routes related to the mtg data (such as the sets and cards), the backend also handles authentication for Users with simple JWT access tokens.

In short, it contains the following features:

  • A connection to a PostgreSQL database containing the mtg data from Scryfall and various other tables/relationships like Users and their Decks. It has about 100k records
  • Various routes related to retrieving certain mtg data in a similar format than in Scryfall
  • Authentication for Users with JWT

Frontend

The frontend, which is coupled with the backend, is implemented with React and simple javascript (typescript would be handy here). It uses axios to consume the backend api. The authentication is handled in a simple way by saving the access token granted by backend to local storage. This is not the safest of ways, but good enough for now.

In short, it contains the following features:

  • View for all the mtg sets, for cards of a certain set and for a single card (similar to Scryfall)
  • Login/logout flow and protected routes
  • View for a deck
  • View to create a sealed deck for a logged-in user
  • View to see the own decks for a logged-in user
  • View to edit a deck in a deckbuilding mode for a logged-in user

Behind the scenes, there are also many utilities that handle the mtg data in various ways (sorting, grouping, manacosts, icons, stats plots, etc.)

Some images from the views

All the sets Sets

Cards of a set Cards

Cards of a set as image list Cards2

Decks of a user Userdecks

Creating a new deck Userdecks

Editing a deck Userdecks

Editing a deck, stats Userdecks

mtg-deckbuilder's People

Contributors

dependabot[bot] avatar eskosalaka avatar

Stargazers

 avatar

Watchers

 avatar  avatar

mtg-deckbuilder's Issues

Katselmointi

Katselmointi

Terve @EskoSalaka! Tässä lyhyt katselmointi Full Stack kurssin projektistasi.

Käytettävyys

Mitä tein?

  • Rekisteröin uuden käyttäjän ja kirjauduin sisään
  • Lisäsin uuden dekin
  • Muokkasin lisäämääni dekkiä ja katsoin sen visualisoinnit
  • Katsoin kaikki setsit, muutaman setsin kortit ja yksittäisiä kortteja
  • Kirjauduin ulos

Kokemus

  • Selkeä ja tyylikäs käyttöliittymä, hyvää työtä! 🏆
  • Helposti näkyvät ja selkeät virheilmoitukset virhetilanteissa
  • Korttien kuvat ja niiden statsien ikonit parantavat huomattavasti käyttökokemusta
  • Dekin statsit visualisoi dekin sisällön hyvin
  • Geneerin "React App"-titlen ja faviconin voisi muuttaa kuvaavammaksi

Koodi

Kokonaisuus

  • Erittäin käyttökelpoinen sovellus, jos on selkeä ja tyylikäs käyttöliittymä
  • Koodi on kaikinpuolin hyvin organisoitua ja sen sisäinen laatu on korkea. Etenkin frontend-puolella on taidokkaasti toteutettu selkeitä uudelleenkäytettäviä komponentteja

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.