Preview
What the preview runs
The preview is the SDK's own storefront server. It renders your template with the store's template engine, sanitizers and page head, loads the store's storefront engine (engine.js) and answers its calls from a JSON dataset: choose a store, browse, filter, search, add to cart, apply coupons, choose delivery, log in, register, check out, see orders and saved items. Payments are simulated (no provider is contacted).
Commands
node sdk dev [dir] # Studio (editor + preview)
node sdk preview [dir] # preview only; reloads the template on every save
--dataset <id> # sample data (see "node sdk datasets")
--port <n>
Live reload
Saving a file reloads the template in the preview's template engine (a few milliseconds). Stylesheet-only changes are swapped in without reloading the page; other changes reload it, keeping the current route.
Viewports
The Studio's size menu has desktop, laptop, tablet and phone presets, a custom width × height, rotation, and "Fit" (the pane width). Wider sizes are scaled down to fit.
CDN files and offline use
The store's pages load https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css, https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css, https://code.jquery.com/jquery-3.7.1.min.js, https://cdn.jsdelivr.net/npm/sweetalert2@11. When these hosts cannot be reached, the Studio and the tests use local copies: run node sdk cdn fetch once while online (or cdn import <folder|manifest.json>), then dev --offline forces them. The installed template is not affected.
Customer logins
Datasets include customers (see the Data tab or node sdk datasets show <id>) so you can preview the account pages.