I want a storefront for my business that works like Car Parts Universe (https://car-parts-universe.superfast.shop), a demo store built on Crystallize: Start from the car on the lift: a registration number narrows the whole store to the parts that fit, with OE numbers, stock at the workshop’s branch and delivery in the next round.
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: vehicle fitment, typo-tolerant search, stock per location, invoice and credit limits, quotes, vector personalisation, customer price lists. It is B2B, in English, Norwegian, Swedish, 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:
- Which countries do I sell in, and is there a registration-plate lookup for each? (Norway: Statens vegvesen's free Enkeltoppslag API; Netherlands: RDW open data; UK: DVLA Vehicle Enquiry Service. Sweden has no free equivalent. Where there is none, a make → model → engine picker does the job.)
- Where does my fitment data come from: a TecDoc/TecAlliance licence (the industry standard, with KTypes), my brands' own catalogues, or my ERP? At what level: vehicle type, engine code?
- Which part categories and brands do I carry, and roughly how many SKUs? Which vehicles matter most to my customers?
- Do I sell to workshops only (prices excluding VAT), or to consumers too?
- How are trade prices set: a percentage per customer group, contract prices for chains, volume breaks on cartons?
- My branches and stock locations, and my delivery promises (order cut-offs and delivery rounds per branch).
- Checkout: invoice with credit limits, quotes, returns, deposits (batteries, cores)?
- My product feed: does it have EAN, OE numbers, cross-references to other brands, and typed specs?
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.
Everything the storefront shows must be marked discoverable. Translate the text components if I sell in more than one language.
- part (product), one variant per pack size:
taglinesingle line,summaryrich text,storyparagraphs,highlights(repeatable chunk: title, text, image).branditem relation → brand (exactly one),article-numbersingle line.fitment(repeatable chunk:vehicle= vehicle id,positionselection such as front/rear/left/right,note).oe-numbers(repeatable chunk: maker, number),cross-references(repeatable chunk: brand, number).specs: a component choice holding exactly one spec piece per product family (filter, brake disc, brake pads, wiper, battery, bulb, lubricant…). Every spec is typed: numeric with a unit, boolean or selection. No properties tables, so every spec can be a filter.physicalpiece (weight, package dimensions, origin),safetypiece (GHS hazard data) for chemicals.kit-contents(repeatable chunk: quantity, name, article number, relation),documents(repeatable chunk: type SDS/TDS/datasheet/fitting instructions, language, title, url).depositrelation → service,pairs-withrelation → part (max 8),replacesrelation → part.- Ranking signals as numerics:
margin,sold-30d,campaign-boost. Plus anseopiece. - Variant components:
ean,volume,net-weight,pieces. SKU: brand prefix + normalised article number.
- service (product): battery deposits and similar charges.
- vehicle (document):
make,model,generation,engine,engine-codes(comma list, used by plate matching),fuelselection,power(kW),displacement(ccm),year-from,year-to,body,topic-path,service-datachunk (oil capacity, oil approvals, viscosity, service and timing intervals),image,notes. - brand and technology (documents); branch (document: market, stock location identifier, address, opening hours,
delivery-roundsrepeatable chunk of cut-off and delivery time, contact). - category (folder); landing-page (document with a
blockscomponent multiple choice: hero with a plate-search switch, product grid, vehicle picker…); campaign and guide documents. - Topic maps:
/vehicle/<make>/<model>/<generation>/<vehicle-id>: the leaf is one vehicle, with engine code, kW, ccm, fuel and years in its topic meta./category/<group>/<type>,/brand/<brand>,/axle/front|rear,/price-tier/value|mid-range|premium.
- Catalogue: one folder per category group (filters, brakes, ignition, electrics, suspension, oils and fluids…), plus services, brands, vehicles, branches, pages, campaigns and guides.
- Pricing: net prices, one price variant per currency, with volume tiers on carton items. VAT types per country.
- Customers: companies are customers, and their people have the company as parent. A
trademarket (all workshops) carries a percentage price list, if trade prices aren't confidential. Contract terms are percentage price lists aimed at the chain's organization (targetAudience: { type: SOME, customerIdentifiers }); the people under it inherit them. The most specific target wins: customer, then group, then market. - Stock: a central
defaultlocation plus one per branch. - Order pipelines: Orders, Quotes, Returns.
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 has about 430 parts from 12 brands, researched from manufacturer sites only, and 30 vehicles checked against the brands' fitment data.
- Build order: tenant settings → shapes and pieces → topics → images → catalogue → translations → pages → Discovery index → customers, price lists and sample orders.
- From me: a product feed (typed specs, EAN, OE numbers, cross-references), a vehicle list (engine codes, kW, ccm, years), part-to-vehicle fitment, images, net prices per currency, stock per location, and customers with their discount levels.
- Fitment is the hard part. Without a TecDoc licence, start with my top vehicles and the brands' own application lists.
Step 5: the storefront
- Next.js (App Router) on Vercel, with plain
fetchGraphQL clients (no SDK needed). - Discovery API for every public read: browse parts with filters, facets, sorting and search; list and trade prices; stock per location; topic facets. Discovery is public, so anyone can read any price it exposes: per-company contract prices come from the Catalogue API on the server (
priceVariant(identifier) { priceFor(count, customerIdentifiers: [...]) }), cached per organization. - Rank listings with Discovery
rankBy(afieldBoostonsold_30dandcampaign_boost, aninStockBooston the workshop's branch stock, and the requiredtieBreaker); introspectTenantRankByFieldfirst. A discoverablemarginis publicly readable: secure the Discovery endpoint, or leave margin out of Discovery. - Shop API for carts and orders:
- Get a JWT from
/auth/tokenwith the access token (scopescart,cart:admin,order), on the server only. hydratethe cart with the price context (currency, price variant, taxes not included, tax rate, the customer's markets) and the company as customer, so price lists apply.- Checkout:
hydrate(customer, markets, meta) →place→/ordercreateFromCart(id, input: { type: standard or quote, paymentStatus, payments, pipelines: [{ identifier, stage }] }). The cart becomesorderedand the order id is the cart id; don't callfulfill. Order history from/orderorders(customerIdentifier), with the identifier taken from the session, never from the browser.
- Get a JWT from
- Core API only in the setup scripts (shapes, topics, items, customers, price lists).
- Env:
CRYSTALLIZE_TENANT_IDENTIFIER,CRYSTALLIZE_ACCESS_TOKEN_ID,CRYSTALLIZE_ACCESS_TOKEN_SECRET, the plate API key,NEXT_PUBLIC_SITE_URL. - Fitment: each part carries the vehicle topics it fits. Parts for a car are a Discovery filter on that vehicle's topic. The chosen vehicle lives in a cookie and narrows every listing; the
fitmentchunk shows position and notes. - Plate lookup: a server action calls the national registry, maps make, model, engine code, power, fuel, displacement and first registration, then matches against the vehicle documents. Make and fuel must agree. Score the rest: engine code 4, model 3, kW (±4) 2, year (±1) 1, ccm (±30) 1. Accept a match on engine code plus one more signal, or on model + kW + year. With no match, fall back to the vehicle picker.
- Workshops pick their branch; listings show stock there and the next delivery round.
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
- A numeric component with a unit list is required in practice: items without a value fail validation. For optional values, drop the unit list and put the unit in the component name.
- Discovery uses the shape identifier as the hit type (
part), but its inputs arePartFilter,PartFacetandPartSort. Components that aren't discoverable are missing from Discovery. - Chunks holding translated text must be multilingual themselves.
- Updating an item with
componentsreplaces the whole set; useupdateComponentfor partial or translated writes. - Pass
pathIdentifieron every topic update, or the path is regenerated from the translated name. Translate parents before children. - A pipeline with
placeNewOrders: truepulls in every new order. - Create and change orders through the Shop API (
createFromCart,setMeta,addToStage), neverupdateOrderin Core, which adds a duplicate to the Shop list. Orders reach Core about ten seconds later; when reading a list, group bycoreIdand keep the newest. - Re-hydrate the cart when the customer, language or price lists change.
- After changing the model, re-index Discovery and wait before querying.
- Wait for every
copyRemoteAssettask, then check that each image actually resolves; upload the failures yourself (generatePresignedUploadRequest, thenregisterImage). - 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.