Solution
Webstir is an HTML-first full-stack solution. The active system is the Bun orchestrator plus the canonical TypeScript packages under packages/**.
Webstir is still experimental. The current Bun-first workflow is the active path in this repo, but its APIs and operational guidance can still change.
Active path: the Bun orchestrator in
orchestrators/bun. Historical.NETmaterial remains in-tree for reference only.
What It Optimizes For
- Server-rendered documents as the default experience
- Forms, links, redirects, and document navigation as primary primitives
- Fragment updates as an enhancement layer, not a requirement
- Low-JavaScript delivery for multi-page apps, backoffice tools, and dashboards
Main Pieces
- CLI orchestration:
orchestrators/bun - Frontend delivery:
packages/tooling/webstir-frontend - Backend runtime and scaffolding:
packages/tooling/webstir-backend - Contracts and manifest primitives:
packages/contracts/* - Supported Bun deployment contract:
orchestrators/bun/resources/deployment/docker - Proof apps:
examples/demos/auth-crudandexamples/demos/dashboard
How It Works
initScaffolds a workspace with frontend, backend, shared, and type roots.watchBuilds the active surfaces, starts the Bun dev server, starts the backend runtime, and proxies/api/*.testCompiles and runs frontend/backend tests through the canonical testing providers.publishWrites optimized frontend assets todist/frontend/**and backend output tobuild/backend/**.
Golden Path
Use this as the default app path today:
- Start with
webstir init full. - Add document pages under
src/frontend/pages/**withwebstir add-page. - Keep forms, redirects, auth checks, and request-time HTML in
src/backend/module.ts. - Add manifest-backed backend endpoints with
webstir add-routewhen those routes need explicit metadata or inspection output. - Define request-time views in
src/backend/module.tswhen a document needs server-loaded data at request time. - Enable
client-navonly after the baseline HTML path is already correct. - Use
webstir inspectto check scaffold drift plus the frontend/backend contract surfaces before shipping or automating fixes. - If scaffold wiring drifts, use
webstir repairto restore the same mode and enabled-feature shape. - Publish with
webstir publish, then deployapiorfullworkspaces with the supported Bun Docker contract.
Runtime Model
- Backend routes can return full HTML, redirects, or fragment metadata.
- Server-handled forms remain valid without client JavaScript.
- Request-time views can render HTML from the backend runtime and expose
x-webstir-document-cache. - Fragment responses remain uncached and carry
x-webstir-fragment-*metadata for targeted updates.
The canonical primitive breakdown for those behaviors lives in Primitives.
Proof Of The Model
fullis the canonical scaffold-aligned reference for the default path.auth-crudproves sign-in gates, validation recovery, redirect-after-post, and CRUD mutations.dashboardproves shell and panel refreshes without shifting into SPA-first architecture.
Agent Surface
webstir operations --jsonlists the stable framework operations that wrappers and MCP adapters should call.webstir inspect --jsonis the direct combined inspection contract for workspace-aware wrappers.webstir agentis intentionally thin: it orchestrates inspect, scaffold, validate, and repair flows by composing those stable operations instead of inventing architecture from scratch.- The benchmark runner at
bun run benchmark:agent-tasksstays pinned to the recipe apps so the agent-facing story stays tied to real framework behavior.