Reference
Complete API documentation, CLI commands, and type definitions.
Server API
Core Functions
registerSyncRoutes()- Register sync endpointsPrismaAdapter()- Create Prisma database adapter
Interfaces
DatabaseAdapter- Database adapter interfaceSyncServerOptions- Configuration options
Helpers
createJWTAuth()- JWT authentication helpermakeRedisBroadcaster()- Redis broadcasting
Client API
Core Functions
createSyncClient()- Initialize sync clientwarmUpModelRegistry()- Pre-register models
Store API
Store- Core store classstore.init()- Initialize storestore.save()- Save mutationsstore.create()- Create recordsstore.remove()- Delete records
React Hooks
useModel()- Get single modeluseCollectionModels()- Get collectionuseConnectionState()- Connection statususeStore()- Access storeuseGraphBridge()- Access graph bridge
Model Decorators
@ClientModel()- Define model type@Property()- Define property@ManyToOne()- Many-to-one relationship@OneToMany()- One-to-many relationship
Classes
Model- Base model classLazyReference- Lazy single relationshipLazyCollection- Lazy collection relationshipGraphBridge- Identity mapping layer
Types
- Wire Format Types - WireRow, SyncFrame
- Configuration Types - Config interfaces
- Adapter Types - Adapter interfaces
Last updated on