Skip to content

Commit 0ad1cce

Browse files
backnotpropclaude
andcommitted
chore: move demo diagram sections below SQL code block
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9a23c24 commit 0ad1cce

1 file changed

Lines changed: 37 additions & 37 deletions

File tree

packages/editor/App.tsx

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -60,43 +60,6 @@ const PLAN_CONTENT = `# Implementation Plan: Real-time Collaboration
6060
## Overview
6161
Add real-time collaboration features to the editor using **[WebSocket API](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)** and *[operational transforms](https://en.wikipedia.org/wiki/Operational_transformation)*.
6262
63-
### Architecture
64-
65-
\`\`\`mermaid
66-
flowchart LR
67-
subgraph Client["Client Browser"]
68-
UI[React UI] --> OT[OT Engine]
69-
OT <--> WS[WebSocket Client]
70-
end
71-
72-
subgraph Server["Backend"]
73-
WSS[WebSocket Server] <--> OTS[OT Transform]
74-
OTS <--> DB[(PostgreSQL)]
75-
end
76-
77-
WS <--> WSS
78-
\`\`\`
79-
80-
### Service Dependencies (Graphviz)
81-
82-
\`\`\`graphviz
83-
digraph CollaborationStack {
84-
rankdir=LR;
85-
node [shape=box, style="rounded"];
86-
87-
Browser [label="Client Browser"];
88-
API [label="WebSocket API"];
89-
OT [label="OT Engine"];
90-
Redis [label="Presence Cache"];
91-
Postgres [label="PostgreSQL"];
92-
93-
Browser -> API;
94-
API -> OT;
95-
OT -> Redis;
96-
OT -> Postgres;
97-
}
98-
\`\`\`
99-
10063
## Phase 1: Infrastructure
10164
10265
### WebSocket Server
@@ -152,6 +115,43 @@ CREATE TABLE collaborators (
152115
CREATE INDEX idx_collaborators_document ON collaborators(document_id);
153116
\`\`\`
154117
118+
### Architecture
119+
120+
\`\`\`mermaid
121+
flowchart LR
122+
subgraph Client["Client Browser"]
123+
UI[React UI] --> OT[OT Engine]
124+
OT <--> WS[WebSocket Client]
125+
end
126+
127+
subgraph Server["Backend"]
128+
WSS[WebSocket Server] <--> OTS[OT Transform]
129+
OTS <--> DB[(PostgreSQL)]
130+
end
131+
132+
WS <--> WSS
133+
\`\`\`
134+
135+
### Service Dependencies (Graphviz)
136+
137+
\`\`\`graphviz
138+
digraph CollaborationStack {
139+
rankdir=LR;
140+
node [shape=box, style="rounded"];
141+
142+
Browser [label="Client Browser"];
143+
API [label="WebSocket API"];
144+
OT [label="OT Engine"];
145+
Redis [label="Presence Cache"];
146+
Postgres [label="PostgreSQL"];
147+
148+
Browser -> API;
149+
API -> OT;
150+
OT -> Redis;
151+
OT -> Postgres;
152+
}
153+
\`\`\`
154+
155155
## Phase 2: Operational Transforms
156156
157157
> The key insight is that we need to transform operations against concurrent operations to maintain consistency.

0 commit comments

Comments
 (0)