I want a storefront for my business that works like Wine and Dine Universe (https://wine-and-dine-universe.superfast.shop), a demo store built on Crystallize: One site for a group of five restaurants that sells nothing online: guests book a table on the floor plan or a table at an event, and every dish suggests a drink from a list synced from its supplier, Spirits Universe.
The content model and the wiring below are proven in that store: keep them for the features I want, and rename things to fit my trade. If a feature doesn't fit my business, leave its parts out rather than forcing it. Everything I see is mine to decide: brand, colours, typography, layout, copy and pages. Don't copy the demo's look; build my brand.
What the demo does: native booking, time-slot bookings, campaigns. It is B2C, in English, Swedish, Norwegian, Dutch; my markets and languages may differ.
How to work with me
- You need to run commands, edit files and use MCP tools. If you can't (for example in a plain chat), tell me, and suggest I paste this prompt into Claude Code, Cursor or another coding agent instead.
- Ask your questions a few at a time (three to five), in the order of the steps below, and suggest a sensible default for each so I can just say yes. Ask each thing once, even where two lists overlap, and ask the ones that change the build first. Don't start a step before the one before it is done.
- The technical detail below is for you. Talk to me in plain words, and explain a choice only when I need to make it.
- Keep the folder empty until step 5, apart from
.env.local. - Never ask me to paste an access token secret into the chat, and tell me not to paste a filled-in command or its output either. Tell me which command to run or which file to put it in, and I'll do it.
- Before you create or change anything in Crystallize, show me the plan (shapes, pieces, topics, price variants, markets) and wait for my yes. Before an import, show me a sample of five items.
- Use the Crystallize skills (the
skillsMCP tool, or the use-crystallize plugin) for how-to:content-model,information-architecture,taxonomy,data-creation,mass-operations,pricing,query,mutation,js-api-client,responsive-images,payments, and when this store needs themsubscriptions,bookable-resources,vector-rankingandpermissions. Where this prompt and a skill disagree, the skill wins. Check the live schemas with the MCP instead of guessing field names. - When something I asked for isn't possible in Crystallize the way I pictured it, say so and offer the closest thing that is.
- The storefront never reads from the Core API on customer-facing pages. Products, public prices, stock and content come from the Discovery API and the Catalogue API; confidential prices (negotiated B2B price lists) from the Catalogue API on the server.
- Use the Shop API for everything about customers: carts, checkout, customers, orders (including orders created directly, such as renewals), order meta, pipeline stages, payments and subscription contracts. Take the customer identifier from the server session, never from the browser. The Core API is for setup scripts, back-office tools, scheduled jobs and what the Shop API can't do, always on the server and never once per page view.
Step 1: Crystallize tenant, tokens and MCP
Ask me:
- Do I have a Crystallize account and a tenant for this store? If not, I sign up for free at https://app.crystallize.com/signup and create an empty tenant. Ask for its tenant identifier.
- Do I have access tokens? If not, tell me: in the Crystallize App, go to Settings → Access Tokens → Generate a new token, name it, and keep the ID and the secret (the secret is shown once). A token acts with its user's role, so while we build, that user needs to be Tenant Admin (or have a role that can write shapes, pieces, topics, items and prices and run mass operations). Once the store is built, switch the MCP to a token from a read-only user.
- Is the Crystallize MCP connected, with write access? Check that you have its write tools (
run-mass-operation,mutate-core), not only the read tools (tenant-overview,fetch-content-model): with only the read tools, it was added without?exposeWrite=true. If it's missing, have me run this in my terminal with my own token, then restart you:
If the MCP can't be connected in my tool, say so and fall back to scripts that call the Crystallize APIs with the tokens fromnpx add-mcp "https://mcp.crystallize.com/mcp?exposeWrite=true" \ --header "X-Crystallize-Access-Token-Id: <token id>" \ --header "X-Crystallize-Access-Token-Secret: <token secret>".env.local. In Claude Code, also suggest the Crystallize skills:/plugin marketplace add crystallizeapi/ai, then/plugin install use-crystallize@crystallize-ai. The plugin brings its own read-only Crystallize MCP entry with placeholder credentials: keep using the one added above (and add&exposeSkills=falseto its URL once the plugin's skills are installed). - Confirm the connection with
tenant-overview, and tell me what's already in the tenant. If it isn't empty, ask whether to build next to what's there or in a fresh tenant.
The storefront needs the tenant identifier and its own credentials: an access token pair for the Shop API (server only), and a static auth token if Discovery and the Catalogue API are secured. Don't reuse the admin build token in production. Put them in .env.local (have me fill in the secrets) and make sure .env* is in .gitignore.
Step 2: my business and my brand
Ask me:
- What I sell, who buys it, and what makes us different. My brand name and a one-line pitch.
- My markets, currencies and languages, and my VAT/tax setup.
- Where my product data lives today: a spreadsheet or CSV, an export from Shopify, WooCommerce or another platform, a PIM or ERP, my current website, or nothing yet. Where my product images are.
- My brand: logo (SVG if I have it), colours, typefaces, tone of voice, and two or three sites whose look I like. If I have no brand guide, propose a direction from my answers and show it before building pages.
- Where it should run: my own domain, and hosting (suggest Vercel for Next.js).
Then ask what is particular to this kind of store:
- How many restaurants, in which cities, with which cuisines? Which are open now, and which should show as opening soon?
- Per restaurant: the floor plan (a drawing or photo I can share is enough to trace), the tables with seats, minimum party and zone, seating times, how long a seating lasts, the turnaround between guests, and closed days.
- Booking rules: cancellation window, how long a table is held while booking, the largest party bookable online, and whether a booking takes a deposit.
- Menus: dishes with allergens, diets, courses and prices, and the dates each menu is valid.
- Drinks: my own list, or synced from my supplier? If my supplier runs Crystallize, which tenant, and can I get a read-only token? Who sets the menu prices?
- Events: tastings, dinners, masterclasses; the price per guest, which tables or rooms, and the hosts.
- The look of each restaurant (colours, fonts, logo) and of the group.
- My photos, or should they be sourced or generated (no people, text or logos)?
- VAT for food and for drinks in my country, and my currency.
- Would my managers like estimated spend per booking, for statistics?
Step 3: the content model
Create this in my tenant with the MCP, renamed to fit my trade, after I have approved the plan. Keep the structure: it is what the storefront's features depend on.
Build in dependency order, since mass operations run in sequence with no rollback: pieces and shapes (empty first, then their components), topic maps (at most 30 topics per topic/create), price variants, markets and VAT types, the folder tree (two to four levels, five to twelve per level), and only then items. Use lowercase-hyphen identifiers. Decide now which fields are translated and which are discoverable. Restrict every item relation with acceptedShapeIdentifiers. Never add price or stock components to a shape: variants have them built in.
- Pieces:
seo;taste: body, bitterness, sweetness, acidity, roast (1–12, the same scale as the supplier), note.source(owned by the supplier sync): supplier item id, SKU, order id, path, synced at.kitfor campaigns: headline, intro, social posts, menu card lines, pairings, files and images, usage notes.
- group (document, one item): hero.
- restaurant (folder): tagline, summary, story, hero, gallery,
status(open, opening soon, closed), opens on,lookchunk (background, ink, accent, accent ink, heading and body fonts, logo),addresschunk (street, postcode, city, country, location, directions),opening-hours(repeatable chunk: days, opens, closes, note),contactchunk, seats, price level (1–4), taste piece, the restaurant's customer identifier at the supplier, seo. - menu (document): kind (à la carte, lunch, set menu, drinks, campaign), intro, valid from and to,
sections(repeatable chunk, translated: title, note, dishes, drinks). - dish (product): menu line, summary, image, allergens (EU 14), seasonal, taste piece,
pairs-with→ menu drink (max 4), pairing note. Its variant holds the SKU, menu price and VAT. - menu-drink (product): source piece, tagline, summary, image, kind, brand, producer, origin, ABV, taste piece,
new-for→ restaurant, andserved(repeatable chunk: restaurant, supplier SKU, serving size, price, by the glass). The sync writes everything butserved, which the restaurant owns. - table-booking (product, one per restaurant, price 0): summary,
seatingchunk (seating length, times, min and max party, days ahead),floor-planchunk (background image, width, height), policy text. Bookable, with each table as a unit. - event (product): kind, starts, ends, seats, hosts, featured drinks, dishes, campaign. Bookable, with the restaurant's tables as its units.
- campaign (document): status (offered, taken, live, ended, declined), dates, kit, dishes, events.
- Catalogue: one folder per restaurant holding its menus, dishes, table booking, events and campaigns, with a short alias path (e.g.
/brasseri);/drinksshared by all restaurants. - Topic maps: cuisine, dish, occasion, style, course, diet, city, restaurant, image type. Keep the supplier's keys where they are shared.
- Vector vocabularies:
taste(the supplier's centred high/low keys) andguest(cuisine, dish, occasion, restaurant). - Pricing: one price variant holding the menu price including VAT; VAT types for food and tables, and for drinks and events. No markets, price lists, stock or deposits.
- Order pipeline: Bookings (requested, confirmed, seated, cancelled, no-show), created in the PIM API; map pipeline and stage ids to names at setup.
Step 4: my data
Import my products and content with mass operations, mapping my data onto the model: validate each file with build-mass-operation, run it with run-mass-operation and follow it with get-mass-operation-status. Read the operation logs, not just the task status: a task can finish as complete with failed operations, and there is no rollback. Give every upsert a resourceIdentifier so a re-run updates instead of duplicating, and chunk large imports. Start with a small batch, check it in the Crystallize App with me, then run the rest.
Publish every imported item in each language: the storefront only sees published versions (in a mass operation, item/publish needs real itemIds). Import images from URLs with copyRemoteAsset, or upload them (presigned upload, then registerImage). Renditions are generated in a queue: after a large import, republish once they exist, and have the storefront fall back to the original image URL while variants is empty. Before building pages, query Discovery once; if the tenant isn't ignited yet, run igniteDiscoApi (with stacks: opensearch if we use vector ranking), wait for the task to complete, and allow a few minutes. If I have no data yet, create a small, clearly labelled placeholder set (ten or so products) so we can build the pages, and remind me to replace it.
- The demo's restaurants, dishes, menus and guests are fictional; its drinks, campaign kits and events come from the supplier through the sync. It has 1,066 back-dated visits for statistics.
- The floor plan's table positions were traced from a design SVG; the room outline is drawn in the storefront.
- Photos of rooms and dishes come from Unsplash with credit.
- From me: restaurants with addresses and hours, floor plans and tables, seating rules, menus with dishes, allergens and prices, drinks and their menu prices, events, and photos.
Step 5: the storefront
- Next.js (App Router) on Vercel, plain
fetchGraphQL clients. No sign-in: each browser gets a guest customer identifier in a signed, httpOnly cookie, and "My bookings" reads that customer's orders on the server from Shop/order. - Discovery API: restaurants (filter by city, cuisine and occasion; nearest by location), menus, dishes, drinks, events, campaigns, and each bookable's pool units with their meta.
- Booking policies (Core API, setup only; all five durations required, in seconds): tables
advanceWindow: 950400(11 days),bufferBefore: 0,bufferAfter: 900,cancellationWindow: 7200,pendingHoldDuration: 600; eventsadvanceWindow: 10368000(120 days),cancellationWindow: 86400. Readhumanizedback to check the units. The storefront enforces opening hours and seating times; the policy doesn't. - Tables:
setBookablewith one unit per table. Unit meta (strings): seats, min seats, zone, label, number, x, y, w, h, shape (rectangle, round, stool), chairs. A party fits a table when min seats ≤ guests ≤ seats.setBookablewrites the draft:publishItemafter it, or the Shop API answers not bookable. After a policy edit, runreapplyBookablePolicyon each product and publish. - The floor plan: draw the room as SVG and place the tables from their unit meta; free tables are clickable.
- Booking (Shop API):
hydratewith the guest customer first.availability(…, granularitySec: 1800, language), in a language the item exists in: a table is free only if every half hour of the seating is.bookSkuItemwith quantity 1 and the table's unit, also written into the line meta. Check__typename; on a conflict, try the next free table. One booking write at a time per cart.- Cart meta: party size, name, phone, restaurant.
place→confirmCartBooking→/ordercreateFromCartwithpipelines: [{ identifier: "bookings", stage: "requested" }]→ poll the cart until it has its order id →confirmCartBookingagain. Move stages with ShopaddToStage, never Core.
- Events use their own pool of copies of the restaurant's table units, so check for overlaps with table bookings to avoid double booking. Extra guests are an external line.
- Estimated spend: each table booking gets an external line of guests × an estimated spend per guest, so the orders in Crystallize give managers sales statistics.
- Pairings: each dish suggests drinks; the reason is shared taste (both high on a dimension, or both light).
- Sync from a supplier on Crystallize (optional): an endpoint takes the supplier's webhooks (item published, order created), checks a shared secret, and upserts menu drinks (reading the supplier's Discovery in every language and copying images with
copyRemoteAsset, waiting for each task and checking the keys), marks drinks new for a restaurant, and creates offered campaigns and events. It writes only the fields it owns, only when they changed, withupdateComponent. A nightly job reconciles everything. - Env:
CRYSTALLIZE_TENANT_IDENTIFIER,CRYSTALLIZE_ACCESS_TOKEN_ID,CRYSTALLIZE_ACCESS_TOKEN_SECRET; with a supplier sync also the supplier's tenant identifier and read-only token, a webhook secret and a cron secret.
Build my design, not a demo's: my typefaces, colours and tone, with pages that suit my products. Show me the home page, a category and a product page early, and adjust the design with me before building the rest.
Every page is built for search engines, answer engines and AI agents from the start, not added at the end:
- SEO: server-rendered HTML, one
<h1>, a unique title and description, canonical URLs,hreflangper language, a sitemap androbots.txt, and clean, translated paths. - Structured data: JSON-LD on every page that has a subject:
OrganizationandWebSite(with aSearchAction) on the home page,ProductwithOffer(price, currency, availability) on product pages,BreadcrumbListon categories and products,ArticleorRecipeon content. Generate it from the same data as the page. - GEO, for answer engines and agents:
/llms.txt(an H1, a summary, links to every section),/llms-full.txt, and a Markdown twin of every page (its URL plus.md, orAccept: text/markdown), with prices, stock and facts written out in plain sentences. - Agents can act, not only read: register the store's actions (search, add to cart, check availability) with WebMCP (
navigator.modelContext.registerTool, or annotated forms), and keep the accessibility tree clean: semantic HTML, labelled controls, real buttons and links. - Fast and stable: responsive images from Crystallize, no layout shift (reserve space for images and late content), little client JavaScript. Aim for 100 in every Lighthouse category (Performance, Accessibility, Best Practices, SEO; heavy 3D or video pages may score lower on performance) and pass every Agentic Browsing check.
Step 6: run it, then ship it
Run it locally and walk me through each feature above with my own data. Fix what I find. Before you call it done, run Lighthouse on the home page, a category and a product page (npx lighthouse <url> --only-categories=performance,accessibility,best-practices,seo,agentic-browsing), validate the JSON-LD (https://validator.schema.org), open /llms.txt and a page's .md twin, and fix what falls short. Deploy only when I ask: set the same environment variables on the host, point my domain, and give me the live URL.
Watch out for
- An item's path follows its name, and no API sets paths: use aliases and external references.
- Discovery serves a selection as a key-to-label map; filter with one field per option (
status_openingSoon). - Price variants have no "includes VAT" flag: tell the cart with
context.price.pricesHaveTaxesIncludedInCrystallize: trueonhydrate. - Unit meta values are strings. Capacity → units is refused while a capacity pool is published:
clearBookable, publish, cancel or wait out open reservations, thensetBookablewith units and publish. - Put a customer on the cart before
bookSkuItem. A reservation on a placed cart can't be cancelled through the cart, but it can on the server through Shop/booking/admin(cancel(id, reason), scopesbookingandbooking:admin; it ignores the cancellation window, so enforce the two-hour rule yourself). A guest's cancellation cancels the reservation there (or the table stays blocked), then moves the order to Cancelled withaddToStageand records a note withsetMeta. - Read order items as
name quantity meta, notvariant { sku }. - Relations resolve only to items published in that language: publish restaurants, then dishes, then menus, per language.
- A sync must own only its fields: never update with a whole
componentsset. - Webhook payloads are thin: query what you need; a failing webhook query means no call; publishing in four languages is four calls;
createWebhookaccepts any concern or event string, so confirm each webhook arrives. - Don't invent facts about my business (prices, stock, certifications, delivery promises). Ask, or leave a clearly marked placeholder.
And for every Crystallize store, from the skills:
- Orders: create and change them through the Shop API
/order(createFromCart,create,setMetawithmerge: true,addToStage,setPayments). Editing an order in Core adds a duplicate to the Shop API's list. Read a customer's orders with the identifier from the session,limit: 100, grouped bycoreId(keep the newest). Seed order history through/ordercreate, not CoreregisterOrder. The order id is the cart id; don't callfulfillaftercreateFromCart. - Payments: create the order from the payment provider's verified webhook, never from the browser, once per cart.
- Cart meta goes in
hydrate(input: { meta });hydrateis the whole cart, so send every line each time. - Images: serve them straight from Crystallize (not through an image optimizer such as
next/imagein its default setup): a WebPsrcsetfrom the returnedvariantswith an accuratesizes, falling back to the original URL while renditions are missing. Replace an image by uploading a new one, not withregisterImageRevision. - Ranking (if the store ranks per shopper): check that
__type(name: "RankByInput")exists; passcontextas a variable, withuserTasteentries of{ vocabulary, weights, magnitude }(magnitude = the square root of the sum of squared weights);tieBreakeris required; don't combinesortingwith ranking, and page withskipandlimitinside the rerank window; introspectTenantRankByFieldfor field names; leavecontextout when there's no taste; useexplain: trueonly for tuning. - Bookings (if the store books): durations are in seconds; the role needs the
bookingPoliciespermission; put the customer on the cart beforebookSkuItem; everyhydratemust resend each booked line with its window and unit, or the booking is cancelled; remove a booking by re-hydrating without it.
Done when
- My tenant has the content model above with my products, prices and images in it.
- The storefront runs on my domain in my brand, and every feature I chose works with my data: we have clicked through each one together.
- Lighthouse scores close to 100 in every category and every Agentic Browsing check passes on the home, category and product pages.
- I know how to add a product, change a price and publish, in the Crystallize App.