Skip to content

Project to organize my pokemon card collection and deck construction using Django and PostgreSQL

License

Notifications You must be signed in to change notification settings

chrisbrickhouse/ptcg-inventory

Repository files navigation

Where's that Pokemon? Card allocation management for players and collectors

Players and collectors of trading card games often run into a costly problem: where did that card go? Knowing you own 6 copies of a card isn't useful if you don't know where any of them are, and inventory spreadsheets are hard to keep up to date when the process of deck building is constantly moving cards around.

Where's that Pokemon? aims to solve the problem by integrating deck construction into inventory management. As you build and modify decks, card inventory is automatically managed behind the scenes to prevent losing track of their storage location.

Installation

  1. Set up a PostgreSQL server somewhere. I use a raspberry pi on my home network, and if you want to go that route I suggest following step 6 of this tutorial on setting up a mastodon instance. Most cloud providers offer these kinds of services for free or low cost. Amazon Web Services has a tutorial on setting up a free PostgreSQL instance if that fits your needs better.
  2. Download this repository using git clone --recurse-submodules https://github.com/chrisbrickhouse/ptcg-inventory.git
  3. Navigate to the site directory using cd ptcg-inventory/cardsite
  4. Install the python dependancies using python -m pip install -r requirements.txt
  5. Install the grunt dependancies using npm install
  6. Navigate to the ptcg-inventory directory using cd ..
  7. Configure the Django site and database using [the instructions for configuring a site](#Configuring the site)
  8. Import the card data using python make_set_fixtures.py

Configuring the site

To get the site running, you need to modify cardsite/my_pokemon_cards/settings.py to point to your PostgreSQL server.

  1. In cardsite/my_pokemon_cards/settings.py modify the DATABASES entry with the information for your SQL server. If you need help, see the reference doc.
  2. Set a SECRET_KEY. By default, the distributed settings check for an environment variable with that info, but you can also add it to the file directly. You can use django.core.management.utils.get_random_secret_key() to generate one.

Roadmap

Where's that Pokemon? is still in initial development and the interface may change rapidly. The roadmap below contains planned features and likely migrations to help mitigate disruption. The main use case is for hobbyists who want to run their own instance, but long term it may be useful to deploy as a platform.

  • Minimal viable deck building interface
    • New deck
    • Deck details
    • Add and remove cards from deck
  • Implement storage locations
    • Generic CardStash table
    • Migrate Deck to subclass of CardStash (Destructive)
    • Migrate CardAllocation to use CardStash (Destructive)
  • Collection overview page
    • List summary stats for a collection
  • Overview of each CardStash
  • CardStash to CardStash allocation interface
    • Select two CardStashes and move cards between them
    • Modify Deck building interface to wrap this as an implementation of moving cards to and from deck and storage
  • User accounts phase 1
    • Gate database access to logged-in users (security)
  • Feature Freeze
    • Improve testing and fix observed bugs
    • Front-end styling to make the interface pretty
  • Release 1.0 - minimal viable product
  • TCG Player integration
    • (prereq?) InventoriedCard subclass of Card to handle card-specific metadata
      • Currently no way to distinguish normal vs reverse holo, different stamps, different langs, conditions, etc
      • e.g. Two pgo-1 cards could have different prices because one is Lightly Played and the other is a PSA 7
      • More extensible than modding the card DB
    • Pricing for cards in collection or needed for decks
    • (Long term, needs defined) Store management integration
  • User accounts phases 2+ (Long term, needs defined)
    • Add "created by" field to stash objects
    • Implement permissions for accessing and modifying stash objects
  • Add back Card-specific data
    • Card images, attacks, etc were removed for simplicity in 1.0 fixtures

About

Project to organize my pokemon card collection and deck construction using Django and PostgreSQL

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published