Files
nuzlocke-tracker/.beans/nuzlocke-tracker-kz5g--genlocke-creation-wizard.md
2026-02-09 09:36:03 +01:00

3.1 KiB

title, status, type, priority, created_at, updated_at, parent, blocking
title status type priority created_at updated_at parent blocking
Genlocke creation wizard completed feature normal 2026-02-09T07:42:10Z 2026-02-09T08:23:53Z nuzlocke-tracker-25mh
nuzlocke-tracker-x4p6
nuzlocke-tracker-thbz

Multi-step wizard UI for creating a new genlocke. This is the entry point for the entire genlocke feature.

Steps

Step 1: Name

  • User enters a name for the genlocke (e.g., "My First Genlocke")

Step 2: Game Selection

  • Offer preset templates:
    • True Genlocke — slots for each region using original releases only
    • Normal Genlocke — slots for each region using the latest remake/enhanced version as the default pick
    • Custom — start with an empty list, add games freely
  • For preset templates, show one slot per region (Kanto, Johto, Hoenn, Sinnoh, Unova, Kalos, Alola, Galar, Paldea). Each slot shows available games for that region and lets the user pick one.
  • The user can add/remove/reorder legs after selecting a template.
  • Games are grouped by region (FireRed is a "Kanto" option, not "Gen 3").

Step 3: Rules

  • Nuzlocke rules — standard rules configuration (reuse existing RulesConfiguration component). Set once, applied to all legs.
  • Genlocke rules — Keep HoF (default) vs Retire HoF. Radio select.

Step 4: Confirm & Start

  • Summary of the genlocke: name, legs in order, rules.
  • "Start Genlocke" button creates the Genlocke entity, all GenlockeLeg records, and auto-creates + starts the first NuzlockeRun.

Backend

  • POST /api/v1/genlockes — Create a genlocke with all legs and rules in one request. Should create the Genlocke, GenlockeLeg records, and the first NuzlockeRun.
  • Needs the Genlocke and GenlockeLeg database models + migration.

Frontend

  • New route: /genlockes/new
  • Multi-step form component with back/next navigation
  • Reuse GameCard/GameGrid components for game selection
  • Reuse RulesConfiguration for nuzlocke rules step

Dependencies

  • Needs generation/region metadata to power the preset templates (see nuzlocke-tracker-glh8)

Checklist

  • Create Genlocke SQLAlchemy model (name, status, genlocke_rules JSONB, nuzlocke_rules JSONB, created_at)
  • Create GenlockeLeg SQLAlchemy model (genlocke_id FK, run_id FK nullable, leg_order, game_id FK)
  • Create Alembic migration for both new tables
  • Create Pydantic schemas for genlocke creation request/response
  • Implement POST /api/v1/genlockes endpoint (creates genlocke, legs, and first run)
  • Build the multi-step wizard shell component with back/next navigation and step indicator
  • Build Step 1: Name input
  • Build Step 2: Preset template selector (True / Normal / Custom) with region-grouped game picker
  • Build Step 3: Rules configuration (reuse RulesConfiguration + genlocke rules radio)
  • Build Step 4: Confirmation summary with "Start Genlocke" action
  • Add /genlockes/new route to the React Router config
  • Add TypeScript types for genlocke API responses
  • Wire up the wizard to call the create endpoint and redirect to the genlocke overview on success