diff --git a/src/app/demo/demo-content.tsx b/src/app/demo/demo-content.tsx new file mode 100644 index 0000000..8442b95 --- /dev/null +++ b/src/app/demo/demo-content.tsx @@ -0,0 +1,888 @@ +'use client' + +import Link from 'next/link' +import { useState, useMemo, useCallback } from 'react' +import { useDemoSync, type DemoShape } from '@/lib/demo-sync' + +/* --- Types -------------------------------------------------------------- */ + +interface NotebookData { + notebookTitle: string + description: string + noteCount: number + collaborators: string[] +} + +interface NoteData { + noteTitle: string + content: string + tags: string[] + editor: string + editedAt: string +} + +interface PackingItem { + name: string + packed: boolean + category: string +} + +interface PackingListData { + listTitle: string + items: PackingItem[] +} + +/* --- Markdown Renderer -------------------------------------------------- */ + +function RenderMarkdown({ content }: { content: string }) { + const lines = content.split('\n') + const elements: React.ReactNode[] = [] + let i = 0 + + while (i < lines.length) { + const line = lines[i] + + // Heading 3 + if (line.startsWith('### ')) { + elements.push( +
{renderInline(line.slice(2))}
+
+ {codeLines.join('\n')}
+
+ + {renderInline(line)} +
+ ) + i++ + } + + return
+ {codeMatch[2]}
+
+ )
+ remaining = codeMatch[3]
+ continue
+ }
+
+ // No more inline formatting
+ parts.push({remaining})
+ break
+ }
+
+ return <>{parts}>
+}
+
+/* --- Editor Colors ------------------------------------------------------ */
+
+const EDITOR_COLORS: Record{note.content.slice(0, 150)}...
+ )} + + {/* Expanded content */} + {expanded && ( ++ {packedCount} of {totalItems} items packed +
++ {notebook?.description || 'A collaborative knowledge base for your team'} +
++ This demo shows a Trip Planning Notebook scenario + with notes, a packing list, tags, and canvas sync -- all powered by the{' '} + r* ecosystem with live data from{' '} + rSpace. +
+ +{notebook?.description || 'Loading notebook data...'}
+No notes found. Try resetting the demo.
+{feature.desc}
++ rNotes gives your team a shared knowledge base with rich editing, flexible organization, + and deep integration with the r* ecosystem -- all on a collaborative canvas. +
+ + Start Taking Notes + +- Last updated by Maya on Feb 15, 2026 -
-- Key Decision: We are adopting an event-driven microservices architecture with a shared message bus (NATS) for inter-service communication. -
-- All services are containerized and orchestrated via Docker Compose in development, with Kubernetes for production. -
-
-{`services:
- api-gateway:
- image: alpha/gateway:latest
- ports: ["8080:8080"]
- depends_on: [auth, content, search]
-
- auth:
- image: alpha/auth:latest
- environment:
- JWT_SECRET: \${JWT_SECRET}
- OAUTH_GITHUB_ID: \${GITHUB_ID}
-
- content:
- image: alpha/content:latest
- volumes: ["./data:/app/data"]
-
- search:
- image: meilisearch/meilisearch:v1.6
- environment:
- MEILI_MASTER_KEY: \${SEARCH_KEY}`}
-
- - Client requests hit the API gateway, which routes to the appropriate service. All mutations publish events to NATS, which the search service consumes for real-time index updates. -
-{note.preview}
- )} - - {/* Expanded content */} - {note.expanded &&- A collaborative knowledge base for your team -
-- This demo shows a Team Knowledge Base scenario - with notebooks, rich notes, tags, and canvas sync -- all powered by the{' '} - r* ecosystem. -
-{notebook.description}
-{feature.desc}
-- rNotes gives your team a shared knowledge base with rich editing, flexible organization, - and deep integration with the r* ecosystem -- all on a collaborative canvas. -
- - Start Taking Notes - -