feat: hero list page and character creator polish #13

Merged
kevin merged 11 commits from dev/qolimpro into main 2026-05-11 08:36:13 +00:00
Owner

Summary

Adds the Hero List page and completes the character creation flow.
Players can now register, log in, create a hero with class and skill
distribution, and see all their heroes in a styled overview.

Changes

HeroList

  • Add HeroList.jsx loading heroes from GET /heroes/
  • Show name, class, level, gold, available skillpoints and XP bar per hero
  • Highlight active hero (from localStorage)
  • Save activeHeroId and activeHeroName to localStorage on selection
  • Add new hero button → /create, back button → /home
  • Add HeroList.css with Dark Fantasy styling

Character Creator

  • Add cancel button on step 1 → /home
  • Fix: enterWorld() function was inside JSX instead of component body

Routing

  • /createCharacterCreator (PrivateRoute)
  • /heroesHeroList (PrivateRoute)
  • selectHero navigates to /home as placeholder until /world is built

Backend

  • Add recommended_skills column to HeroClass
  • Add GET /heroes/classes/all with stats and recommended_skills
  • Add data/classes/warrior.yaml, mage.yaml, rogue.yaml
  • Add scripts/seed_classes.py
  • Fix DB schema mismatch by dropping and recreating game.db

Open / Next Steps

  • /world route — world map with city selection
  • Quest view per city
  • Hero detail / character sheet page
  • Azgaar world import
## Summary Adds the Hero List page and completes the character creation flow. Players can now register, log in, create a hero with class and skill distribution, and see all their heroes in a styled overview. ## Changes ### HeroList - Add `HeroList.jsx` loading heroes from `GET /heroes/` - Show name, class, level, gold, available skillpoints and XP bar per hero - Highlight active hero (from `localStorage`) - Save `activeHeroId` and `activeHeroName` to `localStorage` on selection - Add new hero button → `/create`, back button → `/home` - Add `HeroList.css` with Dark Fantasy styling ### Character Creator - Add cancel button on step 1 → `/home` - Fix: `enterWorld()` function was inside JSX instead of component body ### Routing - `/create` → `CharacterCreator` (PrivateRoute) - `/heroes` → `HeroList` (PrivateRoute) - `selectHero` navigates to `/home` as placeholder until `/world` is built ### Backend - Add `recommended_skills` column to `HeroClass` - Add `GET /heroes/classes/all` with stats and recommended_skills - Add `data/classes/warrior.yaml`, `mage.yaml`, `rogue.yaml` - Add `scripts/seed_classes.py` - Fix DB schema mismatch by dropping and recreating `game.db` ## Open / Next Steps - `/world` route — world map with city selection - Quest view per city - Hero detail / character sheet page - Azgaar world import
- Add Abbrechen button navigating back to /home
- Only needed on step 1 — subsequent steps have Back button

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- Add HeroList.jsx loading heroes from GET /heroes/
- Show name, class, level, gold, available skillpoints and XP bar per hero
- Save activeHeroId and activeHeroName to localStorage on selection
- Add new hero button routing to /create
- Add back button routing to /home
- Add HeroList.css with Dark Fantasy styling

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- Add POST /heroes/create endpoint with attribute-based ability calculation
- 25 initial attribute points, each point = +5 on all governed abilities
- Validate max 25 points, valid stat names and no negative values
- Update CharacterCreator step 3 to show attributes instead of raw skills
- Show preview of affected abilities per attribute
- Single API call instead of N skill investment calls

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- Initial 25 attribute points grant ability values that shouldn't count
  against level-up skillpoints
- Earned = (level * 5) + 25 instead of level * 5

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- No longer needed since character creator uses attribute distribution
- Remove json import from get_classes function

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- Remove json.dumps for recommended_skills field
- Remove json import

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- Show class base stats (STR/DEX/INT/VIT/WIL) as read-only overview
- Display all 43 abilities grouped by category
- Show effective value live (invested + class bonus)
- 25 points to distribute freely across all abilities
- Invest skills via PUT /heroes/{id}/skills after hero creation

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- Show class base stats (STR/DEX/INT/VIT/WIL) as read-only overview
- Display all 43 abilities grouped by 9 categories
- Show effective value live (invested points + class stat bonus)
- 25 points to distribute freely across all abilities
- Replace attribute-based system with direct skill investment
- Add cc-stats-grid, cc-stat-box, cc-section-title CSS classes

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
- Add data/classes/, scripts/seed_classes.py, run_*.sh to structure
- Add POST /heroes/create endpoint and updated guild join endpoint
- Fix skillpoints formula to include +25 initial offset
- Update quest system section with phase system
- Update guild system with state-wide rivalry restriction
- Replace bcrypt with argon2 in dependencies

Signed-off-by: Kevin Mika <mika.kevin@nexus-6.eu>
kevin merged commit 3f06e37d28 into main 2026-05-11 08:36:13 +00:00
kevin deleted branch dev/qolimpro 2026-05-11 08:36:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kevin/nexus-rpg!13
No description provided.