A demo app showing procedural generation — type any name and get a unique, deterministic character with a generated SVG avatar.
The character is generated entirely from the input name, with no randomness:
- The name is hashed into a numeric seed using FNV-1a
- That seed drives a stateful PRNG (lib/seededRandom.ts)
- The PRNG picks a colour palette, job, mood, eye size, and accessory from fixed lists
- The Avatar component renders the character as an inline SVG
The same name always produces the same character. Change one letter and you get a completely different one.
npm install
npm run devOpen http://localhost:3000 and type a name into the input field.
app/page.tsx — main page, input field and character data display
components/Avatar.tsx — SVG avatar renderer
lib/seededRandom.ts — hash + PRNG + character generation logic