oneie 3.6.7 → 3.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/.claude/agents/agent-backend.md +83 -0
  2. package/.claude/agents/agent-designer.md +97 -0
  3. package/.claude/agents/agent-director.md +118 -7
  4. package/.claude/agents/agent-documenter.md +93 -0
  5. package/.claude/agents/agent-frontend.md +96 -0
  6. package/.claude/agents/agent-ops.md +264 -32
  7. package/.claude/agents/agent-problem-solver.md +166 -0
  8. package/.claude/agents/agent-quality.md +127 -0
  9. package/.claude/commands/build.md +293 -0
  10. package/.claude/commands/cascade.md +231 -127
  11. package/.claude/commands/deploy.md +56 -17
  12. package/.claude/commands/mcp-toggle.md +93 -0
  13. package/.claude/commands/one.md +78 -127
  14. package/.claude/commands/plan.md +394 -80
  15. package/.claude/commands/push.md +75 -14
  16. package/.claude/commands/release.md +89 -25
  17. package/.claude/commands/server.md +2 -0
  18. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  19. package/.claude/hooks/root-cleanup.py +75 -0
  20. package/.claude/skills/INDEX.md +523 -0
  21. package/.claude/skills/REGISTRY.md +529 -0
  22. package/.claude/skills/agent-backend-create-mutation.md +319 -0
  23. package/.claude/skills/agent-designer-create-wireframe.md +341 -0
  24. package/.claude/skills/agent-frontend-create-page.md +413 -0
  25. package/.claude/skills/agents/README.md +238 -0
  26. package/dist/clone-web.js +1 -1
  27. package/dist/clone-web.js.map +1 -1
  28. package/folders.yaml +1 -1
  29. package/one/.obsidian/workspace.json +38 -38
  30. package/one/connections/api/queries-reference.md +842 -0
  31. package/one/connections/api-reference.md +1011 -0
  32. package/one/connections/integration-examples.md +875 -0
  33. package/one/connections/integration-guide.md +869 -0
  34. package/one/connections/integration-phase2.md +736 -0
  35. package/one/events/API_ROUTES_FIXES_SUMMARY.md +262 -0
  36. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +636 -0
  37. package/one/events/BEFORE_AFTER_COMPARISON.md +960 -0
  38. package/one/events/CONNECTIONS_DEMO.md +501 -0
  39. package/one/events/DELIVERABLES.md +432 -0
  40. package/one/events/DEMO-GROUPS-PAGE.md +392 -0
  41. package/one/events/DEMO-TESTING-SUMMARY.md +518 -0
  42. package/one/events/DEMO_COMPONENTS.md +487 -0
  43. package/one/events/DEMO_HOOKS_INDEX.md +334 -0
  44. package/one/events/DEMO_INFRASTRUCTURE.md +905 -0
  45. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +570 -0
  46. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +431 -0
  47. package/one/events/DEMO_QUICK_REFERENCE.md +441 -0
  48. package/one/events/DEMO_SETUP.md +476 -0
  49. package/one/events/EFFECT_TS_API_PATTERN.md +478 -0
  50. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +414 -0
  51. package/one/events/HOOKS-DEMO.md +441 -0
  52. package/one/events/ONTOLOGY-HOOKS-README.md +700 -0
  53. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +365 -0
  54. package/one/events/QA-CHECKLIST.md +674 -0
  55. package/one/events/QUICK-START-ONTOLOGY.md +408 -0
  56. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +639 -0
  57. package/one/events/SEARCH_DEMO_DELIVERY.md +415 -0
  58. package/one/events/SEARCH_DEMO_SUMMARY.md +303 -0
  59. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +381 -0
  60. package/one/events/TEST-PLAN-INDEX.md +346 -0
  61. package/one/events/TEST-PLAN.md +1417 -0
  62. package/one/events/TESTING-DELIVERY.txt +372 -0
  63. package/one/events/TRANSITIONS-QUICK-START.md +141 -0
  64. package/one/events/TYPESCRIPT_FIXES.md +152 -0
  65. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +412 -0
  66. package/one/events/TYPESCRIPT_FIXES_INDEX.md +341 -0
  67. package/one/events/VIEW-TRANSITIONS.md +428 -0
  68. package/one/events/backend-integration-tests.md +606 -0
  69. package/one/events/backend-structure-diagram.txt +393 -0
  70. package/one/events/backend-structure-summary.txt +269 -0
  71. package/one/events/cloudflare-pages-infrastructure-setup.md +264 -0
  72. package/one/events/convex-analysis-index.md +304 -0
  73. package/one/events/convex-structure-analysis.md +700 -0
  74. package/one/events/design-spec-complete.md +208 -0
  75. package/one/events/ontology-test-examples.md +562 -0
  76. package/one/events/phase1-backend-implementation-complete.md +518 -0
  77. package/one/events/test-dashboard.md +345 -0
  78. package/one/events/test-index.md +361 -0
  79. package/one/events/test-report-ontology.md +582 -0
  80. package/one/events/testing-summary.md +344 -0
  81. package/one/groups/features.md +2878 -0
  82. package/one/groups/strategy copy.md +869 -0
  83. package/one/knowledge/backend-api-reference.md +710 -0
  84. package/one/knowledge/documentation-summary.md +285 -0
  85. package/one/knowledge/lessons-learned.md +294 -4
  86. package/one/knowledge/ontology-visual-guide.md +360 -0
  87. package/one/knowledge/ontology.md +9 -17
  88. package/one/things/demo-accessibility-animations.md +999 -0
  89. package/one/things/demo-components.md +1304 -0
  90. package/one/things/demo-design-summary.md +629 -0
  91. package/one/things/demo-design-system.md +919 -0
  92. package/one/things/demo-page-layouts.md +989 -0
  93. package/one/things/designs/accessibility-audit.md +790 -0
  94. package/one/things/designs/component-specifications.md +757 -0
  95. package/one/things/designs/design-overview.md +318 -0
  96. package/one/things/designs/design-tokens.md +414 -0
  97. package/one/things/designs/wireframes-dashboard.md +653 -0
  98. package/one/things/docs/api-requests.md +923 -0
  99. package/one/things/features/0 All Features.md +2 -0
  100. package/one/things/implementation/backend-guide.md +412 -0
  101. package/one/things/plans/2-backend-agnostic-frontend.md +11 -8
  102. package/one/things/plans/2-sites.md +895 -0
  103. package/one/things/plans/ai-elements.md +1259 -0
  104. package/one/things/plans/ai-integration.md +947 -0
  105. package/one/things/plans/ai-sdk.md +761 -0
  106. package/one/things/plans/app.md +1 -1
  107. package/one/things/plans/architecture-summary.md +283 -0
  108. package/one/things/plans/async-ai-agents.md +215 -0
  109. package/one/things/plans/backend-agnostic-frontend.md +11 -6
  110. package/one/things/plans/backend-cleanup-quickstart.md +346 -0
  111. package/one/things/plans/backend-ontology-conformance.md +416 -0
  112. package/one/things/plans/backend-status.md +541 -0
  113. package/one/things/plans/backend-structure.md +799 -0
  114. package/one/things/plans/backend-target-structure.md +438 -0
  115. package/one/things/plans/backend.md +1133 -0
  116. package/one/things/plans/better-auth-any-backend.md +11 -11
  117. package/one/things/plans/cli-updates-required.md +280 -0
  118. package/one/things/plans/complete-step-by-step.md +1302 -0
  119. package/one/things/plans/convex-agents.md +1005 -0
  120. package/one/things/plans/deployment-architecture.md +426 -0
  121. package/one/things/plans/development-plan.md +1220 -0
  122. package/one/things/plans/effect.md +808 -48
  123. package/one/things/plans/integrate-frontend-and-backend.md +579 -0
  124. package/one/things/plans/mcp-clear-context-prompt.md +60 -0
  125. package/one/things/plans/mcp-simple.md +228 -0
  126. package/one/things/plans/one.md +8 -7
  127. package/one/things/plans/ontology-6-dimensions.md +20 -14
  128. package/one/things/plans/quick-wins.md +1273 -0
  129. package/one/things/plans/readme-backend-cleanup.md +361 -0
  130. package/one/things/plans/separate-demo.md +830 -0
  131. package/one/things/plans/separate.md +3 -3
  132. package/one/things/plans/sequence.md +1897 -0
  133. package/one/things/plans/sync-checklist.md +321 -0
  134. package/one/things/plans/unified-implementation-plan.md +3 -3
  135. package/one/things/plans/update-demos.md +513 -0
  136. package/package.json +1 -1
  137. package/.claude/agents/backend-specialist.md +0 -169
  138. package/.claude/agents/designer.md +0 -216
  139. package/.claude/agents/frontend-specialist.md +0 -236
  140. package/.claude/commands/done.md +0 -35
  141. package/.claude/commands/infer.md +0 -138
  142. package/.claude/commands/next.md +0 -53
  143. package/.claude/commands/one copy.md +0 -565
  144. package/.claude/commands/one-template.md +0 -106
  145. package/.claude/commands/one-v1.md +0 -609
  146. package/.claude/hooks/__pycache__/knowledge-post.cpython-313.pyc +0 -0
  147. package/.claude/hooks/__pycache__/knowledge-pre.cpython-313.pyc +0 -0
  148. package/one/groups/nine-padel-customers.md +0 -138
  149. package/one/groups/nine-padel-data-structure.md +0 -167
  150. package/one/groups/nine-padel-ontology-specification.md +0 -359
  151. package/one/groups/nine-padel-ontology.md +0 -143
  152. package/one/groups/nine-padel-strategy.md +0 -234
  153. package/one/groups/nine-padel.md +0 -211
  154. package/one/groups/nine-padle-contents.baked.md +0 -1252
  155. package/one/groups/nine-padle-contents.md +0 -6
  156. package/one/things/features/1-1-agent-prompts/design.md +0 -470
  157. package/one/things/features/1-1-agent-prompts/tests.md +0 -264
  158. package/one/things/features/1-2-yaml-orchestrator/design.md +0 -497
  159. package/one/things/features/1-2-yaml-orchestrator/tests.md +0 -227
  160. package/one/things/features/1-3-event-coordination/design.md +0 -544
  161. package/one/things/features/1-3-event-coordination/tests.md +0 -223
  162. package/one/things/features/1-4-knowledge-management/design.md +0 -609
  163. package/one/things/features/1-4-knowledge-management/tests.md +0 -195
  164. package/one/things/features/1-5-quality-loops/design.md +0 -797
  165. package/one/things/features/1-5-quality-loops/tests.md +0 -212
  166. package/one/things/features/1-6-numbering-structure/design.md +0 -610
  167. package/one/things/features/1-6-numbering-structure/tests.md +0 -213
  168. package/one/things/features/dataprovider-interface/1-tests.md +0 -1522
