Skip to content

Demo Sites

Ten fictional organisations ship with the platform as twelve sites (Sauce Panic has a US store as well as its UK one, and La Camiseta an English site beside its Spanish one), spread across the storefront themes, 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
saucepanic-us Sauce Panic US: the same brand's American store Pop Selling in a second currency: US dollars (siteCurrencyCode usd) on an en_US site, so prices read $9.99; US English copy, sizes in fluid ounces, USPS and UPS shipping, free shipping over $50, and a link to and from the UK site. One site per currency is how a brand sells in more than one today (see Money and currency)
lacamiseta / lacamiseta-en La Camiseta: city souvenirs (T-shirts, mugs, tote bags, caps, magnets, postcards, prints) from a print shop in Seville Nova A Spanish shop in euros (es_ES, eur, ES, prices read 19,95 €, IVA included) with the storefront's own text in Spanish (messages_es), and the same shop in English (en_GB, still in euros) as a second site with the same SKUs and page addresses; the header's flag menu (Language Sites) switches between them on the same page. Eight cities, each with its own drawn motif (the Sagrada Família, Seville's oranges, a paella, a pomegranate for Granada...), T-shirts in size and colour, delivery within Spain and to the EU, and the flag's red and yellow as custom CSS
halden Halden Trade Supplies: fixings, PPE, tools, sealants Depot 200+ products classified by a trade taxonomy; a merchandising tree of /c/** category pages under an All products page (/c, the home page's "Browse the catalogue" link) with faceted navigation (gauge, length, head, finish, toe cap, size, voltage, brand…), including attribute-only pages such as Stainless Steel Fixings and the 18V Cordless Range; brand landing pages across the tree (/c/tools/brand/halden-pro, see Catalogue SEO) and colour pages for hi-vis (/c/workwear-and-ppe/hi-vis/colour/orange, a node's own rules with page copy); grid and SKU-list views, quick-buy steppers, stock dots, variants, free next-day delivery over £150. Enterprise store delivery: the Leeds trade counter's vans take booked windows (Monday to Friday, three a day) to any LS postcode as Halden van from Leeds, with store capacity on; the home page and /p/van-delivery explain it and how to try it (an LS1 4DY address, items Leeds stocks, the 4242 test card). Categories come from the tree (category-navigation-source=MERCH_TREE): the site has no collection pages besides home, and its old category collections' URLs redirect to the categories that replaced them
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
magpiesnest The Magpie’s Nest: antique and vintage fine jewellery, every piece a one-off Atelier A jeweller's catalogue on the editorial layout: 42 one-of-a-kind pieces named the way fine jewellers name them ("Solitaire Ring in Platinum with an Old European Cut Diamond") with the era above the name; faceted /c/** category pages by type, era, metal, gemstone, cut, style and ring size; era pages and engagement and wedding-ring pages; "One of a kind" and "Sold" in place of stock counts; a provenance table and a service panel on every piece; gifts by price and occasion; a ring size guide, book-a-viewing form and journal
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 Ridge, recoloured green and rust by its custom CSS Donations with Gift Aid and quick-pick amounts, adoption with a choice of hedgehog, supporter fundraisers with progress, countdown and a messages-of-support wall, an appeal band and footer link columns, a small charity shop, advice and Gift Aid pages
ember Ember & Oak: a wood-fired pizza and curry takeaway Bistro (Nova until Bistro is installed) Restaurant ordering: 28 menu items in sections with dietary flags and allergens, shared menu choices with prices (one sold out), a kitchen with ordering hours, collection and local delivery to a postcode area with a minimum order, and an allergens page built from the menu, plus a dining room at Headingley (14 tables, lunch and dinner services) with made-up sample table bookings seeded for today and tomorrow, and the Book a table block on its Find us page
clatter Clatter: a UK smash-burger chain with eleven restaurants in eight cities Bistro (Nova until Bistro is installed) Restaurant ordering at scale: ten locations (London, Manchester, Leeds, Birmingham, Bristol, Glasgow, Newcastle), each with its own ordering hours, prep times and last orders, collection, and a local delivery zone (all but Camden deliver); a dining room per restaurant with its own tables, combinations and lunch and dinner services, table service stations and sample table bookings; 30 menu items (five smash burgers with single and double variants, chicken, hot dogs, sides, shakes, soft drinks, boxes) with shared menu choices (a meal's shake is picked by flavour), allergens and an allergens and nutrition page; five own-brand beers (pint, half and can) marked 18+; e-gift cards; and a brand site (the Bistro brand layout: a marketing header, with ordering as a separate section) with a story, beers page, a page for every restaurant with its Book a table block, press, careers, FAQ and a news blog. Its photography is hosted in the media storage and referenced by URL, not shipped in the bundle
clearview Clearview Opticians: an independent optician in Leeds Tend (Nova until Tend is installed) Appointments and a shop on one site. A team of five (three optometrists, a contact lens optician and a dispensing optician, with their own hours, lunch and leave) and ten appointment types (NHS, private and children's eye tests, contact lens fitting and aftercare, OCT scan, dry eye assessment, laser eye surgery consultation, glasses fitting, repairs), each also a catalogue product whose page offers Book instead of Add to basket. "Any available" runs by fill-first for the NHS test and round robin for the private one. Everything is free or paid in store except two paid types, paid online in the basket (a normal checkout): the dry eye assessment (£45, refunded in full if cancelled more than 24 hours ahead and half after that) and the laser eye surgery consultation (£75, refunded in full more than 24 hours ahead and not at all after that), so the paid booking card, the refund quote and the order refund can all be seen. Made-up sample appointments (online, phone and walk-in) are seeded in the diary for the coming week. The shop has 45 products: frames with colour and size variants, kids' glasses under glasses, sunglasses, contact lenses, eye care, accessories and gift cards, with sample reviews, free delivery over £40 and collection from the practice. Pages cover prices, NHS eye tests, the clinics, the team and the 12-month frame guarantee, plus a journal of six posts

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.)

./dev-scripts/seedDemoSites.sh                    # all of them
./dev-scripts/seedDemoSites.sh saucepanic halden  # some

Then open https://<siteId>.bdgr.localhost. 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.

Every demo signs shoppers in through central auth (Badger Auth): the seeder registers the site's OAuth2 client once and turns central-auth-enabled on, or leaves it off with a warning if the client can't be registered. A site.json with "centralAuth": false opts out.

The demos share one Stripe Connect test account per environment, named by domain suffix in demo-sites/stripe-connect-accounts.json (an account id only; on bdgr-demo, the account connected on Clatter). The seeder gives it to a demo with no Stripe, or with the platform's test keys an earlier seed gave it, so a fresh seed needn't connect Stripe again; a demo connected to another account keeps it. Environments the file doesn't name get the platform's test keys. Everything the demos take, and their Terminal locations, shows in that one Stripe account.

The restaurant demos (ember, clatter) seed a manager who signs in to the POS app for table service, the kitchen and the diary, and who has the till too. Their restaurants sell in person, but the seed never creates Stripe objects, so the till starts as not set up (tillNotSetUp); everything else in the app works, with cash and other non-card tenders. To try card payments on a deployed demo, by hand, once:

  1. Connect a Stripe account in test mode under Payments, unless stripe-connect-accounts.json names one for this environment (it does for bdgr-demo).
  2. For each restaurant to use, open Settings › Locations, open the restaurant and press Create Stripe Terminal location (or paste an existing tml_... id).
  3. Register a reader against that Stripe location in the Stripe Dashboard (a simulated reader is enough for testing).

A re-seed keeps these links.

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, merchandising trees), site.json (name, theme, logo) and images/*.svg. The charity also has fundraisers.json and donations.json, because supporter fundraisers and donations are user-generated and so are not part of an export.
  • DemoSiteSeeder installs any missing platform defaults, creates the site through SiteManagementService, imports the bundle with SiteTransferService, loads the charity's fundraisers and donations, and requests a search reindex. It runs as a one-shot under the seed-demo Spring profile.
  • Images are SVG served by DemoImageController under /settBuilder/demo/<siteId>/images/. The controller accepts the CDN's fit-in/WxH/ path segment and ignores it, so themes need no change. The site's image path is set to //<siteId>.<domain>/settBuilder/demo/<siteId>/images, because a tenant's image path must name a host. The controller serves PNG and JPEG too, and a spec can give a product photos in place of drawings (see the generator's README), but the shipped demos are all drawn: real photography is uploaded to a deployed demo's media rather than committed.
  • 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.

Refreshing a deployed demo

The bundles and images ship inside the web image, so a content change needs a deploy first. Then run the web image once with the seed-demo profile against that environment's database (in k3s, a one-off Job using the deployment's environment plus seed.demo.sites=<ids> and seed.demo.domain-suffix=bdgr-demo.co.uk; the default suffix is bdgr.localhost). Re-seeding replaces each demo's catalogue, pages, menus, Site Text and stock, and leaves users and orders alone. Finally clear the Redis cache, or pages and Site Text cached before the re-seed are served until they expire.

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.