db-core/collection-setup
OfficialCreate typed DB collections with adapters.
Software Engineering#tanstack-db#electric-sql#rxdb#adapter-patterns#typed-collections#collection-setup
AuthorTanStack
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Centralizes and streamlines the setup of typed TanStack DB collections across multiple adapters, reducing boilerplate and preventing type-adapter mismatches.
Core Features & Use Cases
- Centralized collection creation with createCollection using adapters like REST query, Electric, PowerSync, RxDB, TrailBase, and local adapters.
- Guidance on key configuration options such as getKey, schema, sync, gcTime, autoIndex, defaultIndexType, and syncMode, plus collection lifecycle states.
- Includes adapter-specific patterns for txid tracking, direct writes, and onLoad/onLoadSubset hooks to keep data in sync.
Quick Start
Define a typed collection by choosing an adapter (e.g., queryCollectionOptions, electricCollectionOptions, or powerSyncCollectionOptions) and calling createCollection with a schema.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: db-core/collection-setup Download link: https://github.com/TanStack/db/archive/main.zip#db-core-collection-setup Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.