DEV Community

Cover image for I built LoreData: a mock data generator with characters from Breaking Bad, Game of Thrones, Harry Potter, and other universes.
Orchid Files
Orchid Files

Posted on

I built LoreData: a mock data generator with characters from Breaking Bad, Game of Thrones, Harry Potter, and other universes.

In product demos, you often see names like John Doe, Jane Smith, Test User, and random emails like test@example.com. That works fine for smoke tests. It falls short in demos, seeds, mockups, and showcase pages.

The problem is not that the data is fake. The problem is that it is incoherent: the name and address are random, the bio feels disconnected, and the persona's interests and profession feel generated. In a demo, that is obvious right away.

I wanted a generator that builds not just a random set of fields, but a coherent persona from a single fictional universe.

Demo: https://loredata.orchidfiles.com

 

What LoreData does

LoreData generates personas from pop culture universes: The Simpsons, Star Wars, The Sopranos, and more. It currently supports 25 universes. Every field in a persona comes from the same universe.

import { person, group } from 'loredata';

const p = person({ universe: 'breaking-bad' });
// {
//   firstName: 'Walter',
//   lastName: 'White',
//   username: 'heisenberg',
//   email: 'blue_sky_cook@lospollos.com',
//   quote: "I am the one who knocks.",
//   profession: 'Chemistry teacher',
//   interests: ['chemistry', 'cooking', 'family'],
//   address: { street: '308 Negra Arroyo Lane', city: 'Albuquerque', state: 'NM' },
//   symbol: '☢️',
//   universe: 'breaking-bad'
// }
Enter fullscreen mode Exit fullscreen mode

You can generate a group too:

const team = group({ universe: 'game-of-thrones', size: 3 });
// [
//   { firstName: 'Jon', lastName: 'Snow', username: 'lord_commander', ... },
//   { firstName: 'Daenerys', lastName: 'Targaryen', username: 'mother_of_dragons', ... },
//   { firstName: 'Tyrion', lastName: 'Lannister', username: 'halfman', ... },
// ]
Enter fullscreen mode Exit fullscreen mode

 

This is not a replacement for Faker.js

Faker.js generates realistic random data. The fields may be valid, but within a single persona they are not really connected: there is no shared context and no character identity. LoreData solves a different problem: personas for interfaces, where recognizability and internal consistency matter more than field validity alone.

 

Install and CLI

npm install loredata        # library
npm install -g loredata     # CLI
Enter fullscreen mode Exit fullscreen mode

The CLI supports filtering by interests, name, and output format:

loredata person --universe sherlock
loredata person --interests chemistry,cooking
loredata person --interests chemistry,cooking --interests-mode and
loredata person --name walter --format json
loredata group --universe friends --size 5
loredata universes
Enter fullscreen mode Exit fullscreen mode

 

Deterministic output

If you need reproducible results, for example for test fixtures, just pass a seed:

const p = person({ universe: 'matrix', seed: 42 });
const team = group({ universe: 'matrix', size: 3, seed: 42 });
Enter fullscreen mode Exit fullscreen mode

Given the same seed, you always get the same persona or the same group of personas.

 

Browser entry point

The library also supports browser environments through a separate entry point with no dependency on fs or path:

import { loadUniverse, personFromData } from 'loredata/browser';

const universe = await loadUniverse('breaking-bad');
const p = personFromData(universe);
Enter fullscreen mode Exit fullscreen mode

It works with Vite, webpack, and any browser bundler.

 

How the project is structured

It is a TypeScript monorepo built with pnpm. It includes an npm package with the library, a CLI, and a web app for the demo.

The data lives in JSON datasets: each universe has separate files for metadata, characters, and addresses. To add a new universe, you only need to create data/{id}/meta.json, data/{id}/characters.json, and data/{id}/addresses.json. There is no manual registry. The loader picks up the new folder automatically.

Here, the data matters as much as the code. Product quality depends on canon accuracy: the right professions, real locations from the source material, and quotes that fit the character. AI agents handle about 90% of the dataset drafting work.

 

Who this is for

  • developers filling a local database or Storybook stories with recognizable personas
  • designers building mockups who do not want to use John Doe again
  • QA engineers creating more expressive test accounts with different profiles
  • tutorial and conference talk authors who want screenshots that feel less generic

 

Disclaimer

LoreData is an unofficial fan tool and is not affiliated with the rights holders of these universes, studios, or streaming platforms.

 

Links

The project is open source. PRs with new universes are welcome.

 

Contact

Top comments (0)