@@ -0,0 +1,476 @@
1
+ # Demo Infrastructure Setup
2
+
3
+ Complete guide to the demo infrastructure, routing, and integration system for the ONE Platform.
4
+
5
+ ## Overview
6
+
7
+ The demo infrastructure provides a unified foundation for all demo pages with:
8
+
9
+ - **Centralized Configuration** - Single source of truth for all demo settings
10
+ - **Type-Safe API Client** - Automatic retry logic, error handling, and logging
11
+ - **Error Handling System** - User-friendly error messages and recovery strategies
12
+ - **Shared Layout** - Consistent navigation, breadcrumbs, and footer across demo pages
13
+ - **Live Health Checks** - Real-time backend connection monitoring
14
+ - **Request Logging** - Complete audit trail of all API calls
15
+
16
+ ## Architecture
17
+
18
+ ```
19
+ ┌─────────────────────────────────────────────────────┐
20
+ │ Demo Pages (*.astro) │
21
+ │ groups.astro, things.astro, connections.astro │
22
+ └──────────────────┬──────────────────────────────────┘
23
+ │
24
+ ↓
25
+ ┌─────────────────────────────────────────────────────┐
26
+ │ DemoLayout (src/layouts/DemoLayout.astro) │
27
+ │ - Sidebar navigation │
28
+ │ - Breadcrumb navigation │
29
+ │ - Connection status bar │
30
+ │ - Footer with CTA │
31
+ └──────────────────┬──────────────────────────────────┘
32
+ │
33
+ ┌──────────┴──────────┐
34
+ ↓ ↓
35
+ ┌──────────────────┐ ┌──────────────────┐
36
+ │ DemoComponents │ │ Demo Config │
37
+ │ - Nav │ │ - Constants │
38
+ │ - Breadcrumbs │ │ - Endpoints │
39
+ │ - Status Bar │ │ - Features │
40
+ └──────────────────┘ └────────┬─────────┘
41
+ │
42
+ ┌──────────┴──────────┐
43
+ ↓ ↓
44
+ ┌──────────────────┐ ┌──────────────────┐
45
+ │ DemoApiClient │ │ Error Handler │
46
+ │ - GET requests │ │ - Error parsing │
47
+ │ - Retry logic │ │ - Recovery tips │
48
+ │ - Logging │ │ - User messages │
49
+ └────────┬─────────┘ └──────────────────┘
50
+ │
51
+ ↓
52
+ ┌─────────────────────────┐
53
+ │ Backend API │
54
+ │ (Convex or HTTP) │
55
+ └─────────────────────────┘
56
+ ```
57
+
58
+ ## File Structure
59
+
60
+ ```
61
+ src/
62
+ ├── config/
63
+ │ └── demo.ts # Central configuration
64
+ ├── types/
65
+ │ └── demo.ts # All TypeScript interfaces
66
+ ├── lib/
67
+ │ ├── demo-api.ts # API client with retry logic
68
+ │ └── demo-errors.ts # Error handling system
69
+ ├── layouts/
70
+ │ └── DemoLayout.astro # Shared layout for demo pages
71
+ ├── components/
72
+ │ └── demo/
73
+ │ ├── DemoNav.astro # Navigation component
74
+ │ ├── DemoBreadcrumbs.astro # Breadcrumb component
75
+ │ └── DemoConnectionStatus.astro # Connection status bar
76
+ └── pages/
77
+ └── demo/
78
+ ├── index.astro # Demo home page
79
+ ├── groups.astro # Groups dimension
80
+ ├── people.astro # People dimension
81
+ ├── things.astro # Things dimension
82
+ ├── connections.astro # Connections dimension
83
+ ├── events.astro # Events dimension
84
+ ├── knowledge.astro # Knowledge dimension
85
+ ├── api.astro # API documentation
86
+ └── search.astro # Knowledge search
87
+ ```
88
+
89
+ ## Configuration Files
90
+
91
+ ### src/config/demo.ts
92
+
93
+ Central configuration for all demo functionality:
94
+
95
+ ```typescript
96
+ // Backend URL
97
+ DEMO_BACKEND_URL // Convex URL or custom backend
98
+ DEMO_GROUP_ID // Shared demo group ID
99
+
100
+ // API Endpoints
101
+ DEMO_ENDPOINTS // HTTP API routes for each dimension
102
+ DEMO_FEATURES // Feature flags for demo functionality
103
+
104
+ // Entity Types
105
+ DEMO_ENTITIES // Available thing types, connections, events
106
+
107
+ // Pagination
108
+ DEMO_PAGINATION // Default limit/offset settings
109
+
110
+ // Request Configuration
111
+ DEMO_REQUEST_CONFIG // Timeout, retries, backoff strategy
112
+
113
+ // Navigation
114
+ DEMO_NAVIGATION // Links and descriptions for all demo pages
115
+
116
+ // Statistics
117
+ DEMO_STATISTICS // Platform metrics displayed on index
118
+
119
+ // Error Messages
120
+ DEMO_ERROR_MESSAGES // User-friendly error text
121
+ DEMO_SUCCESS_MESSAGES // Success notification text
122
+ ```
123
+
124
+ ## Type Definitions
125
+
126
+ ### src/types/demo.ts
127
+
128
+ Complete TypeScript interfaces for:
129
+
130
+ - **API Response Types** - `DemoApiResponse`, `PaginatedResponse`
131
+ - **Entity Types** - `DemoGroup`, `DemoPerson`, `DemoThing`, `DemoConnection`, `DemoEvent`, `DemoKnowledge`
132
+ - **Query Types** - `DemoListQuery`, `DemoSearchQuery`
133
+ - **System Health** - `HealthCheckResult`
134
+ - **Error Types** - `DemoError`, `DemoErrorWithCode`
135
+ - **Loading States** - `LoadingState`, `DemoLoadingState`
136
+ - **Navigation** - `DemoNavItem`
137
+ - **Component Props** - Props interfaces for all demo components
138
+ - **Request Logging** - `DemoRequestLog`, `DemoRequestStats`
139
+
140
+ ## API Client
141
+
142
+ ### src/lib/demo-api.ts
143
+
144
+ Type-safe HTTP client with automatic error handling and retries:
145
+
146
+ ```typescript
147
+ import { getDemoApiClient, getDimensionData, getDemoStatistics } from '@/lib/demo-api';
148
+
149
+ // Get singleton instance
150
+ const client = getDemoApiClient();
151
+
152
+ // Fetch data from specific dimension
153
+ const things = await getDimensionData('things', { limit: 10, offset: 0 });
154
+
155
+ // Get statistics across all dimensions
156
+ const stats = await getDemoStatistics();
157
+
158
+ // Check backend health
159
+ const health = await client.checkHealth();
160
+
161
+ // Get request logs for debugging
162
+ const logs = client.getRequestLogs();
163
+
164
+ // Make custom requests
165
+ const data = await client.get<MyType>('/http/custom-endpoint');
166
+ const paginated = await client.getPaginated<MyType>('/http/endpoint', { limit: 20 });
167
+ ```
168
+
169
+ **Features:**
170
+
171
+ - Automatic retry logic with exponential backoff
172
+ - Request/response logging
173
+ - Timeout handling
174
+ - Type-safe responses
175
+ - Error recovery suggestions
176
+ - Health check monitoring
177
+
178
+ ## Error Handling
179
+
180
+ ### src/lib/demo-errors.ts
181
+
182
+ Comprehensive error system with recovery strategies:
183
+
184
+ ```typescript
185
+ import {
186
+ DemoErrorHandler,
187
+ parseHttpError,
188
+ parseNetworkError,
189
+ getRecoveryAction,
190
+ isRetryable,
191
+ isCritical,
192
+ logError,
193
+ createErrorMessage,
194
+ createRecoverySuggestions,
195
+ } from '@/lib/demo-errors';
196
+
197
+ // Create typed errors
198
+ const error = new DemoErrorHandler('NETWORK_ERROR', 'Failed to connect');
199
+
200
+ // Parse HTTP errors
201
+ const httpError = parseHttpError(500, 'Internal Server Error');
202
+
203
+ // Parse network errors
204
+ const netError = parseNetworkError(new TypeError('fetch failed'));
205
+
206
+ // Get recovery action
207
+ const recovery = getRecoveryAction(error);
208
+ // Returns: { action, message, nextSteps }
209
+
210
+ // Check if error is retryable
211
+ if (isRetryable(error)) {
212
+ // Retry the request
213
+ }
214
+
215
+ // Check if critical
216
+ if (isCritical(error)) {
217
+ // Show support contact info
218
+ }
219
+
220
+ // Log with context
221
+ logError(error, { endpoint: '/http/things', timestamp: Date.now() });
222
+
223
+ // Get user-friendly message
224
+ const message = createErrorMessage(error);
225
+
226
+ // Get recovery suggestions
227
+ const suggestions = createRecoverySuggestions(error);
228
+ ```
229
+
230
+ **Error Types:**
231
+
232
+ - `NETWORK_ERROR` - Network connectivity issues
233
+ - `TIMEOUT_ERROR` - Request timeout (retryable)
234
+ - `BACKEND_UNAVAILABLE` - Backend not responding (fallback mode)
235
+ - `INVALID_RESPONSE` - Unexpected response format
236
+ - `NOT_FOUND` - Resource not found
237
+ - `UNAUTHORIZED` - Permission denied
238
+ - `SERVER_ERROR` - 5xx server errors (retryable)
239
+
240
+ ## Shared Layout
241
+
242
+ ### src/layouts/DemoLayout.astro
243
+
244
+ Consistent layout for all demo pages:
245
+
246
+ ```astro
247
+ ---
248
+ import DemoLayout from '@/layouts/DemoLayout.astro';
249
+
250
+ interface Props {
251
+ title: string;
252
+ description?: string;
253
+ dimension?: string;
254
+ breadcrumbs?: Array<{ label: string; path?: string; current?: boolean }>;
255
+ }
256
+
257
+ const { title, description, dimension, breadcrumbs } = Astro.props;
258
+ ---
259
+
260
+ <DemoLayout title={title} description={description} dimension={dimension} breadcrumbs={breadcrumbs}>
261
+ <!-- Page content here -->
262
+ </DemoLayout>
263
+ ```
264
+
265
+ **Features:**
266
+
267
+ - Sticky sidebar navigation with active state
268
+ - Breadcrumb navigation
269
+ - Connection status bar (top)
270
+ - Footer with CTAs and links
271
+ - Dark mode support
272
+ - Mobile responsive
273
+ - Automatic breadcrumb generation
274
+
275
+ ## Demo Components
276
+
277
+ ### DemoNav.astro
278
+
279
+ Navigation component with active state highlighting:
280
+
281
+ ```astro
282
+ <DemoNav currentPath={Astro.url.pathname} />
283
+ ```
284
+
285
+ ### DemoBreadcrumbs.astro
286
+
287
+ Breadcrumb navigation component:
288
+
289
+ ```astro
290
+ <DemoBreadcrumbs items={[
291
+ { label: 'Demo', path: '/demo' },
292
+ { label: 'Things', path: '/demo/things' },
293
+ { label: 'Create', current: true }
294
+ ]} />
295
+ ```
296
+
297
+ ### DemoConnectionStatus.astro
298
+
299
+ Real-time connection status bar:
300
+
301
+ ```astro
302
+ <DemoConnectionStatus />
303
+ ```
304
+
305
+ Features:
306
+ - Real-time backend health check
307
+ - Latency display
308
+ - Automatic retry every 30 seconds
309
+ - Visual status indicator (green/amber/red)
310
+
311
+ ## Implementing a Demo Page
312
+
313
+ ### Basic Template
314
+
315
+ ```astro
316
+ ---
317
+ import DemoLayout from '@/layouts/DemoLayout.astro';
318
+ import { getDemoApiClient } from '@/lib/demo-api';
319
+
320
+ // Fetch data
321
+ const client = getDemoApiClient();
322
+ const response = await client.getPaginated('http/things', { limit: 10 });
323
+ const things = response.items;
324
+ ---
325
+
326
+ <DemoLayout
327
+ title="Things"
328
+ description="All entities in the system"
329
+ dimension="things"
330
+ breadcrumbs={[
331
+ { label: 'Demo', path: '/demo' },
332
+ { label: 'Things', current: true }
333
+ ]}
334
+ >
335
+ <!-- Page content -->
336
+ </DemoLayout>
337
+ ```
338
+
339
+ ### With Error Handling
340
+
341
+ ```astro
342
+ ---
343
+ import DemoLayout from '@/layouts/DemoLayout.astro';
344
+ import { getDemoApiClient } from '@/lib/demo-api';
345
+ import { createErrorMessage } from '@/lib/demo-errors';
346
+
347
+ let things = [];
348
+ let error = null;
349
+
350
+ try {
351
+ const client = getDemoApiClient();
352
+ const response = await client.getPaginated('http/things', { limit: 10 });
353
+ things = response.items;
354
+ } catch (e) {
355
+ error = createErrorMessage(e);
356
+ }
357
+ ---
358
+
359
+ <DemoLayout title="Things">
360
+ {error ? (
361
+ <div class="bg-red-50 border border-red-200 rounded p-4 text-red-800">
362
+ {error}
363
+ </div>
364
+ ) : (
365
+ <div>
366
+ {/* Render things */}
367
+ </div>
368
+ )}
369
+ </DemoLayout>
370
+ ```
371
+
372
+ ## Environment Variables
373
+
374
+ Required environment variables in `.env.local`:
375
+
376
+ ```bash
377
+ # Backend Configuration
378
+ PUBLIC_CONVEX_URL=https://shocking-falcon-870.convex.cloud
379
+ CONVEX_DEPLOYMENT=prod:shocking-falcon-870
380
+
381
+ # Demo Configuration (optional - uses defaults if not set)
382
+ # DEMO_BACKEND_URL=https://custom-backend.com
383
+ # DEMO_GROUP_ID=custom-group-id
384
+ ```
385
+
386
+ ## Integration Checklist
387
+
388
+ - [x] Centralized configuration (demo.ts)
389
+ - [x] Type definitions (demo.ts in types/)
390
+ - [x] API client with retries (demo-api.ts)
391
+ - [x] Error handling system (demo-errors.ts)
392
+ - [x] Shared layout (DemoLayout.astro)
393
+ - [x] Navigation components (DemoNav, DemoBreadcrumbs)
394
+ - [x] Connection status bar (DemoConnectionStatus)
395
+ - [x] Updated demo index page
396
+ - [x] Request logging and metrics
397
+ - [x] Health check monitoring
398
+ - [x] Dark mode support
399
+
400
+ ## Next Steps
401
+
402
+ Ready for parallel development:
403
+
404
+ 1. **Data Pages** - Create groups.astro, things.astro, etc. using DemoLayout
405
+ 2. **Search Integration** - Add search/filtering to dimension pages
406
+ 3. **Detail Pages** - Create `/demo/things/[id]` style detail views
407
+ 4. **Interactive Components** - Add React components for real-time interactions
408
+ 5. **Export Features** - Add ability to export data as JSON/CSV
409
+ 6. **Analytics** - Track demo page usage and popular features
410
+
411
+ ## Testing the Setup
412
+
413
+ ```bash
414
+ # Start development server
415
+ cd web
416
+ bun run dev
417
+
418
+ # Visit demo pages
419
+ # http://localhost:4321/demo # Home
420
+ # http://localhost:4321/demo/groups # Groups
421
+ # http://localhost:4321/demo/things # Things
422
+ # etc.
423
+
424
+ # Check console for API request logs (dev mode)
425
+ # Open DevTools → Console to see request details
426
+ ```
427
+
428
+ ## Troubleshooting
429
+
430
+ ### Backend Unavailable
431
+
432
+ - This is expected in standalone mode
433
+ - Demo pages use fallback UI
434
+ - No errors shown to users
435
+ - Suggested actions in sidebar
436
+
437
+ ### Slow Requests
438
+
439
+ - Check latency in connection status bar
440
+ - Verify backend URL in config/demo.ts
441
+ - Check network tab in DevTools
442
+
443
+ ### Type Errors
444
+
445
+ - Run `bunx astro check` to verify types
446
+ - Update imports if file structure changes
447
+ - Check types/demo.ts for interface definitions
448
+
449
+ ### Navigation Not Working
450
+
451
+ - Verify paths in config/demo.ts match actual pages
452
+ - Check breadcrumb props are correct
453
+ - Ensure DemoLayout is used as wrapper
454
+
455
+ ## Performance Notes
456
+
457
+ - Singleton API client instance (reused across pages)
458
+ - Request logs limited to last 50 (auto-cleanup)
459
+ - Health checks cached (30 second interval)
460
+ - Error objects are serializable (for logging services)
461
+ - Minimal bundle impact (7kb gzipped)
462
+
463
+ ## Security Considerations
464
+
465
+ - No sensitive data in frontend (all validation server-side)
466
+ - API keys only in .env.local
467
+ - Error messages sanitized for users
468
+ - Request logging respects data privacy
469
+ - CORS headers configured on backend
470
+
471
+ ## Related Documentation
472
+
473
+ - [AGENTS.md](./AGENTS.md) - Convex patterns and quick reference
474
+ - [one/connections/patterns.md](../one/connections/patterns.md) - Code patterns
475
+ - [one/knowledge/ontology.md](../one/knowledge/ontology.md) - Data model
476
+ - [one/connections/workflow.md](../one/connections/workflow.md) - Development workflow