Skip to content

Getting Started

  • Bun >= 1.x — Bosia runs entirely on Bun. No Node.js required.
Terminal window
bunx bosia create my-app

You’ll be prompted to pick a template:

TemplateDescription
defaultMinimal starter — home page, about page, one loader
demoFull-featured — blog, API routes, form actions, hooks

To skip the prompt:

Terminal window
bunx bosia create my-app --template demo
Terminal window
cd my-app
bun run dev

Open http://localhost:9000. The dev server watches for file changes and reloads the browser automatically via SSE — no full-page blink.

Terminal window
bun run build
bun run start

build compiles client bundles, server entry, Tailwind CSS, and prerenders static routes. start runs the production server.

Create a new file at src/routes/hello/+page.svelte:

<h1>Hello!</h1>
<p>This is my first Bosia page.</p>

Visit http://localhost:9000/hello — that’s it. No config, no imports, no registration. The file-based router picks it up automatically.

Create src/routes/hello/+page.server.ts alongside the page:

import type { LoadEvent } from "bosia";
export async function load({ url }: LoadEvent) {
return {
greeting: `Hello from the server!`,
timestamp: Date.now(),
};
}

Access the data in your page:

<script lang="ts">
let { data } = $props();
</script>
<h1>{data.greeting}</h1>
<p>Rendered at {new Date(data.timestamp).toLocaleString()}</p>