Add game data seeding from PokeAPI with level ranges

Seed the database with Pokemon game data for 5 games (FireRed, LeafGreen,
Emerald, HeartGold, SoulSilver) using pokebase. Includes Alembic migrations
for route unique constraints and encounter level ranges, a two-phase seed
system (offline fetch to JSON, then idempotent upserts), and Dockerfile
updates for the seed runner.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-05 15:08:54 +01:00
parent 08c05f2a2f
commit cfd4c51514
22 changed files with 56871 additions and 17 deletions

View File

@@ -1,31 +1,34 @@
---
# nuzlocke-tracker-k5lm
title: Initial Game Data Seeding
status: todo
status: completed
type: task
priority: normal
created_at: 2026-02-04T15:44:12Z
updated_at: 2026-02-04T15:47:29Z
updated_at: 2026-02-05T13:37:50Z
parent: nuzlocke-tracker-f5ob
---
Create seed data for the database with initial games, routes, and Pokémon.
## Checklist
- [ ] Research and compile data for MVP games:
- [ ] Pokémon FireRed/LeafGreen (Gen 3 Kanto remakes - popular for Nuzlockes)
- [ ] Pokémon Emerald (Gen 3 Hoenn)
- [ ] Pokémon HeartGold/SoulSilver (Gen 4 Johto remakes)
- [ ] For each game, gather:
- [ ] All routes/areas in progression order
- [ ] Available wild Pokémon per route
- [ ] Encounter methods (grass, surf, fish, etc.)
- [ ] Create seed scripts/migrations to populate database
- [ ] Include Pokémon base data (national dex, names, types, sprite URLs)
- [ ] Document data sources for attribution
- [x] Research and compile data for MVP games:
- [x] Pokémon FireRed/LeafGreen (Gen 3 Kanto remakes - popular for Nuzlockes)
- [x] Pokémon Emerald (Gen 3 Hoenn)
- [x] Pokémon HeartGold/SoulSilver (Gen 4 Johto remakes)
- [x] For each game, gather:
- [x] All routes/areas in progression order
- [x] Available wild Pokémon per route
- [x] Encounter methods (grass, surf, fish, etc.)
- [x] Create seed scripts/migrations to populate database
- [x] Include Pokémon base data (national dex, names, types, sprite URLs)
- [x] Document data sources for attribution
- [x] Curate route ordering to match game progression — split to nuzlocke-tracker-j28y
## Notes
- Use PokeAPI or Bulbapedia as data sources
- Admin panel allows adding more games later
- Focus on accuracy for the 3 MVP games
- Sprite URLs can point to existing sprite repositories
## Data Sources
- Game data (routes, encounters, Pokemon): [PokeAPI](https://pokeapi.co/) via [pokebase](https://github.com/PokeAPI/pokebase) Python wrapper
- Sprites: [PokeAPI/sprites](https://github.com/PokeAPI/sprites) on GitHub