Start with a single file, with the features you need
Migrations, CRUD helpers and fully typed queries
Type-safe JSX layouts, pages, and components
Render JSX to client components and mount them in the DOM
Zod-based form validation
Built-in cron jobs and recurring jobs
const { database, migrate } = bunSqlite<DB>();
await migrate(({ schema }) => {
return schema
.createTable("items")
.addColumn("id", "text", (col) => col.primaryKey().notNull())
.addColumn("content", "text", (col) => col.notNull())
.addColumn("created_at", "integer", (col) => col.notNull())
.execute();
});
const entities = await store(database);
const items = await entities("items").all({ limit: 10 });