No description
  • Python 72.4%
  • HTML 18.4%
  • JavaScript 4.8%
  • CSS 3.5%
  • Dockerfile 0.9%
Find a file
Freydis Mende f87ee6c6e2
All checks were successful
CI / Lint & Test (push) Successful in 52s
CI / Docker build & push (push) Successful in 1m11s
CI / Deploy (push) Successful in 6s
refactor scraper
2026-07-05 20:54:52 +02:00
.forgejo/workflows fix build hash 2026-06-01 20:02:15 +02:00
.github add copilot instructions 2026-06-07 18:29:21 +02:00
apps/tracker refactor scraper 2026-07-05 20:54:52 +02:00
data add B3a, B3b data 2026-07-05 20:46:03 +02:00
tcgptracker fix ALLOWED_HOSTS 2026-01-31 20:18:34 +01:00
.dockerignore improve config 2025-05-26 21:01:42 +02:00
.env.example split settings in dev/prod 2025-05-03 20:08:02 +02:00
.gitignore ignore docker compose overrides 2025-05-03 20:10:30 +02:00
.pre-commit-config.yaml reorganize project 2025-06-19 21:23:42 +02:00
.pylintrc fix lint 2026-06-01 19:54:10 +02:00
docker-compose.yml split settings in dev/prod 2025-05-03 20:08:02 +02:00
Dockerfile move data import from container startup to deployment script 2026-01-31 19:59:44 +01:00
find_missing_translations.py improve logging 2026-01-31 13:38:33 +01:00
manage.py reorganize project 2025-06-19 21:23:42 +02:00
poetry.lock add B3a, B3b data 2026-07-05 20:46:03 +02:00
pyproject.toml add B3a, B3b data 2026-07-05 20:46:03 +02:00
pytest.ini prepare A4b 2025-10-13 11:41:57 +02:00
README.md add readme 2026-06-07 18:29:29 +02:00

TCGPTracker

A Django-based web app for tracking your Pokémon TCG Pocket card collection. Browse sets, mark cards as collected, track your pack-opening progress, and connect with friends.

Features

  • Track collected cards across all Pokémon TCG Pocket sets
  • View pull probabilities per rarity and pack type (including God Packs)
  • Search cards by name with multilingual support (English / German)
  • Friend system with friend codes and friend requests
  • Progressive Web App (PWA) support
  • Admin interface with CSV data import

Tech Stack

  • Backend: Django 5.2, Python 3.13
  • Database: PostgreSQL (production) / SQLite (development)
  • Frontend: Bootstrap, django-widget-tweaks
  • Server: Gunicorn + WhiteNoise
  • Containerisation: Docker & Docker Compose

Getting Started

Prerequisites

Local development (SQLite)

# Install dependencies
poetry install

# Apply migrations
DJANGO_SETTINGS_MODULE=tcgptracker.settings.development python manage.py migrate

# Import seed data
DJANGO_SETTINGS_MODULE=tcgptracker.settings.development python manage.py import_data \
  --sets data/sets.csv \
  --cards data/cards.csv \
  --rarities data/rarities.csv \
  --packtypes data/pack_types.csv

# Start the development server
DJANGO_SETTINGS_MODULE=tcgptracker.settings.development python manage.py runserver

Open http://localhost:8000.

Docker (PostgreSQL)

Create a .env file in the project root:

DJANGO_SETTINGS_MODULE=tcgptracker.settings.production
SECRET_KEY=your-secret-key
DATABASE_URL=postgres://tcgpuser:secret@db:5432/tcgp
ALLOWED_HOSTS=localhost

Then start the stack:

docker compose up --build

Running Tests

poetry run pytest

Management Commands

Command Description
import_data Import sets, cards, rarities and pack types from CSV files
sync_tcgdex Sync card data from the TCGdex API
update_pack_generations Backfill generation data on packs
validate_probabilities Validate that rarity probabilities sum to 1 per pack slot

Project Structure

apps/tracker/          # Main Django app
  models/              # cards.py, users.py
  views/               # cards.py, friends.py, users.py, health.py
  templates/tracker/   # HTML templates
  management/commands/ # Custom management commands
  migrations/          # Database migrations
data/                  # Seed CSV files
tcgptracker/           # Django project config & settings

Localisation

Translations live in apps/tracker/locale/ and tcgptracker/locale/. To compile messages:

python manage.py compilemessages

To find missing translation strings:

python find_missing_translations.py

License

MIT