Liquid Core Contract
Liquid is a presentation layer. Shoppex TypeScript producers build the data. The platform commerce runtime owns browser behavior.Division Of Responsibility
| Layer | Owns |
|---|---|
| Liquid templates | HTML, CSS hooks, Builder markers, light display conditions |
| Shoppex Liquid renderer | Liquid engine config, filters, render context, block dispatch, package validation |
| Shoppex data producers | products, stock, pricing, listings, store stats, reviews, settings enrichment |
| Platform commerce runtime | cart, product-form behavior, coupons, checkout handoff, Alpine bindings |
| Shoppex edge | domain routing, cache, asset serving, and page delivery |
Required Engine Behavior
Shoppex Liquid runs strict:- strict variables
- strict filters
- own-property-only object access
- no dynamic partials
- escaped output by default
- separate render limits for trusted and untrusted packages
product.title is missing, the render should fail during validation or preview. Do not hide it with a generic fallback like “Product”.
Section Root Contract
Every section root must include:Context Contract
Templates read from a producer-builtStorefrontRenderContext.
Good:
Safe Output
Liquid escapes output by default. Use| raw only for platform-owned HTML:
blocksHtmlthemeHeadHtmlbootstrapScriptnavigationHtmlfooterHtmlstorefrontCommerceScriptHtml
raw for merchant text, product descriptions, customer data, or URLs.
Commerce Contract
Use platform hooks and Alpine factories:No Hidden Fallbacks
A real theme must never fall back to fixture templates or inferred data. Simple example: if a merchant package referencessections/foo.liquid but theme-package.json does not declare it, publish should fail. Do not substitute a different template automatically.
Next Steps
Package Format
Required manifest and package files.
Cart & Checkout
Product forms, cart drawer, coupons, and checkout handoff.