SQLite

A setup for Better Auth with SQLite

Installation

Install Better Auth with SQLite, or SQLite + Redis as a secondary storage (caching).

code-editor
pnpm dlx shadcn@latest add @auth-cn/sqlite

Better Auth + SQLite.

code-editor
pnpm dlx shadcn@latest add @auth-cn/sqlite-redis

Better Auth + SQLite + Redis as a secondary storage (caching).

Schema generation & migration.

The Better Auth CLI allows you to generate and migrate your database schema based on your Better Auth configuration and installed plugins.

SQLite supports both schema generation and schema migration.

code-editor
pnpm dlx @better-auth/cli@latest generate

Generate SQLite Schema.

code-editor
pnpm dlx @better-auth/cli@latest migrate

Migrate SQLite Schema.