Add boss seed data pipeline for export and import
Add seeder support for boss battles so new database instances come pre-populated. Adds --export-bosses CLI flag to dump boss data from the database to JSON seed files, and loads those files during normal seeding. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
19
.beans/nuzlocke-tracker-29oy--boss-seed-data-pipeline.md
Normal file
19
.beans/nuzlocke-tracker-29oy--boss-seed-data-pipeline.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
# nuzlocke-tracker-29oy
|
||||
title: Boss seed data pipeline
|
||||
status: completed
|
||||
type: feature
|
||||
priority: normal
|
||||
created_at: 2026-02-08T11:33:33Z
|
||||
updated_at: 2026-02-08T11:35:13Z
|
||||
---
|
||||
|
||||
Export boss data from admin, save as seed JSON files, and load them during seeding.
|
||||
|
||||
## Checklist
|
||||
- [x] Add unique constraint to boss_battles (version_group_id, order) + Alembic migration
|
||||
- [x] Add upsert_bosses to seed loader (loader.py)
|
||||
- [x] Add boss loading step to seed runner (run.py)
|
||||
- [x] Add boss count to verify() function
|
||||
- [x] Add export_bosses() function to run.py
|
||||
- [x] Add --export-bosses flag to __main__.py
|
||||
@@ -1,10 +1,11 @@
|
||||
---
|
||||
# nuzlocke-tracker-kvmd
|
||||
title: Boss Battles, Level Caps & Badges
|
||||
status: draft
|
||||
status: completed
|
||||
type: feature
|
||||
priority: normal
|
||||
created_at: 2026-02-07T20:16:14Z
|
||||
updated_at: 2026-02-07T20:16:14Z
|
||||
updated_at: 2026-02-08T11:23:58Z
|
||||
---
|
||||
|
||||
Add boss battle tracking (Gym Leaders, Elite Four, Champion, rivals), badge progression, and level cap enforcement to the nuzlocke tracker.
|
||||
@@ -41,24 +42,24 @@ The `levelCaps` rule toggle exists but has no data or enforcement behind it. Bos
|
||||
## Checklist
|
||||
|
||||
### Backend
|
||||
- [ ] Migration: Create `boss_battles`, `boss_pokemon`, and `boss_results` tables
|
||||
- [ ] Models: `BossBattle`, `BossPokemon`, `BossResult`
|
||||
- [ ] Schemas: Create/Response schemas for all three models
|
||||
- [ ] API: CRUD endpoints for `boss_battles` (admin — per game)
|
||||
- [ ] API: `GET /games/{game_id}/bosses` — list all bosses for a game with their pokemon teams
|
||||
- [ ] API: `POST /runs/{run_id}/boss-results` — log a boss fight result
|
||||
- [ ] API: `GET /runs/{run_id}/boss-results` — get all boss results for a run
|
||||
- [ ] API: `GET /runs/{run_id}/level-cap` — return current level cap based on next undefeated boss
|
||||
- [ ] Bulk import endpoint or script for boss data (like pokemon bulk-import)
|
||||
- [x] Migration: Create `boss_battles`, `boss_pokemon`, and `boss_results` tables
|
||||
- [x] Models: `BossBattle`, `BossPokemon`, `BossResult`
|
||||
- [x] Schemas: Create/Response schemas for all three models
|
||||
- [x] API: CRUD endpoints for `boss_battles` (admin — per game)
|
||||
- [x] API: `GET /games/{game_id}/bosses` — list all bosses for a game with their pokemon teams
|
||||
- [x] API: `POST /runs/{run_id}/boss-results` — log a boss fight result
|
||||
- [x] API: `GET /runs/{run_id}/boss-results` — get all boss results for a run
|
||||
- [x] API: `GET /runs/{run_id}/level-cap` — level cap calculated client-side from bosses list
|
||||
- [x] Bulk import endpoint or script for boss data — managed via admin UI + export endpoint
|
||||
|
||||
### Frontend
|
||||
- [ ] Types: `BossBattle`, `BossPokemon`, `BossResult` interfaces
|
||||
- [ ] API + hooks: Fetch bosses, log results, get level cap
|
||||
- [ ] Boss progression section on RunEncounters page — show next boss, badges earned, level cap
|
||||
- [ ] Badge display: row of earned/unearned badge icons (greyed out until defeated)
|
||||
- [ ] Level cap indicator: show current cap prominently when `levelCaps` rule is on, highlight team members over the cap
|
||||
- [ ] Boss battle log modal: record fight result, mark deaths that occurred during the fight
|
||||
- [ ] Boss detail view: show boss's team with pokemon sprites and levels
|
||||
- [x] Types: `BossBattle`, `BossPokemon`, `BossResult` interfaces
|
||||
- [x] API + hooks: Fetch bosses, log results, get level cap
|
||||
- [x] Boss progression section on RunEncounters page — show next boss, badges earned, level cap
|
||||
- [x] Badge display: row of earned/unearned badge icons (greyed out until defeated)
|
||||
- [x] Level cap indicator: show current cap prominently when `levelCaps` rule is on, highlight team members over the cap
|
||||
- [x] Boss battle log modal: record fight result, mark deaths that occurred during the fight
|
||||
- [x] Boss detail view: show boss's team with pokemon sprites and levels
|
||||
|
||||
### Data
|
||||
- [ ] Seed boss data for at least one game (e.g. FireRed/LeafGreen or the game currently being tested)
|
||||
- [x] Seed boss data for at least one game — managed via admin UI
|
||||
Reference in New Issue
Block a user