Skip to content

Front-End Direction

Where the storefront and admin front end is heading, and why. It records the outcome of a review in November 2026 of how pages are generated, styled, scripted and delivered. Nothing on this page has shipped unless it says so; it is the direction new work should follow and the order to do the larger changes in.

The decision in brief

  • Stay server-rendered. Pages are rendered by Spring MVC and Thymeleaf as a multi-page site, with cross-document View Transitions between pages. The storefront is not becoming a single-page application.
  • Leave Bootstrap on the storefront. Nova has its own design system; the remaining Bootstrap and jQuery use is small enough to remove.
  • Do not move to Bootstrap 6. It is a migration, not an upgrade, and it leads to the same primitives Nova already uses.
  • Give partial page updates a server contract: the server returns the fragment a script asks for, and one shared helper swaps it in.
  • Add a small build for JavaScript and CSS: modules, minification, content hashes, linting and type checking.
  • Split the main stylesheet into layered component files, and load page-specific CSS only where it is used.

Where things stood in November 2026

Counts are from the repository at the time of the review. They are here to explain the decisions, not to be kept up to date.

Bootstrap and jQuery on the storefront

Every storefront page loads jQuery 3.7.1, the Bootstrap 5.3.2 JavaScript bundle and bootstrap.min.css (about 233 KB before compression) in the <head>, with no defer, from templates/nova/fragment/head.html. Very little uses them:

Measure Count
Nova's own class names in Nova templates (nova-, nb-, bdgr-) about 2,700
Bootstrap class names in Nova templates 223, in 46 of 238 files
data-bs-toggle attributes in all storefront templates 9 (4 dropdown, 4 tooltip, 1 offcanvas)
Calls to Bootstrap's JavaScript from storefront scripts 7, in 5 files
Storefront scripts that use jQuery 15 of 56

Nova's product, collection, search, basket and checkout layouts use nova-container and Nova's own grids, not the Bootstrap grid. The Bootstrap classes that remain are mostly form and button classes on the registration and password pages, the navigation dropdowns and the mobile menu. The older layered themes (Brock, Ridge, Spec, Diorama, Atelier) use more of it, and Ridge, Spec and Diorama read Bootstrap's --bs-* variables.

Partial page updates

No storefront controller returns a template fragment. Twelve scripts update part of a page by requesting a whole page, parsing the response with DOMParser and copying out the nodes they need: the mini basket, the basket page, the filter sheet, restaurant ordering, shoppable images, and the add-to-basket code in six theme scripts. The add-to-basket block is copied between themes with small differences. The server renders a full page each time to update one panel.

Checkout is different on purpose. It is a self-contained script that reads and writes /api/checkout/session as JSON and builds its own markup.

CSS

  • Nova's bdgr.css is one file of about 362 KB (about 42 KB minified and gzipped), loaded on every page. Roughly 40% of it styles things only some pages have: shoppable images, the account area, heroes, booking and donation widgets.
  • It uses no nesting, has about 250 !important declarations, and puts only four rules in cascade layers (see step 4).
  • Each layered theme adds its own file on top. The older ones are 86 to 120 KB and mostly re-declare rules. Tend, the newest, is 23 KB and works almost entirely by setting tokens.
  • The mechanism for loading a stylesheet only when an extension is on the page already exists and is used by restaurant ordering, table booking and the blog.

JavaScript

  • About 1 MB of first-party storefront JavaScript in 56 files, written as self-contained functions that share state through window. None of it uses ES modules.
  • Nothing bundles or minifies it. Lightning CSS minifies the stylesheets during the Maven build; that is the only build step.
  • There is no linting, no type checking and no reporting of errors that happen in the browser. Five script files have unit tests.
  • Nova templates hold 63 inline script blocks, about 2,700 lines.

Delivery

  • First-party assets are cache-busted with the release version as a query string, not a hash of the file's content, so every release makes every browser download every file again.
  • Storefront HTML is sent with no-store and a per-visitor cookie, so it is never cached at the edge. See Anonymous Visitors and Bots.
  • There is no Content Security Policy and there are no speculation rules.
  • Fonts are self-hosted, page chrome icons are inline SVG, images have a srcset ladder, and Stripe's script loads only on pages that take payment.

Admin

The admin is in better shape than the storefront. About 92% of its templates use the bx- components described in Admin UI Components, which need neither Bootstrap's JavaScript nor jQuery. Its costs are elsewhere: about twenty jQuery-era plugins load on every page whether or not the page uses them, and about 9,400 lines of page script sit inline in templates.

