Advanced
Advanced
Go beyond the basics. These guides cover advanced schema patterns, composing multiple prototypes into a reusable toolkit, and extending Protokit with custom behaviour.
What's in This Section
Building a Toolkit
Compose multiple schemas and ProtoTool components into a cohesive, shareable toolkit.
Custom Schema Patterns
Advanced field composition, conditional derived values, and reusable schema fragments.
Extensibility
Add custom field renderers, override default components, and integrate third-party libraries.
Permissions & Role Guards
Show, hide and lock fields and collections by role — and what still needs protecting on the server.
When to Use Advanced Patterns
Start with the standard schema and composables. Reach for these guides when you need to:
- Share schemas across tools — extract common fields into reusable fragments and compose them per tool
- Build a product toolkit — bundle multiple
ProtoToolinstances with shared state and cross-tool computed values - Replace built-in UI — swap the default field renderer for a custom component without forking the library
- Guard by role and state — hide or lock fields and collections per role, combined with runtime conditions
- Go headless — keep the persistence and drop the UI: your own components on
usePrototype/useProtoList
Prerequisites
Before diving in, make sure you're comfortable with:
- Schema basics — fields, collections, derived values
- Composables —
usePrototype,useProtoDoc,useProtoCollection - Components —
ProtoTool,ProtoCrudModal
Encryption at Rest
How to encrypt IndexedDB data with AES-GCM so local storage is unreadable without the key — even via DevTools or direct file access.
Multi-Tool Apps
Patterns for building multi-tool applications with protokit — shared Y.js documents, workspace-scoped stores, staged navigation, and the produces/consumes data pipeline.