borgo-framework
v0.20.1
Published
The self-hosted React framework: file-based React SSR on Bun, API routes in Go, typed end to end. Vercel DX, Go performance, no platform lock-in.
Maintainers
Readme
borgo
The Bun/TypeScript core of borgo: SSR front server, file-based router, build pipeline and dev orchestrator. See the repository README for the full picture.
Requires Bun >= 1.3. The package ships its TypeScript source directly — Bun runs it natively, and what you read on npm is what runs.
bunx create-borgo my-appCLI
borgo dev— runs the Go API server and the SSR front server with fast refresh and css hot swapborgo build— production client assets inpublic/assets/and the Go binary indist/borgo start— runs both servers from the build output (--front-onlyfor split deployments, withAPI_URL)borgo export— prerenders the statically exportable pages intodist/site/borgo deploy init <caddy|nginx|systemd|compose>— writes the deploy guide's config for the projectborgo doctor— diagnoses the environment, one actionable fix per failing check
Run the CLI through Bun (bun run dev in an app). If you hit error: bun is not installed in %PATH%, the bin shim was spawned without Bun on PATH (e.g. by npm run) — see the troubleshooting section.
Exports
borgo-framework— browser-safe:redirect,Island/registerIslands,CsrfField, the websocketsubscribehelper (typed against the borgogen-generated event map),ApiError, plusLoaderContext,ActionContext,PrerenderContext,Head,PageModule,Routetypes and the router functionsborgo-framework/server—serve, the SSR front server (server-only)borgo-framework/router— router internals shared by server and clientborgo-framework/runtime— the hydration/navigation runtime and islands mounter, imported by the generated client entriesborgo-framework/refresh-runtime— react-refresh re-export used by the generated dev entry
The client hydration entry is generated into the app (.borgo/client.tsx) so that React always resolves from the app's own node_modules.
Built by Luigi Micca.
