Miguel Frasco

Projects / Build

C

Cardexia

Builds a playable Commander deck from the cards you actually own.

Status
Public beta
Role
Solo builder
When
2026 – present
Link
cardexia.app
cardexia.app
Cardexia screenshot
cards analysed
37,000+
co-occurrence rows
~946k
functional roles
30+

Problem

Magic: The Gathering players own hundreds of cards but start every deck from a blank page and a search box. The real problem is building a deck you can play tonight, from what is on your shelf.

What I built

Under the hood

PMI(a, b) = lnwab · Wwa · wb

wab is how often cards a and b appear together across commander decks, wa and wb how often each appears, and W the total.

Synergy from co-occurrence

For each pair of cards, Cardexia weights how often they appear together in real Commander decks against how often each appears at all. Pairs that show up together far more than chance are synergies; staples that go in every deck score low. The build runs inside Postgres in batches of 300 commanders, keeping the top 100 cards per commander before pairing so the job stays within database limits.

Functional roles

Every card is classified into 30+ roles such as ramp, removal, draw and win conditions, extending Scryfall's community OTAG tags with deck-context scoring. The classification layer is published as the Cardexia Open Semantic Standard under CC-BY-4.0.

LLM enrichment pipelines

Scheduled jobs use LLMs to cluster commanders by strategy, decompose each strategy into the roles a deck needs, and audit win conditions. Every AI call is logged with success, latency and errors.

Shadow evaluation of models

An in-house evaluation engine runs in shadow mode against LLMs, never shown to users, recording per-model latency, tokens and estimated cost across Cloudflare Workers AI and OpenRouter, so model choices are made on evidence.

How

TypeScript on Lovable and Supabase (Postgres functions, edge functions, scheduled jobs), Scryfall data, Cloudflare Workers AI and OpenRouter. Built spec-first with AI coding agents.

TypeScriptSupabaseCloudflareOpenRouterLovable

What I learned

The useful AI in Cardexia is mostly not a chatbot. It is statistics doing the heavy lifting, with LLMs enriching the data in batch and every model call measured.

← All projects