Composables Overview

All composables auto-imported by protokit — from the high-level usePrototype facade to the low-level Y.js primitives.

Composables Overview

All composables are auto-imported — no explicit import statement needed. For most use cases, usePrototype is the only composable you need. The lower-level composables are available for custom UI or fine-grained Y.js control.

Hierarchy

usePrototype          ← high-level facade (start here)
├── useProtoDoc       — Y.js document lifecycle (IndexedDB, server sync, corruption)
├── useProtoMap       — Y.Map ↔ reactive refs bidirectional sync
├── useProtoList      — Y.Array low-level CRUD
├── useProtoDerived   — Reactive derived value computation
└── useProtoOutputs   — Produces/consumes cross-tool wiring

useProtoCollection    — High-level CRUD (wraps useProtoList + search + sort)
useProtoDraft         — Draft persistence for modal item editors
useProtoCorruption    — Corruption event queue and recovery
useProtoRegistry      — Global schema registry

Quick reference

ComposableUse when…
usePrototypeYou want everything at once — fields, derived, collections, reset, isReady
useProtoDocYou need direct access to the Y.Doc or sync state
useProtoMapYou need Y.Map ↔ reactive refs sync with an existing doc
useProtoListYou need raw Y.Array CRUD without schema awareness
useProtoCollectionYou need full CRUD with search, sort, count on an existing doc
useProtoDerivedYou need to compute derived values outside of usePrototype
useProtoOutputsYou need to manually wire produces/consumes
useProtoDraftYou are building a custom modal editor with draft support
useProtoCorruptionYou are building a custom corruption recovery UI
useProtoRegistryYou need to look up schemas by key at runtime

Detailed pages

Need a Landing Page?

Modern landing pages with optional modules (blog, docs, forms, i18n). Let's discuss your project.

Build Your MVP

Full-stack SaaS development. Expert in database design, multi-tenancy, and scalable architecture.

Deployment Help

Dockerize your backend, set up CI/CD pipelines, deploy to Cloudflare or Hetzner. Early-stage setup.

Suggest a SaaS Tool

Missing a calculator or tool? Suggest what you'd like to see on our site.