Skip to content

Decksmith โ€” Product Roadmap โ€‹

Status: โœ… Done ยท ๐Ÿ”„ In progress ยท โฌœ Not started


Phase 0: Infrastructure โ€‹

  • โœ… Monorepo scaffold (pnpm + Turborepo)
  • โœ… CI pipeline (GitHub Actions โ€” format, lint, typecheck, test)
  • โœ… TypeScript strict mode
  • โœ… Oxlint + Oxfmt (ADR-0013)
  • โœ… Shared configs in packages/config (tsconfig, vitest)
  • โœ… Prisma schema (16 models) in packages/db
  • โœ… Zod schemas (all domains) in packages/schema
  • โœ… Fastify server + Zod type provider in apps/api
  • โœ… User CRUD routes (/api/v1/users)
  • โœ… Database seed script with faker.js
  • โœ… 14 ADRs + 10 feature specs
  • โœ… Vitest infrastructure (shared config + sample test)
  • โœ… .env.example

Phase 1: Documentation & Context System โ€‹

  • โœ… Create apps/docs/roadmap.md (this file)
  • โœ… Create apps/docs/context/project-state.md
  • โœ… Create apps/docs/context/decisions-log.md
  • โœ… Update CLAUDE.md with @import + learning contract + maintenance policy
  • โœ… Create apps/docs/skills-and-agents.md
  • โœ… Create .claude/WORKFLOW.md
  • โœ… Create 5 skills: session.start, session.end, roadmap.update, module.scaffold, spec.sync
  • โœ… Create 9 subagents: api-reviewer, db-reviewer, domain-reviewer, frontend-reviewer, ui-reviewer, a11y-reviewer, test-writer, devops-reviewer, cto-advisor
  • โœ… Configure GitHub MCP

Phase 2: Foundation โ€‹

2.1 Environment & DB Connection โ€‹

  • โœ… Verify Supabase project + connection string
  • โœ… Run db:push to sync Prisma schema to Supabase
  • โœ… Run seed script against live DB

2.2 Auth (spec: user-auth.md) โ€‹

  • โฌœ Enable Supabase Auth + OAuth providers (Google, GitHub)
  • โœ… Auth plugin in apps/api (JWT verification middleware)
  • โœ… Auth routes: register, login, logout, refresh, forgot-password, reset-password
  • โœ… Zod schemas for auth DTOs in packages/schema/src/auth/
  • โฌœ RLS policies for user-owned tables
  • โœ… Auto-create UserPreferences on signup (nested Prisma write in register route)

2.3 Rate Limiting & CORS โ€‹

  • โœ… @fastify/rate-limit with strict limits on auth endpoints
  • โœ… @fastify/cors configured for dev + prod origins

Phase 3: Scryfall Integration (spec: card-search.md) โ€‹

3.1 packages/scryfall โ€‹

  • โฌœ Bulk data download client
  • โฌœ Card normalization (Scryfall โ†’ Card + CardPrint Prisma models)
  • โฌœ In-memory caching layer
  • โฌœ Zod schemas for Scryfall API responses
  • โฌœ Unit tests for normalization logic

3.2 Initial Data Sync (apps/worker) โ€‹

  • โฌœ BullMQ + Redis setup in apps/worker
  • โฌœ scryfall-sync job + daily cron schedule
  • โฌœ Incremental update handling

3.3 Card API โ€‹

  • โฌœ GET /api/v1/cards/search (full-text + filters: color, CMC, rarity, format)
  • โฌœ GET /api/v1/cards/:id (card detail + prints)
  • โฌœ Autocomplete endpoint (< 200ms)

Phase 4: Web Frontend Foundation โ€‹

4.1 apps/web Setup โ€‹

  • โฌœ Vite + React initialized
  • โฌœ TanStack Router + TanStack Query
  • โฌœ Tailwind + shadcn/ui
  • โฌœ Base routes: /, /login, /register, /dashboard

4.2 packages/api-client โ€‹

  • โฌœ Typed fetch client wrapping all API endpoints
  • โฌœ Error handling with typed error codes from packages/schema

4.3 packages/query โ€‹

  • โฌœ TanStack Query hooks: useUser, useUserPreferences, useCardSearch

4.4 Auth UI โ€‹

  • โฌœ Login + Register pages
  • โฌœ Email confirmation + password reset flow
  • โฌœ Auth guard for protected routes

4.5 packages/web-ui Foundation โ€‹

  • โฌœ shadcn/ui base components: Button, Input, Form, Card, Badge, Dialog, Toast
  • โฌœ Design tokens from packages/tokens applied

Phase 5: Internationalisation (i18n) โ€‹

