nuxt-protokit

Schema-driven prototyping for Nuxt 4. Describe a tool as one TypeScript object — fields, computed values, collections, results and charts — and <ProtoTool> renders it, saved to IndexedDB through Y.js as you type.
✨ Features
- 📋 Schema-driven — fields, derived values, collections, result cards and visualizations in one TypeScript object
- 📴 Offline-first — Y.js + IndexedDB: every edit is saved locally; tabs stay in sync over BroadcastChannel
- 🧮 12 field types — number, text, textarea, select, segmented, toggle, range, rating, color, date, tags, linked-responses
- 📊 12 visualization types — progress, benchmark, bar, line, area, pie, donut and funnel charts, stat cards, comparison table, feature matrix, timeline
- 🗓️ Calendar, item panels, dashboards — ready-made components driven by the same schema
- 🧱 Headless mode — the persistence layer (
usePrototype, useProtoMap, useProtoList, useProtoText) without any UI
- 🔐 Migrations, namespaces, encryption — versioned schemas, per-tenant isolation, AES-GCM encrypted storage
- 🛡️ Corruption recovery — detects a corrupt IndexedDB document; restores from server snapshots when a backend is configured
- 🧩 Extensible — custom field and visualization types via
defineProtokitExtension
🚀 Installation
Install the module and its peer dependencies:
# npm
npm install @websideproject/nuxt-protokit yjs y-indexeddb @nuxt/ui tailwindcss
# pnpm
pnpm add @websideproject/nuxt-protokit yjs y-indexeddb @nuxt/ui tailwindcss
# bun
bun add @websideproject/nuxt-protokit yjs y-indexeddb @nuxt/ui tailwindcss
Add it to your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@nuxt/ui', '@websideproject/nuxt-protokit'],
css: ['~/assets/css/main.css'],
protokit: {
serverSync: false, // local only — see "Server backup"
},
})
The components are styled with Tailwind classes, so Tailwind has to scan the module — one line in your stylesheet
(the path is relative to the CSS file):
/* app/assets/css/main.css */
@import "tailwindcss";
@import "@nuxt/ui";
@source "../../../node_modules/@websideproject/nuxt-protokit";
📸 In the playground
The repo's playground runs these; the pictures are its CI screenshots.
A tool from one schema — fields, derived values, a result card and a chart:

ProtoCalendar — month, week and day views with drag and drop:

Item panels — a detail view for the selected collection item:

Visualizations — stat cards, line, area, bar, pie, funnel, benchmark and timeline:

🔄 Server backup