Demo Sites¶
Six fictional organisations ship with the platform, each on a different storefront theme, so the range of Badger Commerce is visible in one sitting. They are what a new developer or a prospect should look at first.
| Site | Merchant | Theme | Shows |
|---|---|---|---|
saucepanic |
Sauce Panic: small-batch hot sauce, pickles, sauce club | Pop | Colour-blocked cards, stickers for a real saving, low stock and sold out, size variants, the marquee, prepaid club boxes |
halden |
Halden Trade Supplies: fixings, PPE, tools, sealants | Depot | 60+ SKUs in a category tree, grid and SKU-list views, quick-buy steppers, stock dots, variants (boot sizes, pack sizes), free next-day delivery over £150 |
brightside |
Brightside: home and tech at honest prices | Brock | Percentage savings, promises on every page, stepped checkout, order confirmation copy, free delivery over £50 |
kilnandkin |
Kiln & Kin: ceramics, linen and candles from a two-person studio | Atelier | Picture-led editorial layout, hero, storytelling copy, glaze and scent variants, About, FAQ and journal pages |
meridian |
Meridian: a small premium audio range | Spec | Dark showcase layout for a short range, specification table from product attributes, colourway variants that recolour the page, a sold-out product, free delivery over £150 |
hedgerow |
Hedgerow Wildlife Hospital: a hedgehog charity | Nova | Donations with Gift Aid, adoption with a choice of hedgehog, supporter fundraisers with progress, countdown and a supporter wall, a small charity shop, advice and Gift Aid pages |
Each has a hand-written catalogue and copy, generated illustrations (no stock photography, so no licences to track), collections and a menu, a homepage layout, delivery options, a free-delivery promotion, and Site Text set in the way a merchant would set it.
Running them¶
Prerequisite: the dev stack is built (./dev-scripts/devEnv.sh). If the database has no themes,
shared pages (basket, checkout, account…) or pipelines, the seeder installs them first, so a fresh
database needs no /system step. (First start now does the same.)
Then open https://<siteId>.bdgr.localhost (see Local URLs in CLAUDE.md). The seeder is idempotent: it replaces each demo's catalogue content and leaves other
sites, users and orders alone. It runs against whatever database the dev stack points at, so do not
aim it at anything you care about.
Checkout is exercised up to payment. Each demo turns on Test Payment Mode (which shows a simulated
payment button when badger.test-payment.enabled=true); no Stripe keys are involved.
How they are built¶
The design and the reasons are in docs/implementation-plan/demo-sites.md; in short:
- Each demo is a folder under
commerce-core/src/main/resources/demo-sites/<siteId>/: a Site Data Transfer bundle (bundle/: catalogue, content, delivery, promotions, variant groups, Site Text, stock, the active taxonomy),site.json(name, theme, logo) andimages/*.svg. The charity also hasfundraisers.jsonanddonations.json, because supporter fundraisers and donations are user-generated and so are not part of an export. DemoSiteSeederinstalls any missing platform defaults, creates the site throughSiteManagementService, imports the bundle withSiteTransferService, loads the charity's fundraisers and donations, and requests a search reindex. It runs as a one-shot under theseed-demoSpring profile.- Images are SVG served by
DemoImageControllerunder/settBuilder/demo/<siteId>/images/. The controller accepts the CDN'sfit-in/WxH/path segment and ignores it, so themes need no change. - The folder is generated from
dev-scripts/demo-sites/sites/<siteId>.mjs(compact spec plus illustration functions). Edit those, run the generator (see its README), commit both.
Adding your own demo¶
Copy the closest sites/*.mjs, change the merchant, run the generator, seed it. Because the bundle
is in the export format, and the export now carries Site Text, stock, variant groups, promotions and
the active taxonomy, you can tweak a seeded site in the admin UI, export it from System > Tenants >
Data Transfer, and drop the export's files into bundle/. Only the theme and name (site.json)
are not in the export.