← All projects

Topdeck

2024 – Present

A Magic: The Gathering collection manager with an engine that explains what actually makes a deck work.

Next.jsSQLiteReactTypeScriptRxJSRecharts

Topdeck started as a way to manage a large Magic: The Gathering collection and grew into something I find much more interesting: an engine that can actually explain why a deck is good or bad.

There are two halves — a polished app for managing thousands of physical cards, and an analysis engine that reasons about how a deck really plays.

Managing the collection

The app tracks every card you own — which set it's from, whether it's foil, which deck it lives in — and runs entirely on your own computer, syncing across machines automatically. You can search the entire Magic catalog instantly, see how close you are to completing each set, and organize cards into decks.

Keeping it current is its own challenge: Magic has tens of thousands of cards, published as a single file around two gigabytes in size. Every night, Topdeck quietly pulls in the latest catalog and current market prices so the collection is always up to date — without you ever thinking about it.

The engine that reasons about decks

The part I'm proudest of takes a deck and grades it across seven dimensions of quality — its mana, its ability to ramp up, how it draws cards, how it interacts with opponents, its payoffs, how well its cards combine, and its answers to trouble.

The key idea is what doesn't power it: it isn't an AI guessing from memory. Every judgment is computed from real card facts and from simulation. To understand how a deck actually plays, for example, it simulates three thousand possible opening hands and measures what tends to happen — the difference between "this deck has nine card-draw spells" and "this deck reliably gets off to a strong start."

For the hardest question — how well do these cards work together? — it doesn't trust a single signal. It blends several: how often cards are actually played together in real decks, the combos a deck can assemble, and how similar cards are in what they do. The result is a read on a deck's synergy that can show its work, not a black box.

Because all of this produces clear, factual answers, I built it so other tools — including AI assistants — can ask it questions and get grounded, trustworthy results instead of guesses.

Seeing the collection at a glance

On top of all that sits a dashboard of more than twenty views — total collection value, foil breakdowns, duplicate cards worth trading away, how consistent a deck's lands are, set-completion progress — turning a sprawling collection into something you can actually understand.

One detail I kept polishing

Foil cards. A real foil catches the light when you tilt it, and a flat image loses that completely — so I recreated the effect in the browser. Move your cursor over a foil card and it banks toward you while the shine slides across its surface, just like the real thing. It's pure polish, and it's the kind of small touch that makes a tool feel genuinely made rather than merely assembled.