|
| 1 | +# ObjectStack Studio — Development Roadmap |
| 2 | + |
| 3 | +> **Last Updated:** 2026-02-09 |
| 4 | +> **Version:** 2.0.0 → 3.0.0 |
| 5 | +> **Goal:** Transform Studio from a metadata inspector into a full-featured visual IDE for the ObjectStack platform. |
| 6 | +
|
| 7 | +--- |
| 8 | + |
| 9 | +## 📊 Current State Assessment |
| 10 | + |
| 11 | +### What's Built (v2.0.0) |
| 12 | + |
| 13 | +| Category | Feature | Maturity | |
| 14 | +|----------|---------|----------| |
| 15 | +| **Core Architecture** | MSW in-browser kernel + server mode | ✅ Production | |
| 16 | +| **Core Architecture** | Plugin system (VS Code-style) | ✅ Production | |
| 17 | +| **Core Architecture** | Package manager (install/enable/disable) | ✅ Production | |
| 18 | +| **Core Architecture** | Theme toggle (light/dark/system) | ✅ Production | |
| 19 | +| **Core Architecture** | Error boundary + toast notifications | ✅ Production | |
| 20 | +| **Data Protocol** | Object schema inspector (field table) | ✅ Production | |
| 21 | +| **Data Protocol** | Paginated data table with CRUD | ✅ Production | |
| 22 | +| **Data Protocol** | Record create/edit modal (dynamic form) | ✅ Production | |
| 23 | +| **Developer Tools** | Interactive REST API console | ✅ Production | |
| 24 | +| **Developer Tools** | Generic JSON metadata inspector | ✅ Production | |
| 25 | +| **Developer Tools** | Developer overview dashboard | ✅ Production | |
| 26 | +| **Navigation** | Protocol-grouped sidebar with search | ✅ Production | |
| 27 | +| **Navigation** | Multi-package workspace switcher | ✅ Production | |
| 28 | +| **Navigation** | Breadcrumbs + API endpoint badges | ✅ Production | |
| 29 | + |
| 30 | +### Key Technical Debt |
| 31 | + |
| 32 | +| Issue | Impact | Priority | |
| 33 | +|-------|--------|----------| |
| 34 | +| No URL router — all navigation via `useState` | No deep links, no browser back/forward | 🔴 Critical | |
| 35 | +| Broker shim in `createKernel.ts` duplicates runtime logic | Fragile, hard to maintain | 🟡 Medium | |
| 36 | +| Response normalization scattered across components | DRY violation, inconsistent error handling | 🟡 Medium | |
| 37 | +| Stale `types.ts` (leftover Task types) | Dead code | 🟢 Low | |
| 38 | +| Empty `app/dashboard/` directory | Abandoned scaffold | 🟢 Low | |
| 39 | +| No component-level tests | Regression risk | 🟡 Medium | |
| 40 | +| Data refresh via `setTimeout` hack | Race conditions | 🟡 Medium | |
| 41 | +| Sidebar groups hardcoded (not reading from plugins) | Plugin contributions ignored | 🟡 Medium | |
| 42 | + |
| 43 | +### Protocol Coverage Gap |
| 44 | + |
| 45 | +**Spec defines 100+ metadata types. Studio has specialized viewers for only 1 (Object).** All other types fall back to the generic JSON inspector. The plugin system is ready — it just needs content. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## 🗺️ Roadmap |
| 50 | + |
| 51 | +### Phase 0: Foundation Hardening (v2.1) — 2 weeks |
| 52 | + |
| 53 | +> **Theme:** Fix structural debt before building new features. |
| 54 | +
|
| 55 | +| # | Task | Details | |
| 56 | +|---|------|---------| |
| 57 | +| 0.1 | **Add URL Router** | Integrate TanStack Router or React Router. Map views to URL paths: `/:package/objects/:name`, `/:package/metadata/:type/:name`, `/packages`, `/settings`. Enable browser back/forward and deep linking. | |
| 58 | +| 0.2 | **Centralize response normalization** | Create `src/lib/api-utils.ts` with `normalizeRecords()`, `normalizeMetadata()`. Remove inline `.records || .value || .data` from all components. | |
| 59 | +| 0.3 | **Wire plugin sidebar groups** | Replace hardcoded `PROTOCOL_GROUPS` in `app-sidebar.tsx` with plugin-contributed `useSidebarGroups()`. | |
| 60 | +| 0.4 | **Clean dead code** | Remove stale `types.ts`, empty `app/dashboard/` directory. | |
| 61 | +| 0.5 | **Add React Testing Library** | Set up component test infrastructure. Write baseline tests for `ObjectDataTable`, `ObjectDataForm`, `AppSidebar`, Plugin system. Target: 50% component coverage. | |
| 62 | +| 0.6 | **Fix data refresh pattern** | Replace `setTimeout` hack in `ObjectExplorer` with proper state invalidation / refetch callback. | |
| 63 | + |
| 64 | +**Deliverable:** Stable, testable, deep-linkable foundation. |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +### Phase 1: Data Protocol Designers (v2.2) — 4 weeks |
| 69 | + |
| 70 | +> **Theme:** First-class visual editors for all Data layer metadata. |
| 71 | +
|
| 72 | +| # | Task | Plugin ID | Priority | |
| 73 | +|---|------|-----------|----------| |
| 74 | +| 1.1 | **Object Designer — Edit Mode** | `objectstack.object-designer` | 🔴 P0 | |
| 75 | +| | Add field creation/editing inline. Support drag-and-drop field reordering. Validate field schemas via Zod. | | | |
| 76 | +| 1.2 | **Dataset Editor** | `objectstack.dataset-editor` | 🔴 P0 | |
| 77 | +| | Visual seed data editor. Import CSV/JSON. Preview before apply. Environment scoping (dev/test/prod). | | | |
| 78 | +| 1.3 | **Datasource Manager** | `objectstack.datasource-manager` | 🟡 P1 | |
| 79 | +| | Connection wizard (PostgreSQL, MySQL, MongoDB, SQLite, Redis). Test connection. Health check display. Pool config. | | | |
| 80 | +| 1.4 | **Field Type Catalog** | `objectstack.field-catalog` | 🟡 P1 | |
| 81 | +| | Interactive reference of all 46+ field types with examples, configuration options, and preview rendering. | | | |
| 82 | +| 1.5 | **Validation Rule Builder** | `objectstack.validation-builder` | 🟡 P1 | |
| 83 | +| | Visual builder for object validation rules: unique constraints, format checks, cross-field validation, state machine guards. | | | |
| 84 | +| 1.6 | **Hook Inspector** | `objectstack.hook-inspector` | 🟢 P2 | |
| 85 | +| | List/edit lifecycle hooks per object. Visualize execution order (priority). Test hooks from UI. | | | |
| 86 | +| 1.7 | **Analytics Cube Designer** | `objectstack.analytics-designer` | 🟢 P2 | |
| 87 | +| | Visual measures/dimensions builder. Join config. Pre-aggregation settings. Test query execution. | | | |
| 88 | +| 1.8 | **Mapping Designer** | `objectstack.mapping-designer` | 🟢 P2 | |
| 89 | +| | Visual ETL field mapping: source → transform → target. Preview transformation output. | | | |
| 90 | + |
| 91 | +**Deliverable:** All Data Protocol types have dedicated visual editors. |
| 92 | + |
| 93 | +--- |
| 94 | + |
| 95 | +### Phase 2: UI Protocol Designers (v2.3) — 6 weeks |
| 96 | + |
| 97 | +> **Theme:** Visual builders for every UI metadata type — the "App Builder" experience. |
| 98 | +
|
| 99 | +| # | Task | Plugin ID | Priority | |
| 100 | +|---|------|-----------|----------| |
| 101 | +| 2.1 | **ListView Designer** | `objectstack.view-designer` | 🔴 P0 | |
| 102 | +| | Visual column configurator for Grid views. Drag-and-drop column reorder. Column width/alignment. Filter & sort presets. Preview with live data. | | | |
| 103 | +| 2.2 | **ListView — Kanban / Calendar / Gantt** | `objectstack.view-designer` | 🟡 P1 | |
| 104 | +| | Mode-specific config panels: Kanban (status field, swimlanes), Calendar (date fields, duration), Gantt (dependencies, milestones). | | | |
| 105 | +| 2.3 | **FormView Designer** | `objectstack.form-designer` | 🔴 P0 | |
| 106 | +| | Section/column layout editor. Field placement with drag-and-drop. Conditional visibility (`visibleOn`). Widget selection per field. Preview mode. | | | |
| 107 | +| 2.4 | **Page Builder** | `objectstack.page-builder` | 🟡 P1 | |
| 108 | +| | Component composition canvas. Drag regions and components (header, details, related list, AI chat, custom). Property panel for each component. Preview with live data context. | | | |
| 109 | +| 2.5 | **App Builder** | `objectstack.app-builder` | 🟡 P1 | |
| 110 | +| | Navigation tree editor (drag-and-drop reorder). Add object/dashboard/page/URL items. Branding panel (colors, logo). Home page selector. | | | |
| 111 | +| 2.6 | **Dashboard Designer** | `objectstack.dashboard-designer` | 🟡 P1 | |
| 112 | +| | Grid layout editor (React-Grid-Layout). Widget palette: charts, KPIs, lists, embedded views. Data source binding per widget. Auto-refresh config. | | | |
| 113 | +| 2.7 | **Report Builder** | `objectstack.report-builder` | 🟢 P2 | |
| 114 | +| | Tabular/Summary/Matrix report config. Column picker, grouping, aggregation. Embedded chart toggle. Filter builder. Export options. | | | |
| 115 | +| 2.8 | **Chart Editor** | `objectstack.chart-editor` | 🟢 P2 | |
| 116 | +| | Visual chart type selector (40+ types). Axis/series configuration. Preview with sample data. Annotation support. | | | |
| 117 | +| 2.9 | **Action Editor** | `objectstack.action-editor` | 🟢 P2 | |
| 118 | +| | Configure action type (script/URL/modal/flow/API). Location picker. Confirm/success text. Keyboard shortcut. Visibility conditions. | | | |
| 119 | +| 2.10 | **Theme Editor** | `objectstack.theme-editor` | 🟢 P2 | |
| 120 | +| | Visual color palette picker. Typography controls. Spacing/radius scale. Live preview. Export to theme metadata. | | | |
| 121 | + |
| 122 | +**Deliverable:** Full "App Builder" experience — design complete applications visually. |
| 123 | + |
| 124 | +--- |
| 125 | + |
| 126 | +### Phase 3: Automation Protocol (v2.4) — 4 weeks |
| 127 | + |
| 128 | +> **Theme:** Visual Flow Designer and process automation tools. |
| 129 | +
|
| 130 | +| # | Task | Plugin ID | Priority | |
| 131 | +|---|------|-----------|----------| |
| 132 | +| 3.1 | **Flow Designer** | `objectstack.flow-designer` | 🔴 P0 | |
| 133 | +| | Canvas-based node graph editor (ReactFlow or similar). 16 node types from spec. Edge conditions. Variable panel. Test execution with trace. Version history. | | | |
| 134 | +| 3.2 | **Workflow Rule Builder** | `objectstack.workflow-builder` | 🔴 P0 | |
| 135 | +| | Trigger config (on create/update/delete/schedule). Action builder (field update, email, HTTP, task). Time-dependent trigger scheduling. | | | |
| 136 | +| 3.3 | **Approval Process Designer** | `objectstack.approval-designer` | 🟡 P1 | |
| 137 | +| | Multi-step approval chain visualizer. Approver type selector. Behavior config (first response / unanimous). Action bindings. | | | |
| 138 | +| 3.4 | **State Machine Visualizer** | `objectstack.statemachine-viewer` | 🟡 P1 | |
| 139 | +| | XState-style state diagram rendering. Transition table. Guard conditions. Entry/exit actions. Interactive state simulation. | | | |
| 140 | +| 3.5 | **Webhook Manager** | `objectstack.webhook-manager` | 🟡 P1 | |
| 141 | +| | Outbound webhook config (event triggers, auth, retry policy). Inbound webhook receiver (path routing, verification). Delivery log. | | | |
| 142 | +| 3.6 | **ETL Pipeline Designer** | `objectstack.etl-designer` | 🟢 P2 | |
| 143 | +| | Visual ETL canvas: sources → transformations → destinations. 10 transform types. Schedule config. Incremental sync. Error handling. | | | |
| 144 | +| 3.7 | **Data Sync Manager** | `objectstack.sync-manager` | 🟢 P2 | |
| 145 | +| | Bi-directional sync config. Conflict resolution strategy. Field mapping. Run history. | | | |
| 146 | + |
| 147 | +**Deliverable:** Complete low-code automation suite — build business logic without code. |
| 148 | + |
| 149 | +--- |
| 150 | + |
| 151 | +### Phase 4: Security & Identity (v2.5) — 3 weeks |
| 152 | + |
| 153 | +> **Theme:** Enterprise-grade access control management. |
| 154 | +
|
| 155 | +| # | Task | Plugin ID | Priority | |
| 156 | +|---|------|-----------|----------| |
| 157 | +| 4.1 | **Permission Set Editor** | `objectstack.permission-editor` | 🔴 P0 | |
| 158 | +| | Object permission matrix (CRUD + viewAll/modifyAll). Field-level security toggle per field. System permission checkboxes. | | | |
| 159 | +| 4.2 | **Role Hierarchy Viewer** | `objectstack.role-viewer` | 🟡 P1 | |
| 160 | +| | Tree/org-chart visualization. Drag-and-drop role restructuring. Data visibility rollup preview. | | | |
| 161 | +| 4.3 | **Sharing Rule Builder** | `objectstack.sharing-builder` | 🟡 P1 | |
| 162 | +| | OWD (org-wide default) config per object. Criteria-based sharing rule wizard. Owner-based sharing. | | | |
| 163 | +| 4.4 | **RLS Policy Editor** | `objectstack.rls-editor` | 🟡 P1 | |
| 164 | +| | PostgreSQL-style row-level security. USING/CHECK clause builder. Operation scope selector. Preview effective access. | | | |
| 165 | +| 4.5 | **Identity & User Management** | `objectstack.identity-manager` | 🟢 P2 | |
| 166 | +| | User list, account linking (OAuth/SAML/LDAP), session management. SCIM provisioning config. | | | |
| 167 | +| 4.6 | **Audit Trail Viewer** | `objectstack.audit-viewer` | 🟢 P2 | |
| 168 | +| | Searchable audit log. Filter by user/object/action/date. Field change diff view. Export. | | | |
| 169 | + |
| 170 | +**Deliverable:** Enterprise security management — profiles, permissions, sharing, audit. |
| 171 | + |
| 172 | +--- |
| 173 | + |
| 174 | +### Phase 5: AI & Intelligence (v2.6) — 4 weeks |
| 175 | + |
| 176 | +> **Theme:** AI-native platform capabilities — agents, RAG, NLQ. |
| 177 | +
|
| 178 | +| # | Task | Plugin ID | Priority | |
| 179 | +|---|------|-----------|----------| |
| 180 | +| 5.1 | **Agent Designer** | `objectstack.agent-designer` | 🔴 P0 | |
| 181 | +| | Persona editor (role, instructions). Model selector (provider/model/temperature). Tool binding (actions, flows, queries). Knowledge base config. Test chat interface. | | | |
| 182 | +| 5.2 | **RAG Pipeline Builder** | `objectstack.rag-builder` | 🔴 P0 | |
| 183 | +| | Vector store selector. Embedding model config. Chunking strategy (fixed/semantic/recursive/markdown). Retrieval strategy (similarity/MMR/hybrid). Document loader config. Test retrieval. | | | |
| 184 | +| 5.3 | **Model Registry** | `objectstack.model-registry` | 🟡 P1 | |
| 185 | +| | Provider/model catalog. Pricing display. Capability comparison. Prompt template editor with variable binding. Fallback chain config. Health monitoring. | | | |
| 186 | +| 5.4 | **MCP Server Config** | `objectstack.mcp-config` | 🟡 P1 | |
| 187 | +| | Transport config (stdio/HTTP/WebSocket). Resource definitions. Tool registration. Prompt management. Server capabilities. | | | |
| 188 | +| 5.5 | **NLQ Playground** | `objectstack.nlq-playground` | 🟡 P1 | |
| 189 | +| | Natural language → ObjectQL query tester. Intent detection preview. Entity recognition display. Generated query inspector. Training example management. | | | |
| 190 | +| 5.6 | **AI Orchestration Designer** | `objectstack.ai-orchestration` | 🟢 P2 | |
| 191 | +| | Multi-task AI workflow canvas. Task types (classify/extract/summarize/generate/predict). Trigger binding. Post-processing actions. Execution mode (sequential/parallel). | | | |
| 192 | +| 5.7 | **AI Cost Dashboard** | `objectstack.ai-cost-dashboard` | 🟢 P2 | |
| 193 | +| | Token usage tracking. Cost per model/agent/pipeline. Budget alerts. Usage trend charts. | | | |
| 194 | + |
| 195 | +**Deliverable:** Full AI-native studio — design agents, configure RAG, test NLQ. |
| 196 | + |
| 197 | +--- |
| 198 | + |
| 199 | +### Phase 6: API & Integration (v2.7) — 3 weeks |
| 200 | + |
| 201 | +> **Theme:** API management and enterprise connectivity. |
| 202 | +
|
| 203 | +| # | Task | Plugin ID | Priority | |
| 204 | +|---|------|-----------|----------| |
| 205 | +| 6.1 | **API Endpoint Designer** | `objectstack.api-designer` | 🟡 P1 | |
| 206 | +| | Custom REST/GraphQL endpoint config. Request/response schema. Auth requirements. Rate limiting. | | | |
| 207 | +| 6.2 | **Connector Builder** | `objectstack.connector-builder` | 🟡 P1 | |
| 208 | +| | Enterprise integration wizard. Auth config (OAuth2/SAML/API key). Field mapping (bi-directional). Sync strategy. Conflict resolution. Test connection. | | | |
| 209 | +| 6.3 | **GraphQL Explorer** | `objectstack.graphql-explorer` | 🟢 P2 | |
| 210 | +| | Schema browser. Interactive query builder (like GraphiQL). Type relationships. Real-time testing. | | | |
| 211 | +| 6.4 | **WebSocket / Realtime Config** | `objectstack.realtime-config` | 🟢 P2 | |
| 212 | +| | Channel definitions. Event subscriptions. Authorization. Connection management. Live event monitor. | | | |
| 213 | +| 6.5 | **API Documentation Generator** | `objectstack.api-docs` | 🟢 P2 | |
| 214 | +| | Auto-generated OpenAPI/Swagger from metadata. Interactive docs. Endpoint testing. Client SDK generation. | | | |
| 215 | + |
| 216 | +**Deliverable:** Full API lifecycle management from Studio. |
| 217 | + |
| 218 | +--- |
| 219 | + |
| 220 | +### Phase 7: System & DevOps (v2.8) — 3 weeks |
| 221 | + |
| 222 | +> **Theme:** Operational tooling for production readiness. |
| 223 | +
|
| 224 | +| # | Task | Plugin ID | Priority | |
| 225 | +|---|------|-----------|----------| |
| 226 | +| 7.1 | **Translation Manager** | `objectstack.translation-manager` | 🟡 P1 | |
| 227 | +| | Side-by-side locale editor. Missing translation tracker. Bulk import/export. Auto-translate integration. | | | |
| 228 | +| 7.2 | **Feature Flag Manager** | `objectstack.feature-flags` | 🟡 P1 | |
| 229 | +| | Toggle feature flags. Percentage rollout. User/role targeting. A/B test config. | | | |
| 230 | +| 7.3 | **Job Scheduler** | `objectstack.job-scheduler` | 🟡 P1 | |
| 231 | +| | Background job list. Cron schedule editor. Execution history. Retry config. | | | |
| 232 | +| 7.4 | **Migration Manager** | `objectstack.migration-manager` | 🟡 P1 | |
| 233 | +| | Schema migration timeline. Pending/applied status. Rollback support. Diff preview. | | | |
| 234 | +| 7.5 | **Observability Dashboard** | `objectstack.observability` | 🟢 P2 | |
| 235 | +| | Metrics/tracing/logging aggregation. Request latency. Error rates. Resource usage. | | | |
| 236 | +| 7.6 | **Change Management** | `objectstack.change-management` | 🟢 P2 | |
| 237 | +| | Change sets. Sandbox comparison. Deployment tracking. Rollback. | | | |
| 238 | +| 7.7 | **Notification Config** | `objectstack.notifications` | 🟢 P2 | |
| 239 | +| | Email/push/in-app notification templates. Channel config. Delivery tracking. | | | |
| 240 | + |
| 241 | +**Deliverable:** Production-ready operational tooling. |
| 242 | + |
| 243 | +--- |
| 244 | + |
| 245 | +### Phase 8: Studio Platform Evolution (v3.0) — Ongoing |
| 246 | + |
| 247 | +> **Theme:** Studio becomes a full IDE ecosystem. |
| 248 | +
|
| 249 | +| # | Task | Priority | |
| 250 | +|---|------|----------| |
| 251 | +| 8.1 | **Command Palette** (Ctrl+K) | 🔴 P0 | |
| 252 | +| | Global command search. Keyboard-first navigation. Plugin-contributed commands. Quick actions. | |
| 253 | +| 8.2 | **Multi-Tab Interface** | 🔴 P0 | |
| 254 | +| | Open multiple metadata items simultaneously. Tab management (close/drag/split). Unsaved indicator. | |
| 255 | +| 8.3 | **Code Editor Integration** | 🟡 P1 | |
| 256 | +| | Monaco Editor for raw metadata YAML/JSON/TypeScript editing. Schema-aware autocomplete. Inline Zod validation. | |
| 257 | +| 8.4 | **Version Control UI** | 🟡 P1 | |
| 258 | +| | Git diff viewer for metadata changes. Commit from Studio. Branch switching. Conflict resolution. | |
| 259 | +| 8.5 | **External Plugin Marketplace** | 🟡 P1 | |
| 260 | +| | Browse/install community Studio plugins. Plugin manifest validation. Sandboxed execution. | |
| 261 | +| 8.6 | **Collaborative Editing** | 🟢 P2 | |
| 262 | +| | Real-time multi-user editing (CRDT). Presence indicators. Change attribution. | |
| 263 | +| 8.7 | **Responsive / Mobile Mode** | 🟢 P2 | |
| 264 | +| | Mobile preview mode. Responsive layout testing. Touch-friendly interactions. | |
| 265 | +| 8.8 | **Embedded AI Copilot** | 🟡 P1 | |
| 266 | +| | In-Studio AI assistant. Generate metadata from natural language. Explain configuration. Suggest best practices. | |
| 267 | + |
| 268 | +--- |
| 269 | + |
| 270 | +## 📅 Timeline Summary |
| 271 | + |
| 272 | +``` |
| 273 | +2026 Q1 ──┬── Phase 0: Foundation (v2.1) [2 weeks] |
| 274 | + └── Phase 1: Data Designers (v2.2) [4 weeks] |
| 275 | +
|
| 276 | +2026 Q2 ──┬── Phase 2: UI Designers (v2.3) [6 weeks] |
| 277 | + └── Phase 3: Automation (v2.4) [4 weeks] |
| 278 | +
|
| 279 | +2026 Q3 ──┬── Phase 4: Security (v2.5) [3 weeks] |
| 280 | + ├── Phase 5: AI Studio (v2.6) [4 weeks] |
| 281 | + └── Phase 6: API & Integration (v2.7) [3 weeks] |
| 282 | +
|
| 283 | +2026 Q4 ──┬── Phase 7: System & DevOps (v2.8) [3 weeks] |
| 284 | + └── Phase 8: Platform v3.0 [ongoing] |
| 285 | +``` |
| 286 | + |
| 287 | +--- |
| 288 | + |
| 289 | +## 📐 Architecture Guidelines for New Plugins |
| 290 | + |
| 291 | +Every new Studio plugin MUST follow these patterns: |
| 292 | + |
| 293 | +### 1. File Structure |
| 294 | +``` |
| 295 | +src/plugins/built-in/ |
| 296 | + {name}-plugin.ts # Plugin manifest + activate() |
| 297 | + {name}/ |
| 298 | + {Name}Designer.tsx # Main viewer component (design mode) |
| 299 | + {Name}Preview.tsx # Preview mode component |
| 300 | + {Name}Code.tsx # Raw code/YAML mode |
| 301 | + index.ts # Barrel export |
| 302 | +``` |
| 303 | + |
| 304 | +### 2. Plugin Registration |
| 305 | +```typescript |
| 306 | +export const myPlugin: StudioPlugin = { |
| 307 | + id: 'objectstack.{name}-designer', |
| 308 | + name: '{Name} Designer', |
| 309 | + version: '1.0.0', |
| 310 | + metadataViewers: [{ |
| 311 | + id: 'objectstack.{name}-designer.viewer', |
| 312 | + metadataTypes: ['{type}'], |
| 313 | + modes: ['preview', 'design', 'code'], |
| 314 | + priority: 100, |
| 315 | + }], |
| 316 | + activate(api: StudioPluginAPI) { |
| 317 | + api.registerViewer('objectstack.{name}-designer.viewer', {Name}Designer); |
| 318 | + }, |
| 319 | +}; |
| 320 | +``` |
| 321 | + |
| 322 | +### 3. Data Access |
| 323 | +- Use `useClient()` hook from `@objectstack/client-react` |
| 324 | +- All API calls through the client — never bypass to fetch directly |
| 325 | +- Handle loading/error/empty states consistently |
| 326 | + |
| 327 | +### 4. Testing |
| 328 | +- Component tests with React Testing Library |
| 329 | +- Integration tests via `simulateBrowser()` harness |
| 330 | +- Plugin registration/activation tests |
| 331 | + |
| 332 | +--- |
| 333 | + |
| 334 | +## 🎯 Success Metrics |
| 335 | + |
| 336 | +| Metric | Current | Phase 2 Target | v3.0 Target | |
| 337 | +|--------|---------|----------------|-------------| |
| 338 | +| Metadata types with dedicated viewer | 1 / 30+ | 15 / 30+ | 30+ / 30+ | |
| 339 | +| Component test coverage | 0% | 50% | 80% | |
| 340 | +| Deep-linkable views | 0 | All | All | |
| 341 | +| Plugin count (built-in) | 7 | 20 | 35+ | |
| 342 | +| Time to build a complete app (from scratch) | N/A (manual JSON) | 30 min | 10 min | |
0 commit comments