Run Strukt locally
The repository uses Bun for dependencies, server code and tests, and Node 22 for the Vite client build. Standalone Builder development needs no database. Managed CMS development starts the Bun server and Vite together with local-only defaults.
Before you start
Section titled “Before you start”- Use a compatible Bun 1.4+ and Node 22. Work on a feature branch and keep local credentials/build output out of Git.
-
Install from the canonical lockfile:
Terminal window bun install --frozen-lockfileDo not enable dependency install scripts globally. The repository deliberately uses exact pins and a package-release delay.
-
For standalone, run
bun run devand use the displayed local address. For managed CMS, copy.env.exampleto private.env.local, replace the setup code, choose a separate scratch STRUKT_DATA_DIR, then runbun run dev:cms. -
Use the displayed admin origin for setup/login and the public hosted origin for visitor checks. Local development defaults include test-only secrets; never promote those defaults into a deployed environment.
-
Validate changes with
bun run lint,bun run typecheckandbun run test <substring>while iterating. Run tests through the repository runner because DOM tests require process isolation. Build withbun run buildorbun run build:cmsfor the corresponding mode.
Check the result
Section titled “Check the result”- A saved synthetic managed page reopens and publishes through the local public listener, or standalone imports/exports a local document.
Troubleshooting
Section titled “Troubleshooting”If startup fails, inspect the exact configuration error and occupied port. Keep the admin hostname outside the hosted namespace. Do not point a development process at production data to bypass an empty local workspace.
Related guides
Section titled “Related guides”- Understand architecture and extension contracts
- Install a self-hosted Strukt service
- Import HTML and keep recovery exports
Applies to Strukt c02552848c92 · 2026-10-31