Dependency: Phase 4.1 (apps/web initialized)

  • โฌœ ADR: i18n strategy โ€” Zod error codes vs hardcoded messages
  • โฌœ Replace hardcoded English strings in packages/schema Zod validators with error codes
  • โฌœ i18n library in apps/web (e.g. react-i18next) with locale files (EN + FR baseline)
  • โฌœ Accept-Language header support in apps/api (locale-aware error messages)
  • โฌœ i18n in apps/mobile (Expo Localization)

Phase 6: Collection Management (spec: collection.md) โ€‹

6.1 Collection API โ€‹

  • โฌœ CRUD for collection entries + folders
  • โฌœ Domain logic in packages/domain
  • โฌœ Tags CRUD + attach/detach

6.2 Collection UI โ€‹

  • โฌœ Inventory page (grid/table/list views)
  • โฌœ Add card flow (search โ†’ print โ†’ quantity/condition)
  • โฌœ Saved views, folder nav, tag UI

Phase 7: Deck Management (spec: deck-management.md) โ€‹

7.1 Deck API โ€‹

  • โฌœ CRUD for decks + sections + cards
  • โฌœ Format validation (singleton, color identity, banlists)
  • โฌœ Collection coverage calculation
  • โฌœ Deck statistics (mana curve, colors, avg CMC)
  • โฌœ Public deck sharing

7.2 Deck UI โ€‹

  • โฌœ Deck list + creation flow
  • โฌœ Deck builder (sections sidebar + card grid)
  • โฌœ Format validation feedback, coverage indicator, stats panel
  • โฌœ Public share page /decks/:id (no auth)

Phase 8: Pricing (spec: pricing.md) โ€‹

  • โฌœ Extend Scryfall sync for prices (TCGplayer USD + Cardmarket EUR)
  • โฌœ GET /api/v1/collection/valuation
  • โฌœ GET /api/v1/decks/:id/cost
  • โฌœ Pricing UI in collection view + deck builder

Phase 9: PDF Generation (spec: pdf-generation.md) โ€‹

9.1 packages/pdf โ€‹

  • โฌœ Deterministic PDF layout engine
  • โฌœ Paper formats, grid config, margins, cut lines, DPI, double-sided
  • โฌœ Unit tests for layout math

9.2 Worker Infrastructure โ€‹

  • โฌœ Redis (Docker for dev, Upstash for production)
  • โฌœ BullMQ PDF job

9.3 PDF API + UI โ€‹

  • โฌœ POST /api/v1/pdf (enqueue) + GET status + GET download
  • โฌœ Preview panel, config form, job status polling

Phase 10: 3D Card Viewer (spec: card-details.md) โ€‹

  • โฌœ Three.js card component in packages/web-ui
  • โฌœ Rotation, zoom, animated foil shader
  • โฌœ Fallback for low-end devices

Phase 11: Craft Guide (spec: craft-guide.md) โ€‹

  • โฌœ CraftGuideArticle seed data
  • โฌœ GET /api/v1/craft-guide (list + single)
  • โฌœ Article list + reader UI

Phase 12: Recommendations โ€‹

  • โฌœ Recommendation engine in packages/domain
  • โฌœ API routes + feedback endpoints
  • โฌœ Recommendations panel in deck builder

Phase 13: Documentation Site โ€‹

  • โœ… apps/docs/ with VitePress (docs live here directly)
  • โœ… GitHub Pages deployment via .github/workflows/docs.yml

Phase 14: Mobile App (apps/mobile) โ€‹

Dependencies: Phase 6 + 7 stable on web

14.1 Setup โ€‹

  • โฌœ Initialize Expo + React Native in apps/mobile
  • โฌœ Configure packages/native-ui (React Native components)
  • โฌœ Auth: Supabase Auth for React Native (expo-auth-session)
  • โฌœ Navigation: Expo Router
  • โฌœ Shared: packages/api-client, packages/schema, packages/domain (reused as-is)

14.2 Core Features โ€‹

  • โฌœ Auth flow (login, register, session)
  • โฌœ Card search (camera barcode scan โ†’ card lookup)
  • โฌœ Collection management (add/view/edit entries)
  • โฌœ Deck list + view (read-only, edit later)
  • โฌœ PDF generation trigger + download

14.3 Mobile-Specific โ€‹

  • โฌœ Push notifications (Expo Notifications) for price alerts, PDF ready
  • โฌœ Offline mode for collection browsing
  • โฌœ Camera integration for card scanning

Evergreen โ€‹

  • โฌœ Write unit tests as each module is implemented
  • โฌœ Update ROADMAP per session (/roadmap.update)
  • โฌœ Update apps/docs/context/project-state.md per session (/session.end)
  • โฌœ Check dependency updates at session start (/session.start)
  • โฌœ Create ADRs for new architectural decisions

Built with VitePress