feat: character creator and hero routing #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/charactercreator"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
GET /heroes/classes/all)POST /heroes/, skills invested viaPUT /heroes/{id}/skillsRouting
Home.jsx— "Enter the World" checks hero count and routes accordingly/create→CharacterCreator(PrivateRoute)/heroes→HeroListstub (PrivateRoute)Backend
recommended_skillscolumn toHeroClassmodelGET /heroes/classes/allendpoint with full stats and recommended_skillsdata/classes/warrior.yaml,mage.yaml,rogue.yamlscripts/seed_classes.pyto import classes from YAMLOpen / Next Steps
HeroList.jsx— display all heroes of current user- 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>