MCPcopy Index your code
hub / github.com/TanStack/db

github.com/TanStack/db @main sqlite

repository ↗ · DeepWiki ↗
3,951 symbols 15,099 edges 700 files 482 documented · 12% 10 cross-repo links
README

<a href="https://npmjs.com/package/@tanstack/db" target="\_parent">
  <img alt="" src="https://img.shields.io/npm/dm/@tanstack/db.svg" alt="npm downloads" />
</a>
<a href="https://github.com/TanStack/db" target="\_parent">
  <img alt="" src="https://img.shields.io/github/stars/TanStack/db.svg?style=social&label=Star" alt="GitHub stars" />
</a>
<a href="https://bundlejs.com/?q=%40tanstack%2Fdb&config=%7B%22esbuild%22%3A%7B%22external%22%3A%5B%22react%22%2C%22react-dom%22%5D%7D%7D&badge=" target="\_parent">
  <img alt="" src="https://deno.bundlejs.com/?q=@tanstack/db&config={%22esbuild%22:{%22external%22:[%22react%22,%22react-dom%22]}}&badge=detailed" alt="Bundle size" />
</a>







<a href="#status">
<img src="https://img.shields.io/badge/status-beta-yellow" alt="Status - BETA">

Best of JS Follow @TanStack

Become a Sponsor!

TanStack DB

Tanstack DB is currently in BETA. See the release post for more details.

The reactive client store for your API.

TanStack DB solves the problems of building fast, modern apps, helping you:

  • Avoid endpoint sprawl and network waterfalls by loading data into normalized collections
  • Optimise client performance with sub-millisecond live queries and real-time reactivity
  • Take the network off the interaction path with instant optimistic writes

Data loading is optimized. Interactions feel instantaneous. Your backend stays simple and your app stays blazing fast. No matter how much data you load.

Read the docs →

Get Involved

Partners

CodeRabbit Cloudflare
ElectricSQL logo Prisma

DB & you?

We're looking for TanStack DB Partners to join our mission! Partner with us to push the boundaries of TanStack DB and build amazing things together.

LET'S CHAT

Explore the TanStack Ecosystem

… and more at TanStack.com » v>

Extension points exported contracts — how you extend this code

SQLiteDriver (Interface)
(no doc) [8 implementers]
packages/db-sqlite-persistence-core/src/persisted.ts
StorageAdapter (Interface)
(no doc) [5 implementers]
packages/offline-transactions/src/types.ts
QueryCollectionState (Interface)
* Internal state object for tracking query observer and errors
packages/query-db-collection/src/query.ts
StoredItem (Interface)
* Internal storage format that includes version tracking
packages/db/src/local-storage.ts
UserRecord (Interface)
* TrailBase record types matching the camelCase schema * Column names match the app types, only types differ for storag
packages/trailbase-db-collection/e2e/trailbase.e2e.test.ts
ID2 (Interface)
(no doc) [1 implementers]
packages/db-ivm/src/types.ts
UseLiveQueryReturn (Interface)
(no doc)
packages/vue-db/src/useLiveQuery.ts
User (Interface)
(no doc)
packages/db-collection-e2e/src/types.ts

Core symbols most depended-on inside this repo

expect
called by 9955
packages/tauri-db-sqlite-persistence/e2e/app/src/runtime-vitest.ts
from
called by 2224
packages/db/src/query/builder/index.ts
createCollection
called by 1247
packages/db/src/collection/index.ts
select
called by 1206
packages/db/src/query/builder/index.ts
createLiveQueryCollection
called by 1093
packages/db/src/query/live-query-collection.ts
where
called by 919
packages/db/src/query/builder/index.ts
preload
called by 812
packages/db/src/collection/index.ts
get
called by 812
packages/db/src/utils/btree.ts

Shape

Function 1,957
Method 1,186
Class 515
Interface 293

Languages

TypeScript100%

Modules by API surface

packages/db/src/errors.ts264 symbols
packages/db-sqlite-persistence-core/src/persisted.ts113 symbols
packages/db/src/utils/btree.ts62 symbols
packages/db/src/query/live/collection-config-builder.ts56 symbols
packages/db-sqlite-persistence-core/src/sqlite-core-adapter.ts55 symbols
packages/query-db-collection/src/query.ts50 symbols
packages/db/src/query/builder/functions.ts46 symbols
packages/query-db-collection/src/errors.ts42 symbols
packages/electric-db-collection/src/electric.ts42 symbols
packages/db/src/query/ir.ts42 symbols
packages/db/src/query/compiler/index.ts41 symbols
packages/db/src/collection/index.ts41 symbols

Dependencies from manifests, versioned

@angular/build20.3.16 · 1×
@angular/cli20.3.16 · 1×
@angular/common20.3.16 · 1×
@angular/compiler20.3.16 · 1×
@angular/compiler-cli20.3.16 · 1×
@angular/core20.3.16 · 1×
@angular/forms20.3.16 · 1×
@angular/platform-browser20.3.16 · 1×
@angular/platform-browser-dynamic20.3.16 · 1×
@angular/router20.3.16 · 1×
@babel/core7.29.0 · 1×
@capacitor-community/sqlite8.0.1 · 1×

Datastores touched

todo_appDatabase · 1 repos
e2e_testDatabase · 1 repos
shopping_listDatabase · 1 repos

For agents

$ claude mcp add db \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact