Implements the genlocke creation feature end-to-end: Genlocke and GenlockeLeg models with migration, POST /genlockes endpoint that creates the genlocke with all legs and auto-starts the first run, and a 4-step wizard UI (Name, Select Games with preset templates, Rules, Confirm) at /genlockes/new. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
2.7 KiB
Markdown
43 lines
2.7 KiB
Markdown
---
|
||
# nuzlocke-tracker-glh8
|
||
title: Gather generation metadata (games, regions)
|
||
status: completed
|
||
type: task
|
||
priority: normal
|
||
created_at: 2026-02-08T19:20:49Z
|
||
updated_at: 2026-02-09T08:06:19Z
|
||
parent: nuzlocke-tracker-25mh
|
||
blocking:
|
||
- nuzlocke-tracker-kz5g
|
||
---
|
||
|
||
Collect and store metadata about each Pokemon generation to support genlocke features. This data is needed so the app can present generation-aware options when setting up a genlocke (e.g. "pick one game per generation").
|
||
|
||
## Data to gather per generation
|
||
- **Generation number** (1–9)
|
||
- **Main region** (e.g. Gen 1 → Kanto, Gen 2 → Johto, etc.)
|
||
- **Games in the generation** — including remakes and enhanced versions:
|
||
- Original titles (e.g. Red, Blue, Yellow)
|
||
- Remakes that belong to the generation's region (e.g. FireRed/LeafGreen are Gen 1 region but Gen 3 era)
|
||
- Consider whether remakes should be listed under their original generation (by region) or their release generation (by engine/dex) — genlocke players typically organize by region
|
||
|
||
## Notes
|
||
- This could be stored as seed data (JSON) or as a database table
|
||
- The existing Game model already has `generation` and `region` fields, so some of this data may already be derivable from existing games in the DB
|
||
- However, a dedicated generations reference would be useful for UI purposes (showing all generations even if not all games are seeded yet)
|
||
- Check if `backend/src/app/seeds/data/generations.json` already exists or if this needs to be created from scratch
|
||
|
||
## Decisions
|
||
- Legends games (Hisui, Lumiose) are excluded from genlocke presets — available via Custom only
|
||
- Black 2/White 2 are grouped with Black/White in the same Unova slot (category: sequel)
|
||
- Normal Genlocke defaults use best mainline remake: FireRed, HeartGold, Alpha Sapphire, Platinum, Ultra Sun
|
||
- Metadata stored as `category` field on Game model + standalone `regions.json` seed file
|
||
|
||
## Checklist
|
||
- [x] Define the generation-to-region mapping (Gen 1 = Kanto, Gen 2 = Johto, ..., Gen 9 = Paldea)
|
||
- [x] Determine how to group games by region (use `region` field on existing Game model, or create a dedicated lookup)
|
||
- [x] Create a `regions.json` seed file (or equivalent) with: generation number, region name, region order, and which games belong to each region
|
||
- [x] Categorize each game as "original", "remake", "enhanced", "sequel", or "spinoff" so presets can filter appropriately
|
||
- [x] Define which game is the "default" pick per region for the Normal Genlocke preset (e.g., FireRed for Kanto, HeartGold for Johto)
|
||
- [x] Add an API endpoint or extend the games endpoint to return games grouped by region with generation metadata
|
||
- [x] Verify all seeded games are correctly tagged with their region |