feat: character creator and hero routing #12

Merged
kevin merged 2 commits from feature/charactercreator into main 2026-05-10 22:15:48 +00:00
Owner

Summary

Implements the full character creation flow. After login, heroes are checked —
if none exist the player is routed to the Character Creator, otherwise to the
Hero List. Character creation is a 4-step wizard with name, class selection,
skill distribution and confirmation.

Frontend

Character Creator

  • 4-step wizard: name → class → skills → confirm
  • Classes loaded dynamically from API (GET /heroes/classes/all)
  • Stat bars visualize class attributes (STR, DEX, INT, VIT, WIL)
  • Recommended skills per class shown in skill distribution step
  • Remaining points can be saved for later — no forced full distribution
  • Hero created via POST /heroes/, skills invested via PUT /heroes/{id}/skills
  • Dark Fantasy styling consistent with Login/Home pages

Routing

  • Home.jsx — "Enter the World" checks hero count and routes accordingly
  • /createCharacterCreator (PrivateRoute)
  • /heroesHeroList stub (PrivateRoute)

Backend

  • Add recommended_skills column to HeroClass model
  • Add GET /heroes/classes/all endpoint with full stats and recommended_skills
  • Add data/classes/warrior.yaml, mage.yaml, rogue.yaml
  • Add scripts/seed_classes.py to import classes from YAML

Open / Next Steps

  • HeroList.jsx — display all heroes of current user
  • Hero detail / character sheet page
  • Quest view per city
## Summary Implements the full character creation flow. After login, heroes are checked — if none exist the player is routed to the Character Creator, otherwise to the Hero List. Character creation is a 4-step wizard with name, class selection, skill distribution and confirmation. ## Frontend ### Character Creator - 4-step wizard: name → class → skills → confirm - Classes loaded dynamically from API (`GET /heroes/classes/all`) - Stat bars visualize class attributes (STR, DEX, INT, VIT, WIL) - Recommended skills per class shown in skill distribution step - Remaining points can be saved for later — no forced full distribution - Hero created via `POST /heroes/`, skills invested via `PUT /heroes/{id}/skills` - Dark Fantasy styling consistent with Login/Home pages ### Routing - `Home.jsx` — "Enter the World" checks hero count and routes accordingly - `/create` → `CharacterCreator` (PrivateRoute) - `/heroes` → `HeroList` stub (PrivateRoute) ## Backend - Add `recommended_skills` column to `HeroClass` model - Add `GET /heroes/classes/all` endpoint with full stats and recommended_skills - Add `data/classes/warrior.yaml`, `mage.yaml`, `rogue.yaml` - Add `scripts/seed_classes.py` to import classes from YAML ## Open / Next Steps - `HeroList.jsx` — display all heroes of current user - Hero detail / character sheet page - Quest view per city
- Add recommended_skills column to HeroClass for Character Creator UI hints
- Remove recommended_skills from Hero (belongs to HeroClass only)
- Add GET /classes/all endpoint with full stats and recommended_skills
- Add data/classes/warrior.yaml, mage.yaml, rogue.yaml
- Add scripts/seed_classes.py to import classes from YAML into DB
- recommended_skills is UI-only — no enforcement in skill investment logic

Signed-off-by: kevin mika <mika.kevin@nexus-6.eu>
- Add CharacterCreator.jsx with 4-step wizard (name, class, skills, confirm)
- Add CharacterCreator.css with Dark Fantasy styling and stat bars
- Load classes dynamically from GET /heroes/classes/all
- Show recommended_skills per class in step 3
- Invest skill points via PUT /heroes/{id}/skills after hero creation
- Add HeroList.jsx stub
- Update Home.jsx with enterWorld() routing logic (no heroes → /create, else → /heroes)
- Update App.jsx with /create and /heroes routes
- Add PrivateRoute guards for new pages
- Fix Home.jsx enterWorld button missing onClick handler

Signed-off-by: kevin mika <mika.kevin@nexus-6.eu>
kevin merged commit 7266afd561 into main 2026-05-10 22:15:48 +00:00
kevin deleted branch feature/charactercreator 2026-05-10 22:16:00 +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!12
No description provided.