Why not a single-page application

  • The pages that matter for search and first impressions (product, collection, content) are documents. Rendering them on the server is the shortest path to a fast first view, and it is what the themes, the extension system and the render tests are built around.
  • The review found no public evidence that headless or single-page storefronts perform better. The 2025 Web Almanac's e-commerce chapter shows the hosted, server-rendered platforms with the best Core Web Vitals pass rates.
  • The interactions that need to feel instant are few: basket, filters, variant choice, checkout. Each can be a small island on a server-rendered page.
  • The REST API remains available to anyone who wants to build a separate client.

Why leave Bootstrap, and why not Bootstrap 6

Nova already has its own tokens, components and layout classes, and they outnumber Bootstrap's by about twelve to one in Nova's templates. Bootstrap is being loaded on every page for a handful of dropdowns, tooltips and form styles.

Bootstrap 6 (in alpha at the time of the review) renames its responsive classes, ships its JavaScript as ES modules only, and rebuilds its accordion and dialog on <details> and <dialog>. Moving to it would mean rewriting the same markup that leaving Bootstrap requires, to arrive at primitives Nova already uses directly.

The admin keeps Bootstrap 5.3 for now. The bx- layer does not depend on it, so it can be removed later without touching most templates.

The direction

1. Remove Bootstrap and jQuery from the storefront

In this order, because each step unblocks the next:

  1. Bootstrap's JavaScript. Replace the navigation dropdowns, the mobile menu, the tooltips and the basket popover with <details>, <dialog> and the popover attribute. Replace the jQuery collapse calls in the donation and charity preference scripts with the hidden attribute.
  2. jQuery. Port the 15 scripts that use it to plain DOM and fetch.
  3. Bootstrap's CSS. Swap the form and button classes on the account and sign-in pages for nova-input and nova-btn, then convert the older layered themes one at a time.

Until step 3 is finished, Bootstrap's stylesheet can be placed in a low cascade layer so that Nova's rules win without !important. That changes which rule wins too: Nova's and every theme's rules would beat Bootstrap's even where they are less specific, and so would a shop's own CSS. It needs the same screenshot comparison, and the same decision on shops' CSS, as layering Nova (step 4).

