Mox Data


Mox Data is a cloud-based ingestion and analytics platform for Magic: The Gathering Online (MTGO). Players upload raw MTGO GameLog and DraftLog files which are then parsed into structured records, stored in PostgreSQL, and presented to users through interactive tables and dashboards. This application allows players to analyze their play-by-play data, a level of granularity which has not always been available.

This project builds on the original MTGO-Tracker application, incorporating many of the same workflows.

See GitHub repository.

Process

  • Ingest user-uploaded MTGO log files, archiving them in S3.
  • Parse & transform logs into matches, games, plays, drafts, and picks.
  • Load structured rows into an RDS PostgreSQL database.
  • Enrich data through built-in data-cleaning functionality.
  • Present data back to users through web UI: tables, exports, and analytics dashboards views.

The application is implemented in Python with Flask, SQLAlchemy, and Flask-Migrate (Alembic). Production HTTP is served by Gunicorn inside a Docker container image.

Data sources

Primary inputs are MTGO client log files produced during online play. Finalized dataset will also include user enhancements.

Architecture

Mox Data is deployed on AWS using ECS for web and worker services, ECR for Docker container image deployment, Amazon RDS (PostgreSQL) database, S3 for storage, and Celery + Redis (ElastiCache) for distributed background job processing.

Database Schema

Table Description
Player User account information.
Match Match header: players, format, wins, deck information.
Game Per-game row data (mulligans, on-play/draw, winner, etc.).
Play Play-by-play actions (casts, lands, triggers, etc.).
Draft Draft metadata.
Pick Draft picks.
Game Actions Raw end-of-game action text used for workflows such as missing winner resolution.
Removed Tracks removed or rejected match records.
Cards Played Aggregated card activity summaries per match.
Task History Celery/async job history for uploads and processing.
Export Job Async export jobs (status, S3 keys, expiry).
MULTIFACED_CARDS Reference mapping for split/transform/DFC/MDFC/adventure card names.
INPUT_OPTIONS Configurable option lists for UI-driven fields.
ALL_DECKS Curated deck list snapshots by month/format. Used to apply best guess deck names.


See Data Dictionary for feature definitions.