Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion versioned_docs/version-3.x/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ Currently only SQLite (with [better-sqlite3](https://github.com/WiseLibs/better-

## What JavaScript runtimes are supported?

Currently only Node.js is tested. Please voice your interest if you want support for other runtimes such as Bun or Deno.
- Node.js: systematically tested.
- Bun: passed basic end-to-end tests.
- Vercel Edge Runtime: passed basic end-to-end tests.
- Deno: not tested.
27 changes: 25 additions & 2 deletions versioned_docs/version-3.x/recipe/databases/sqlite.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import PackageInstall from '../../_components/PackageInstall';

# SQLite

## Installing driver
## Node.js

### Installing driver

<PackageInstall dependencies={['better-sqlite3']} devDependencies={['@types/better-sqlite3']} />

## Creating ZenStackClient
### Creating ZenStackClient

```ts
import { schema } from './zenstack/schema';
Expand All @@ -22,3 +24,24 @@ const db = new ZenStackClient(schema, {
dialect: new SqliteDialect({ database: new SQLite('./dev.db') }),
});
```

## Bun

### Installing driver

Bun is not compatible with `better-sqlite3`. You can use its builtin `bun:sqlite` module with the `kysely-bun-sqlite` Kysely community dialect.

<PackageInstall dependencies={['kysely-bun-sqlite']} />

### Creating ZenStackClient

```ts
import { schema } from './zenstack/schema';
import { Database } from 'bun:sqlite';
import { ZenStackClient } from '@zenstackhq/orm';
import { BunSqliteDialect } from 'kysely-bun-sqlite';

const db = new ZenStackClient(schema, {
dialect: new BunSqliteDialect({ database: new Database('./dev.db') }),
});
```
6 changes: 6 additions & 0 deletions versioned_docs/version-3.x/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ A simple TypeScript application that demonstrates how to model a minimum blog ap
https://github.com/zenstackhq/v3-sample-todo-nextjs

A multi-tenant Todo app built with Next.js, Auth.js, TanStack Query, and ZenStack v3.

## Rallly

https://github.com/zenstackhq/rallly

[Rallly](https://github.com/lukevella/rallly) is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier. This repo is a fork of the original Rallly repo, replaced Prisma with ZenStack v3.