Status: steps 1 and 2 have shipped. The storefront scripts were ported to plain DOM and fetch, and the navigation, mobile menu, mini basket and preference panels to <details>, <dialog> and the hidden attribute. No theme head loads jQuery or the Bootstrap bundle any more, and the sign-in and demo pages, which loaded jQuery on their own, no longer do. NoStorefrontJQueryTest fails if a storefront template or script uses data-bs-*, $(...), jQuery or bootstrap.* again. The only exceptions are the extension editors that live under Nova's folders but are loaded only by the admin's Content blocks tab, which has its own jQuery and Bootstrap. (The storefront's old ?editMode block editor, which rendered those editors into the page, was removed; staff edit blocks on the storefront with the side panel editor, ?inlineEdit.) A shop whose own stored content still needs the scripts can turn on storefront-legacy-scripts, which loads both again on that site's pages (see Site Customization). The demo and seed content in the repository was checked and needs neither. Step 3 is next.

Stored shop content is a risk to check before step 3. Nothing in the admin or MCP guidance tells authors to use Bootstrap classes, but page content written as raw HTML could contain them.

2. A server contract for fragments

A script that needs part of a page asks for that part, and the server returns only that fragment.

  • Controllers return the named fragment (Spring's fragment rendering supports one or several per response) when the request says it is a fragment request, and the full page otherwise. The same URL keeps working without JavaScript.
  • One shared helper in Nova sends the request, swaps the result into the page inside a view transition, and restores focus. Themes call it; they do not carry their own copy.
  • Add-to-basket moves out of the theme scripts into that shared code.

Start with our own helper: the twelve existing copies already show what it needs to do. A library such as htmx does the same job against the same server contract, so adopting one later does not change the controllers.

Status: the contract and the helper have shipped, with the mini basket as the first user. Its quantity, remove and clear forms ask the basket endpoints for two fragments (the drawer's content and the header basket link) instead of reading them out of a whole basket page. The contract, the helper's API and the rules for adding a fragment are in Storefront Fragments. Add-to-basket has followed: one shared NovaUi.addToBasket (in nova/js/add-to-basket.js) replaces the copies in the theme scripts and the shoppable image block, and asks for the same two fragments.

The filter sheet's live product count is the next user: it asks the listing for a facet-total fragment, which the listing answers straight after its search, instead of fetching and parsing a whole listing page. The basket page and the restaurant menu move onto it next.

Checkout stays a JSON island. It should be split into modules (session, address, delivery, payment, view) once the build exists.

Status: done. The one-page checkout is an ES module entry, themes/nova/js/modules/checkout.js, with its parts in modules/checkout/: the session API, the page view, the address fields and their input handling, delivery and collection, split handover, payment and wallets, consent, the basket summary and what still blocks Pay. It was a move, not a rewrite: every function kept its code and order of side effects (one helper nothing called was removed). It still talks to the server only through /api/checkout/session as JSON, and is bundled into one file. See ES modules.

3. A small build

Kept deliberately small, and run inside the existing containerised Maven build:

  • esbuild for JavaScript: ES modules, minification, and file names that contain a hash of the content, with a manifest the templates read.
  • Lightning CSS, already in the build, extended from minifying to bundling component files.
  • Linting, and type checking of plain JavaScript through JSDoc comments. No move to TypeScript source.
  • A small error beacon so that script failures in shoppers' browsers are visible, tagged with the tenant and carrying no personal data.

Hashed file names also let assets be served as immutable and stop each release from invalidating files that did not change.

Status: the supply chain and the first stage of the build have shipped. npm ci installs exactly what the lock lists, with install scripts off, and the Node and npm archives the build downloads are checked against pinned checksums. The build minifies the storefront's scripts and stylesheets as they are (no bundling, no change of format) into content-hashed copies with source maps and a manifest. AssetUrls and the #assets template helper turn a path into its hashed copy, and the server sends hashed copies immutable, with a safe answer for a hashed name from another release during a rolling deploy. Every storefront template links its scripts and stylesheets through #assets.url, extension lists included, so a release only changes the URL of a file whose content changed; StorefrontAssetUrlsTest keeps it that way. The same scripts are linted with Biome and type checked with tsc from their JSDoc, script by script as each opts in; both are ratchets that fail the build on a new problem but not on those already recorded. The shared helpers (fragments.js, add-to-basket.js) are the first type-checked scripts. See Storefront Asset Build.

On the local dev stack an edit to a storefront script or stylesheet shows on refresh with no rebuild (a read-only mount of the sources, dev profile only; see Storefront Asset Build).

The error beacon has shipped too: every shop's pages report uncaught errors from the shop's own scripts to the shop's own host, scrubbed of personal data and counted per shop in badger.client.errors, with no cookies and nothing stored in the browser. The pages that build their own <head> (sign-in, registration, password, review, messaging, shop-closed and similar) carry it too, and a test fails when a new one leaves it out. See Browser Error Beacon.

Nova's bdgr.css is now written as one source file per page area or component (themes/nova/css/src/), listed in order by bdgr.src.css and bundled back into bdgr.css by Lightning CSS. The split changed no rule: the bundle, minified, is byte-identical to the single file it replaced. See Nova's stylesheet.

ES modules have started, as a pilot: the filter sheet (facet-sheet.js) is now an ES module entry with its parts in a modules/ folder. The build bundles module entries with esbuild into hashed files, putting code that entries share into hashed chunks, while a dev build serves the modules as written. Modules are always type checked, with no errors allowed, and they reach the classic scripts only through one bridge.js entry. See Storefront Asset Build.

The admin's own scripts and stylesheets (themes/admin/) have joined the build: they get minified, content-hashed copies in the same manifest, every admin, System and admin extension template links them through #assets.url (AdminAssetUrlsTest keeps it that way), and the server sends their copies immutable like the storefront's. Before, most admin files' URLs changed on every build. The admin's scripts are linted with the same ratchet, with the problems they already had recorded; they are not type checked. See the admin's own files.

The one-page checkout followed: its single script is now a module entry, checkout.js, with its parts (session, view, address, delivery, payment and the rest) in modules/checkout/, bundled into one file.

Next: port more scripts to modules. Cascade layers for the CSS (step 4) have started: see that step's status.

4. Split and layer the CSS

  • Break bdgr.css into one file per component or page area, declared in cascade layers (reset, tokens, base, components, theme, shop overrides) and written with native nesting.
  • Bundle what every page needs; load the rest through the existing per-extension stylesheet mechanism.
  • Move the older themes towards Tend's model: set tokens, re-declare as little as possible. A theme file much over 30 KB is a sign it is restyling by override.
  • Before deleting any rule that looks unused, measure with real coverage over the demo shops. Many class names are built at runtime or used in stored content, so a text search is not proof.

The ratchet tests that stop inline styles and raw colours growing stay as they are.

Status: the split has shipped, without nesting: the source files are bundled in their old order. The layer order is declared at the top of bdgr.css: bdgr.reset, bdgr.tokens, bdgr.base, bdgr.components, bdgr.theme, all inside one outer bdgr layer so that a shop's own layers keep their order. A shop's CSS has no layer: unlayered, it already beats every layer.

Only rules that a layer provably cannot change have moved: rules with no specificity, no !important and no tie with an earlier unlayered rule (so far the four JSON component background token rules), checked by nova-css-sources.test.js and by a screenshot comparison of every pattern in every theme. The pages that use those rules are pixel-identical; the few other screenshots that differ differ as much between two runs over the same pages, with no computed-style difference. Nothing else can move yet without changing which rule wins:

  • Bootstrap's stylesheet is unlayered and loads first. Its reboot would beat a layered global.css on body, the headings and links, and its components would beat layered Nova rules of the same or higher specificity.
  • A shop's CSS is unlayered and isn't in the repository. Layered Nova rules would start losing to its rules of lower specificity, and to any of its rules that set Nova's tokens from a layer of its own, as Tailwind's output does. Layered !important rules would start beating its !important rules.

So the next layering step comes after step 3 (Bootstrap's CSS) and a decision on shops' CSS. See Storefront Asset Build.

5. One model for interactive components

New interactive components are custom elements that wrap server-rendered markup: the HTML works without the script, the page's CSS and theme tokens still apply, and the element adds behaviour when it loads. No shadow DOM, because theme styles could not reach inside. This replaces scripts that find their markup by selector and publish functions on window.

Inline scripts move into static files that read data-* attributes or JSON blocks. That is also what makes a Content Security Policy possible.

6. Delivery

In rough order of value:

  • Speculation rules to prefetch or prerender likely next pages. Browsers that do not support them ignore them.
  • Edge caching of anonymous storefront HTML, which depends on not issuing the visitor cookie on the first request.
  • A Content Security Policy, report-only first, once inline scripts are out of the templates.
  • A Core Web Vitals beacon and a page-weight budget checked in CI.

Admin

  • Keep MVC, forms and the bx- components.
  • Make bxConfirm and the admin toast helper the only entry points, then drop the plugins behind them (sweetalert, toastr), along with footable and iCheck.
  • Load the remaining heavy plugins only on the pages that use them.
  • Move the largest inline page scripts into files.
  • Vendor the few libraries still loaded from public CDNs, and self-host the admin font.

Web platform features: what to rely on

Use freely Use as an enhancement, with a fallback Not yet
<dialog>, <details name>, popover closedby on dialogs, popover=hint CSS @function and if()
Cascade layers, nesting, :has(), size container queries Anchor positioning, invoker commands (commandfor) CSS-only carousels
color-mix(), light-dark(), @starting-style Scroll-driven animations, interpolate-size Declarative partial updates
Import maps, cross-document View Transitions, speculation rules Customisable <select> The Sanitizer API as the only sanitiser

"Enhancement" means the page must work, and look acceptable, in a browser that ignores the feature. Check current support before depending on anything in the middle column: this table reflects November 2026.

Order of work

  1. Remove Bootstrap's JavaScript, then jQuery, from the storefront.
  2. Add fragment responses and the shared swap helper; move add-to-basket onto them.
  3. Add the build: modules, hashes, lint, type checking, error beacon.
  4. Split and layer the CSS; move page-specific CSS out of the main file.
  5. Remove Bootstrap's CSS, theme by theme.
  6. Delivery work and the admin clean-up, as capacity allows.

Steps 1 and 2 need no build and remove the most render-blocking weight and the most duplicated code, so they come first.

What makes this safe

The storefront has a strong net for this kind of change: the pattern library with a fixture for every shared component, golden render hashes across themes, before-and-after screenshots from dev-scripts/ui-snapshots.sh, and the render benchmark. Use them for each step; a visual difference is a bug unless the merge request lists it.