# declarative-sqlite > declarative-sqlite is a TypeScript library for offline-first browser apps: SQLite (WebAssembly, OPFS) with a declarative schema, automatic additive migration, live queries, and a sync layer (cursor-based pull, column-level outbox, idempotent batched push). Install v3 with `npm install declarative-sqlite`. Full documentation in one file: https://declarative-sqlite.linden.no/llms-full.txt ## Docs - [Introduction](https://declarative-sqlite.linden.no/docs/intro.md): What declarative-sqlite is, the three kinds of state it keeps apart, and what it does not do. - [Getting started](https://declarative-sqlite.linden.no/docs/getting-started.md): Install the package, configure Vite, open a local database, and add sync. - [Schema](https://declarative-sqlite.linden.no/docs/schema.md): Declare tables, column types, defaults, keys and synced tables with SchemaBuilder. - [Storage](https://declarative-sqlite.linden.no/docs/storage.md): Choose where the database lives: OPFS, IndexedDB or memory, via openAdapter. - [Reading and writing](https://declarative-sqlite.linden.no/docs/reading-and-writing.md): Typed db.tables CRUD, SQL queries, transactions and raw statements. - [Live queries](https://declarative-sqlite.linden.no/docs/live-queries.md): SQL queries that stay current: reads, scopes, emission rules and loading state. - [Migrations](https://declarative-sqlite.linden.no/docs/migrations.md): Automatic, additive schema migration on open, and when a table rebuild is needed. - [Sync](https://declarative-sqlite.linden.no/docs/sync.md): Pull, record, push, retries, rejected changes, change notifications and runtime options. - [Server protocol](https://declarative-sqlite.linden.no/docs/server-protocol.md): The exact request and response shapes a backend must implement for pull and push. - [React](https://declarative-sqlite.linden.no/docs/react.md): SyncProvider, useLiveQuery, useDraftField, useOutboxCounts and useSyncStatus. - [Testing](https://declarative-sqlite.linden.no/docs/testing.md): Test sync behaviour in memory with MemoryAdapter and FakeTransport. - [Upgrading from v2](https://declarative-sqlite.linden.no/docs/upgrading-from-v2.md): What changed from v2 to v3 and how to port an existing app. - [For AI agents](https://declarative-sqlite.linden.no/docs/ai-agents.md): Machine-readable docs and the rules an agent must follow when writing code against declarative-sqlite.