Skip to content

fakeware-sh/fakeware

Repository files navigation

Fakeware

Fakeware

Like database migrations, but for Shopware 6 demo data.

npm License: MIT Docs

Fill your Shopware shop by describing products, categories and orders in typed TypeScript, then apply and remove them with a single command. You define your data, run fakeware up to sync only what changed, and fakeware down to remove exactly what it created. Fakeware never touches data it didn't create.

Demo

import { define, many, ref, shop } from '@fakeware/core'

define('tax', { $key: 'standard', name: 'Standard rate', taxRate: 19 })

define(
  'product',
  many(10, (ctx) => ({
    name: `Demo product ${ctx.index + 1}`,
    productNumber: `SW-${10000 + ctx.index}`,
    stock: 100,
    taxId: ref('tax').key('standard'),
    price: [{ currencyId: shop.defaultCurrency, gross: 19.99, net: 16.8, linked: true }],
  })),
)
fakeware up --dry-run   # preview the changes
fakeware up             # apply them (re-run = nothing changes)
fakeware down           # remove exactly what fakeware created

Features

Feature What it means
Typed, declarative data Describe entities as plain objects with a tiny define / ref / shop language, with full TypeScript inference and no boilerplate.
Deterministic by design Stable UUIDs and content hashing mean the same definitions always produce the same records, so re-running changes nothing.
Apply and revert fakeware up syncs only what changed. fakeware down removes exactly what it created, tracked in a per-shop manifest.
Shop-aware references Resolve currencies, taxes, countries, salutations and states from the live shop, so your data lands valid every time.
Relationships that just work Reference other entities by key, index or a seeded random pick, and Fakeware orders the writes for you.
Safe to re-run Idempotent syncs, crash-safe manifest writes and resilient teardown make Fakeware safe in scripts and CI.

Get started

bun create fakeware my-seed

Then follow the guide to point it at your Shopware shop and seed your first data.

Documentation

Guides, concepts and the full API reference live at fakeware.sh.

About

Like database migrations, but for demo data. Fill your Shopware shop by describing products, categories and orders in TypeScript, then apply and remove them with a single command.

Topics

Resources

License

Contributing

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors