BlogGetting startedBuild
How to run Vendra locally and build it with Vite (HTML and React editions)
Open the HTML edition without a build, run the Vite dev server, rebuild dist/ after a change, and run, build and deploy the React 19 edition.

You do not need a build to use Vendra. You need one to change its source. This article covers both, for the HTML edition and the React edition.
Use the HTML edition as it is
Every page in dist/ is plain HTML that links one stylesheet and one script with relative paths, so the folder works from disk: double-click dist/index.html, or open dist/demos.html to see every storefront and page. A local web server is better, because some browsers restrict what a page opened from the file system may do; any static server will do.
To go live, upload the contents of dist/ to your host. The server-config/ folder has an apache.htaccess and an nginx.conf with the security headers and caching rules the pages expect.
Requirements for a build
- Node.js 20 or newer.
- For
npm testandnpm run responsive, a Chromium for Playwright: runnpx playwright install chromiumonce.
Run and build the HTML edition
- Open a terminal in the
vendra-v1.0.0folder and runnpm install. npm run devstarts the Vite development server with live reload and prints its address. Edit anything insrc/and the page refreshes.npm run buildwritesdist/: the pages,vendra.min.css,vendra.rtl.min.cssandvendra.min.js, with a readable twin of each stylesheet and script. The build also adds a?v=query to every asset link, so a new upload is never served stale, and a Content Security Policy meta tag with the hashes of the inline scripts.npm testopens every page in a real browser and runs the shopping flows;npm run responsivechecks every page for horizontal overflow at five widths;npm run previewserves the built folder.
npm install
npm run dev # development server with live reload
npm run build # writes dist/
npm test # every page loads without errors, plus the shopping flows
npm run responsive # overflow check at five widths
Two more scripts exist: npm run fonts regenerates the self-hosted font files and fonts.css from the installed Fontsource packages (only needed when you add a pack), and npm run placeholders writes a neutral placeholder image for every image a built page references that does not exist yet, which is handy after you add products before their photos arrive.
Run and build the React edition
The React edition lives in react/. It is a React 19 single-page app with React Router 7, and it imports the engine straight from ../src/js and Bootstrap from the parent's node_modules, so the parent must be installed first.
- In the parent folder:
npm install(if not done already). cd react, thennpm install.npm run devserves the app onhttp://localhost:5175.npm run buildwrites static files toreact/dist;npm run previewserves that build onhttp://localhost:4175;npm testbuilds, serves and checks every route and the shopping flows.
Every page answers both /name and /name.html, so links copied from the HTML edition keep working.
Deploying the React build
A single-page app needs the server to send index.html for paths it does not know. On nginx that is try_files $uri /index.html;; on Netlify a _redirects rule /* /index.html 200. To serve the app from a sub-folder, set base in react/vite.config.js or pass it on the command line, for example npx vite build --base /react/, which is how the live demo is built.
Keeping the two editions in step
The page components in react/src/pages are generated from the built HTML pages. After a change in the Handlebars source, rebuild the HTML edition and run npm run generate in react/; it rewrites the pages, the overlays, the route table and the catalogue. If you edit the generated components by hand instead, stop regenerating them, or keep your changes in separate components.
If a build stops with an error, see styles, images or scripts do not load, or the build fails.