# tanstack/db

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/tanstack-db).**

3,604 stars · 173 forks · TypeScript · mit

## Links

- GitHub: https://github.com/TanStack/db
- Homepage: https://tanstack.com/db
- awesome-repositories: https://awesome-repositories.com/repository/tanstack-db.md

## Description

This project is a client-side data management library and query orchestrator designed to synchronize remote server state with local client state. It functions as a type-safe state manager and cache orchestrator that coordinates data loading across diverse backends, including REST, GraphQL, and WebSockets.

The system distinguishes itself through a durable workflow engine for executing asynchronous functions with persisted state and deterministic replay. It also provides a standardized AI integration adapter to connect large language models to application data, supporting real-time response streaming and tool-based skill execution.

The library covers a broad capability surface including data normalization, optimistic UI updates, and reactive data querying using differential dataflow. It further provides headless state management for forms and chat logic, parallel route data fetching, and a set of automation tools for task queue management and rate limiting.

The project includes a command-line interface for project template installation and ecosystem tool discovery.

## Tags

### Data & Databases

- [Client-Side State Caches](https://awesome-repositories.com/f/data-databases/data-caching/client-side-state-caches.md) — Implements a normalized in-memory cache to store API data and prevent network waterfalls on the client. ([source](https://tanstack.com/query/latest/docs/framework/react/overview))
- [Client-Server State Synchronization](https://awesome-repositories.com/f/data-databases/client-server-state-synchronization.md) — Keeps local state in harmony with server data by updating stale information when state changes. ([source](https://tanstack.com/query/latest/docs/framework/react/overview))
- [Standard Schema Validators](https://awesome-repositories.com/f/data-databases/data-collection-schemas/standard-schema-validators.md) — Enforces runtime data integrity and type transformations using schema libraries like Zod or Valibot. ([source](https://tanstack.com/db/latest/docs/overview))
- [Cross-Source Joins](https://awesome-repositories.com/f/data-databases/data-collections-datasets/cross-source-joins.md) — Combines data from disparate collections and external APIs into a unified model for simplified querying. ([source](https://tanstack.com/db/latest/docs/overview))
- [Backend Collection Creators](https://awesome-repositories.com/f/data-databases/data-source-connectivity-tools/multi-source-data-integration/backend-collection-creators.md) — Connects to diverse backends like REST, GraphQL, and WebSockets through pluggable collection creators. ([source](https://tanstack.com/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query))
- [Normalized In-Memory Collections](https://awesome-repositories.com/f/data-databases/in-memory-data-stores/normalized-in-memory-collections.md) — Stores typed records in a central cache to decouple data loading from component binding and prevent network waterfalls.
- [Normalized Data Caching](https://awesome-repositories.com/f/data-databases/normalized-data-caching.md) — Stores API data in normalized in-memory collections to maintain coherence across the application. ([source](https://tanstack.com/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query))
- [Optimistic Mutation Handlers](https://awesome-repositories.com/f/data-databases/optimistic-mutation-handlers.md) — Updates local UI state immediately during mutations with automatic rollback if the backend request fails. ([source](https://tanstack.com/db/latest/docs/overview))
- [Query and Cache Orchestrators](https://awesome-repositories.com/f/data-databases/query-and-cache-orchestrators.md) — Coordinates data loading and caching across diverse backends including REST, GraphQL, and WebSockets.
- [Reactive Data Queries](https://awesome-repositories.com/f/data-databases/reactive-data-queries.md) — Provides live queries that trigger incremental interface updates when underlying data changes. ([source](https://tanstack.com/db/latest/docs/overview))
- [Reactive Query Engines](https://awesome-repositories.com/f/data-databases/reactive-query-engines.md) — Runs high-performance incremental queries that automatically update the user interface when underlying data changes. ([source](https://cdn.jsdelivr.net/gh/tanstack/db@main/README.md))
- [Row-Level Delta Streaming](https://awesome-repositories.com/f/data-databases/real-time-data-streaming/query-to-stream-adapters/row-level-delta-streaming.md) — Streams only the specific rows that change in a dataset to provide immediate, high-performance UI updates. ([source](https://tanstack.com/blog/tanstack-db-0.1-the-embedded-client-database-for-tanstack-query))
- [Query Interface Adapters](https://awesome-repositories.com/f/data-databases/storage-backend-adapters/query-interface-adapters.md) — Uses pluggable collection creators to unify diverse data sources like REST and GraphQL into a consistent query interface.
- [Typed Data Collections](https://awesome-repositories.com/f/data-databases/typed-data-collections.md) — Manages typed collections of objects from endpoints and local storage to decouple data loading from components. ([source](https://tanstack.com/db/latest/docs/overview))
- [Workflow State Stores](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/metadata-state-management/postgresql-persistence/workflow-state-stores.md) — Provides persistent storage for workflow execution state and task metadata to ensure consistency across hosting environments. ([source](https://tanstack.com/workflow/latest/docs/overview))
- [Differential Dataflow Engines](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/data-processing-frameworks/differential-dataflow-engines.md) — Implements differential dataflow to trigger updates only for specific data slices that have changed.
- [Data Loading Strategies](https://awesome-repositories.com/f/data-databases/data-synchronization-configurations/sync-endpoint-configurations/unidirectional-sync-configurations/bidirectional-sync-implementations/synchronization-propagation-modes/data-loading-strategies.md) — Loads data using eager, on-demand, or progressive modes to optimize requests based on urgency. ([source](https://tanstack.com/db/latest/docs/overview))
- [Incremental Data Streaming](https://awesome-repositories.com/f/data-databases/incremental-data-streaming.md) — Delivers only the specific rows or model tokens that change to provide real-time updates without full repaints.
- [On-Demand Subset Loading](https://awesome-repositories.com/f/data-databases/on-load-data-fetchers/on-demand-subset-loading.md) — Allows fetching precise subsets of data using query predicates and limits to optimize network requests. ([source](https://tanstack.com/db))
- [Transactional Data Mutations](https://awesome-repositories.com/f/data-databases/transactional-data-mutations.md) — Manages multi-step data changes with transactional lifecycles and automatic rollback capabilities. ([source](https://tanstack.com/db/latest/docs/overview))

### Artificial Intelligence & ML

- [AI Agent Tool Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-integrations/ai-agent-tool-integrations.md) — Connects large language models to application data and external APIs for functional tool-based skill execution.
- [LLM Provider Adapters](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-provider-adapters.md) — Implements a standardized adapter interface for connecting to various large language model providers. ([source](https://tanstack.com/ai/latest/docs/getting-started/overview))
- [Streaming Chat Responses](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-chat-clients/streaming-chat-responses.md) — Provides the ability to stream AI-generated text incrementally to the client for real-time chat interfaces. ([source](https://tanstack.com/ai/latest/docs/getting-started/overview))
- [Chat State Management](https://awesome-repositories.com/f/artificial-intelligence-ml/chat-state-management.md) — Offers headless management of chat history, streaming responses, and conversation state with type safety. ([source](https://tanstack.com/ai/latest/docs/getting-started/overview))

### Networking & Communication

- [Unified Data Models](https://awesome-repositories.com/f/networking-communication/api-integration-frameworks/unified-data-models.md) — Integrates various data fetching protocols into a unified collection model for a consistent UI query interface. ([source](https://tanstack.com/db))

### Software Engineering & Architecture

- [AI Integration Adapters](https://awesome-repositories.com/f/software-engineering-architecture/ai-integration-adapters.md) — Provides a standardized configuration layer for connecting applications to diverse external AI model providers.
- [Data Normalization Layers](https://awesome-repositories.com/f/software-engineering-architecture/data-normalization-layers.md) — Transforms disparate API data structures into a unified internal schema to prevent network waterfalls. ([source](https://cdn.jsdelivr.net/gh/tanstack/db@main/README.md))
- [Durable Workflow Engines](https://awesome-repositories.com/f/software-engineering-architecture/durable-workflow-engines.md) — Provides a durable workflow engine that persists state to a database to ensure tasks resume after restarts. ([source](https://tanstack.com/workflow/latest/docs/overview))
- [Type-Safe State Management](https://awesome-repositories.com/f/software-engineering-architecture/type-safe-state-management.md) — Provides a headless system for maintaining application state using strict data modeling and runtime validation.
- [Deterministic Execution Tracking](https://awesome-repositories.com/f/software-engineering-architecture/deterministic-execution-tracking.md) — Wraps side effects in tracked steps to ensure a workflow can be reliably replayed. ([source](https://tanstack.com/workflow/latest/docs/overview))

### User Interface & Experience

- [Headless State Managers](https://awesome-repositories.com/f/user-interface-experience/headless-state-managers.md) — Maintains type-safe models for forms and chat logic independent of any specific UI framework rendering.
- [Cross-Framework Form Models](https://awesome-repositories.com/f/user-interface-experience/form-and-input-management/cross-framework-form-models.md) — Maintains shared typed form models and validation logic that adapt to different UI frameworks. ([source](https://tanstack.com/form))
- [Headless Form Management](https://awesome-repositories.com/f/user-interface-experience/headless-form-management.md) — Maintains a type-safe, framework-agnostic model for form fields and validation independent of the UI layer. ([source](https://tanstack.com/form))
- [Headless Table Logic](https://awesome-repositories.com/f/user-interface-experience/headless-table-logic.md) — Implements framework-agnostic utilities for managing table state and row calculations without enforcing visual styles. ([source](https://tanstack.com/table/latest/docs/overview))
- [Render Optimization](https://awesome-repositories.com/f/user-interface-experience/state-to-html-rendering/render-optimization.md) — Subscribes components to specific data slices to prevent full-page repaints during user interaction. ([source](https://tanstack.com/form))
- [URL State Synchronization](https://awesome-repositories.com/f/user-interface-experience/url-state-synchronization.md) — Synchronizes UI component state with URL query parameters using schemas to enable deep-linking and filter persistence. ([source](https://tanstack.com/router))

### Web Development

- [Client-Side State Management Libraries](https://awesome-repositories.com/f/web-development/client-side-state-management-libraries.md) — Provides a comprehensive framework for normalizing API data and synchronizing remote server state with local client state.
- [Centralized State Management](https://awesome-repositories.com/f/web-development/hydration-state-management/browser-side-state-management/centralized-state-management.md) — Provides a centralized state management system that maintains a single source of truth across different UI frameworks. ([source](https://tanstack.com/store/latest/docs/overview))
- [Optimistic UI Updates](https://awesome-repositories.com/f/web-development/optimistic-ui-updates.md) — Implements optimistic state updates to remove network latency from the user interaction path. ([source](https://cdn.jsdelivr.net/gh/tanstack/db@main/README.md))
- [Optimistic Update Engines](https://awesome-repositories.com/f/web-development/optimistic-update-engines.md) — Provides mechanisms for applying local state changes immediately with automatic server-side rollback capabilities.
- [Application Route Managers](https://awesome-repositories.com/f/web-development/application-route-managers.md) — Provides an application route manager that maps URLs to specific components for single-page application navigation. ([source](https://tanstack.com/router/latest/docs/framework/react/quick-start))
- [Route Lifecycle Handlers](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/routing-request-handling/route-lifecycle-handlers.md) — Manages route lifecycle states, including localized pending and error handling and individual route code splitting. ([source](https://tanstack.com/router))
- [Isomorphic Tool Definitions](https://awesome-repositories.com/f/web-development/isomorphic-logic-utilities/isomorphic-tool-definitions.md) — Provides function definitions that operate across server and client runtimes and are automatically invoked by AI models. ([source](https://tanstack.com/ai/latest/docs/getting-started/overview))
- [Parallel Route Data Loading](https://awesome-repositories.com/f/web-development/parallel-route-data-loading.md) — Executes asynchronous loaders in parallel to retrieve and cache route data before components render. ([source](https://tanstack.com/router))
- [Route Preloaders](https://awesome-repositories.com/f/web-development/request-routing/intent-based-routing/route-preloaders.md) — Triggers preemptive data fetching based on user interactions like hovers to eliminate perceived loading delays. ([source](https://tanstack.com/router))
- [Type-Safe Navigation Frameworks](https://awesome-repositories.com/f/web-development/routing-systems/routing/type-safe-navigation-frameworks.md) — Provides a type-safe navigation framework that validates paths and parameters against a route tree. ([source](https://tanstack.com/router))

### Development Tools & Productivity

- [Modular Skill Authoring](https://awesome-repositories.com/f/development-tools-productivity/modular-skill-authoring.md) — Guides the creation of AI skill definitions through interactive authoring interviews and domain discovery. ([source](https://tanstack.com/intent/latest/docs/overview))
- [Task Queues](https://awesome-repositories.com/f/development-tools-productivity/task-queues.md) — Manages the ordered execution of functions with support for concurrency and priority limits. ([source](https://tanstack.com/pacer/latest/docs/overview))

### Part of an Awesome List

- [Alternative State Management](https://awesome-repositories.com/f/awesome-lists/devtools/alternative-state-management.md) — Provides reactive client-side storage hooks.
- [State Management](https://awesome-repositories.com/f/awesome-lists/devtools/state-management.md) — Provides reactive client-side storage hooks.
