A browser-based fantasy character forge built with React, Vite, TypeScript and Tailwind CSS. Roll up a complete adventurer - name, class, race, alignment, ability scores, signature abilities, equipment, lore and portrait - then collect the results into a personal deck.
Fantasy Character Creator is a fully client-side web app for tabletop role-players, writers and game designers who need a believable character in seconds. Every roll produces a self-consistent character: the ability scores, hit points, armour class and equipment all follow the chosen class, and the generated backstory and quote are written around that class, race and alignment.
There is no backend and no account. Characters are saved to localStorage, so your deck persists between visits without any data leaving the browser.
- Randomised generation across 10 classes and 8 races, with 9 alignments.
- D&D-style ability scores (STR, DEX, CON, INT, WIS, CHA) with computed modifiers.
- Signature abilities, equipment (weapon, armour, relic), backstory and a character quote.
- Selective locking: lock the name, class, race or stats and re-roll only what you want to change.
- Card rarity tiers (Rare, Epic, Legendary) driven by the rolled stat spread.
- A collectible-style player card view with health, mana and core stats.
- Save any character to a personal deck, mark favourites, and revisit them later.
- Deck persistence via
localStorage- no login, no server round-trip.
- Browsable reference for every class: role, hit die, primary stat and signature abilities.
- Interactive dice rolling with animated results for use at the table.
- Multiple portrait style presets (cel-shaded, chibi, arcade, pixel) with per-class theme colours.
- Regeneration cycles through the available portrait variants for the selected class.
- Web Audio API sound effects synthesised in-browser (dice rolls, chimes) with a mute toggle.
- Responsive, keyboard-friendly layout with a medieval-inspired type system.
| Layer | Technology |
|---|---|
| UI framework | React 19 |
| Language | TypeScript |
| Build tool | Vite 8 |
| Styling | Tailwind CSS 4 (@tailwindcss/vite) |
| Icons | lucide-react |
| Animation | motion |
| Audio | Web Audio API (no audio assets) |
| Persistence | Browser localStorage |
| Type checking | tsc --noEmit |
The app has no runtime dependencies beyond the browser - no server, no database, no API keys.
fantasy-character-creator/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── pull_request_template.md
│ └── workflows/
│ └── pr-review.yml
├── src/
│ ├── assets/images/ # Class portraits, banners and backgrounds
│ ├── components/
│ │ ├── CharacterCard.tsx
│ │ ├── ClassCompendium.tsx
│ │ ├── DiceSandbox.tsx
│ │ ├── GeneratorControls.tsx
│ │ ├── Header.tsx
│ │ ├── MyDeckView.tsx
│ │ ├── PlayerCard.tsx
│ │ └── RosterDrawer.tsx
│ ├── data/characterData.ts # Class definitions, name/race pools, generators
│ ├── types/character.ts # Shared domain types
│ ├── utils/
│ │ ├── audio.ts
│ │ └── cartoonAvatarGenerator.ts
│ ├── App.tsx
│ ├── index.css
│ └── main.tsx
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── index.html
├── package.json
├── tsconfig.json
└── vite.config.ts
- Node.js 20 or newer
- npm (bundled with Node.js)
-
Clone the repository:
git clone https://github.com/nexus-devs-innovations/fantasy-character-creator.git cd fantasy-character-creator -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The app is served at
http://localhost:3000.
No environment variables are required.
npm run build
npm run previewThe static bundle is written to dist/ and can be served from any static host.
| Script | Description |
|---|---|
npm run dev |
Start the Vite dev server on port 3000 |
npm run build |
Build the production bundle into dist/ |
npm run preview |
Preview the production build locally |
npm run lint |
Type-check the project with tsc --noEmit |
npm run clean |
Remove the dist/ build output |
Contributions are very welcome - bug reports, feature requests and pull requests alike. Please read CONTRIBUTING.md for local setup, branch naming conventions and the pull request workflow, and CODE_OF_CONDUCT.md for community expectations.
- Found a bug? Open a bug report.
- Have an idea? Open a feature request.
Released under the MIT License. Copyright (c) 2026 Krish Sharma.