fuzor
v0.5.3
Published
HTML-first framework for SPA or MPA builds with static or server delivery
Readme
Fuzor
One source app. SPA or MPA. Static or server-backed. Fuzor compiles HTML and Markdown pages, layouts, components and interactive islands into finished documents at build time, then ships them as a single-page or multi-page app, as static files or with a generated Node server.
| Navigation | Static output | Server output | | --- | --- | --- | | SPA | One document with every page as a template, plus lazy island chunks | The same document, API endpoints and server data from a Node server | | MPA | One HTML file per page | The same files, API endpoints and server data from a Node server |
Pages are static by default. HTML route policies can opt subtrees into SPA navigation or request-time HTML rendering. A server is added automatically when the app has an api/ folder or a server.ts next to a page.
npm create fuzor@latest my-app
cd my-app
pnpm install
pnpm devfuzor build --target spa # or --target mpa, --inline, --server
fuzor preview --target spa # serve the build
fuzor routes # inspect routes and endpointsPlatform-specific markup stays in the shared page source and is removed at compile time:
<!--fuzor:platform --desktop-->
<desktop-toolbar></desktop-toolbar>
<!--/fuzor:platform-->
<!--fuzor:platform --native-->
<native-toolbar></native-toolbar>
<!--/fuzor:platform-->The same blocks may wrap the shared index.html shell. They are resolved before
the Vite entrypoint is rendered, so each platform build receives only its shell
markup:
<!--fuzor:platform --desktop-->
<desktop-window-chrome></desktop-window-chrome>
<!--/fuzor:platform-->Build or develop a platform explicitly with --platform (Electron selects desktop by default; other targets select
web):
fuzor dev --target electron
fuzor build --target spa --platform mobile
fuzor build --target spa --platform browser-extension-popupThe compiler records every platform selector found in the source, so one app can expose multiple target-specific entry points without duplicating its pages.
Documentation: fuzor.dev/docs · Examples · Changelog
UI components, native DOM behavior and styling drivers ship in fuzor/ui. See the UI guide.
Native DOM logic uses <script type="module">, inline JavaScript/TypeScript or an external JS/TS module. Scripts receive scoped host access, an abort signal and cleanup registration. Reserve islands for third-party UI runtime adapters. Fuzor UI Web Components and compiled resumable handlers remain native features. See the HTML module script guide.
