Skip to content

Commit b77b5b2

Browse files
hackerwinsclaude
andauthored
Add ProseMirror SDK guide (#294)
* Consolidate SDK pages under a single "SDKs" navigation group Move JS SDK, React, iOS SDK, and Android SDK docs into docs/sdks/ with a new group landing page and ProseMirror placeholder. Update all internal links across 27 files to reflect the new paths. * Update footer and mobile nav to link to SDKs group page Change "JS SDK" link to "SDKs" pointing to /docs/sdks in both the footer and mobile navigation dropdown. * Add ProseMirror SDK guide with full documentation Cover installation, quick start, configuration, mark mapping, remote cursors, sync internals, and lower-level utilities for the @yorkie-js/prosemirror package. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c0866b1 commit b77b5b2

30 files changed

+405
-96
lines changed

components/Layout/Footer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export function Footer({ shortFooter }: { shortFooter?: boolean }): ReactElement
8080
</Link>
8181
</li>
8282
<li className="site_item">
83-
<Link href="/docs/js-sdk" className="link">
84-
JS SDK
83+
<Link href="/docs/sdks" className="link">
84+
SDKs
8585
</Link>
8686
</li>
8787
<li className="site_item">

components/Layout/MobileGnbDropdown.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ export function MobileGnbDropdown({ isLoggedIn }: { isLoggedIn: boolean }) {
7979
</li>
8080
<li className="navigator_group">
8181
<Link
82-
href="/docs/js-sdk"
82+
href="/docs/sdks"
8383
className={classNames('navigator_item', 'add_icon', {
84-
is_active: asPath.startsWith(`/docs/js-sdk`),
84+
is_active: asPath.startsWith(`/docs/sdks`),
8585
})}
8686
>
87-
JS SDK
87+
SDKs
8888
</Link>
8989
</li>
9090
<li className="navigator_group">

docs/advanced.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ This section covers configuration and integration topics for building production
2121
Before exploring these topics, ensure you have:
2222
1. Completed the [Getting Started guide](/docs/getting-started)
2323
2. Built at least one application using Yorkie SDKs
24-
3. Understood basic concepts like [Client](/docs/js-sdk#client), [Document](/docs/js-sdk#document), and [Channel](/docs/js-sdk#channel)
24+
3. Understood basic concepts like [Client](/docs/sdks/js-sdk#client), [Document](/docs/sdks/js-sdk#document), and [Channel](/docs/sdks/js-sdk#channel)
2525
4. Reviewed key terms in the [Glossary](/docs/glossary)

docs/advanced/architecture-patterns.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Understanding these patterns will help you design the optimal architecture for y
1313

1414
If you're new to Yorkie, we recommend:
1515
1. Complete the [Getting Started guide](/docs/getting-started) first
16-
2. Understand basic [Client](/docs/js-sdk#client) and [Document](/docs/js-sdk#document) concepts
16+
2. Understand basic [Client](/docs/sdks/js-sdk#client) and [Document](/docs/sdks/js-sdk#document) concepts
1717
3. Familiarize yourself with key terms in the [Glossary](/docs/glossary)
1818
4. Then return here to choose your architecture pattern
1919

@@ -52,7 +52,7 @@ sequenceDiagram
5252
2. Server creates a new document through [Yorkie Admin API](/docs/tools/admin-api#post-yorkiev1adminservicecreatedocument)
5353
3. Server stores document metadata in your database
5454
4. Server returns document key to client
55-
5. Client [attaches](/docs/js-sdk#attaching-the-document) to the document using the provided key
55+
5. Client [attaches](/docs/sdks/js-sdk#attaching-the-document) to the document using the provided key
5656

5757
**Document Editing Flow:**
5858

@@ -159,7 +159,7 @@ sequenceDiagram
159159

160160
1. Client requests document key and initial content from your server
161161
2. Client creates document locally with received key
162-
3. Client attaches document with initial content using the [`initialRoot`](/docs/js-sdk#initializing-root) option:
162+
3. Client attaches document with initial content using the [`initialRoot`](/docs/sdks/js-sdk#initializing-root) option:
163163

164164
```typescript
165165
const doc = new yorkie.Document(key); // Key received from server
@@ -214,7 +214,7 @@ sequenceDiagram
214214
Y-->>C: Detach confirmed
215215
```
216216

217-
1. Client finishes editing and [detaches](/docs/js-sdk#detaching-the-document) from document
217+
1. Client finishes editing and [detaches](/docs/sdks/js-sdk#detaching-the-document) from document
218218
2. With project-level `RemoveOnDetach` option enabled, document is automatically removed when no clients are attached
219219
3. This automatic cleanup reduces server management overhead
220220

@@ -344,7 +344,7 @@ Explore real-world examples implementing these patterns:
344344
### Related Documentation
345345

346346
For more information about Yorkie's API and features:
347-
- [JS SDK Documentation](/docs/js-sdk) - Client and Document API reference
347+
- [JS SDK Documentation](/docs/sdks/js-sdk) - Client and Document API reference
348348
- [Admin API](/docs/tools/admin-api) - Admin API for server-side management
349349
- [Security Configuration](/docs/advanced/security) - Auth Webhook and access control
350350
- [CLI](/docs/tools/cli) - Command-line tools for project management

docs/advanced/projects.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A **Project** in Yorkie is a logical grouping that isolates documents, channels,
99

1010
### Overview
1111

12-
Every Yorkie installation starts with a `default` project that is created automatically. When a [Client](/docs/js-sdk#client) connects without specifying an API key, it is placed in the default project. For production applications, you should create dedicated projects to isolate data and configure settings independently.
12+
Every Yorkie installation starts with a `default` project that is created automatically. When a [Client](/docs/sdks/js-sdk#client) connects without specifying an API key, it is placed in the default project. For production applications, you should create dedicated projects to isolate data and configure settings independently.
1313

1414
```mermaid
1515
graph TB
@@ -47,7 +47,7 @@ Each project has two keys:
4747

4848
| Key | Purpose | Usage |
4949
|-----|---------|-------|
50-
| **Public Key** | Identifies the project for client connections | Used as `apiKey` when creating a [Client](/docs/js-sdk#client) |
50+
| **Public Key** | Identifies the project for client connections | Used as `apiKey` when creating a [Client](/docs/sdks/js-sdk#client) |
5151
| **Secret Key** | Authenticates server-side applications | Used in the `authorization` header for [Admin API](/docs/tools/admin-api) requests |
5252

5353
```javascript
@@ -121,8 +121,8 @@ Each project can be independently configured with the following settings:
121121
| **Auth Webhook** | External authentication endpoint for validating client requests | [Security: Auth Webhook](/docs/advanced/security#auth-webhook) |
122122
| **Event Webhook** | Notification endpoint for document events | [Event Webhook](/docs/advanced/event-webhook) |
123123
| **Allowed Origins** | CORS restrictions for client connections | [Security: Allowed Origins](/docs/advanced/security#allowed-origins) |
124-
| **Max Attachments** | Maximum clients that can attach to a single document | [Document Limits](/docs/js-sdk#document-limits) |
125-
| **Max Subscribers** | Maximum clients that can subscribe to a single document | [Document Limits](/docs/js-sdk#document-limits) |
124+
| **Max Attachments** | Maximum clients that can attach to a single document | [Document Limits](/docs/sdks/js-sdk#document-limits) |
125+
| **Max Subscribers** | Maximum clients that can subscribe to a single document | [Document Limits](/docs/sdks/js-sdk#document-limits) |
126126
| **Client Deactivate Threshold** | Time after which inactive clients are automatically deactivated by [Housekeeping](/docs/internals/housekeeping) | [CLI](/docs/tools/cli#updating-the-project) |
127127

128128
### Common Patterns

docs/advanced/resources.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ yorkie project update [project-name] \
9595
```
9696

9797
<Alert status="info">
98-
When a client receives a snapshot instead of incremental changes, a `snapshot` event is triggered. Your application should handle this event to update its state. See [Document Events](/docs/js-sdk#documentsubscribesnapshot) for more details.
98+
When a client receives a snapshot instead of incremental changes, a `snapshot` event is triggered. Your application should handle this event to update its state. See [Document Events](/docs/sdks/js-sdk#documentsubscribesnapshot) for more details.
9999
</Alert>
100100

101101
#### SnapshotInterval
@@ -191,4 +191,4 @@ yorkie project update my-project \
191191
- [CLI Reference](/docs/tools/cli) - Complete CLI command reference
192192
- [Admin API](/docs/tools/admin-api) - API for project management
193193
- [Architecture Patterns](/docs/advanced/architecture-patterns) - Document lifecycle patterns
194-
- [JS SDK - Document Events](/docs/js-sdk#documentsubscribesnapshot) - Handling snapshot events
194+
- [JS SDK - Document Events](/docs/sdks/js-sdk#documentsubscribesnapshot) - Handling snapshot events

docs/advanced/revisions.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Revisions are immutable snapshots of a document's state stored on the server. Ea
2828
### Before You Begin
2929

3030
This guide assumes familiarity with:
31-
1. [Client](/docs/js-sdk#client) and [Document](/docs/js-sdk#document) basics
31+
1. [Client](/docs/sdks/js-sdk#client) and [Document](/docs/sdks/js-sdk#document) basics
3232
2. [YSON format](/docs/internals/yson) for understanding snapshots
3333

3434
### How Revisions Work
@@ -57,7 +57,7 @@ When you create a revision:
5757

5858
### API Reference
5959

60-
For detailed API documentation, see [JS SDK - Document Revisions](/docs/js-sdk#document-revisions).
60+
For detailed API documentation, see [JS SDK - Document Revisions](/docs/sdks/js-sdk#document-revisions).
6161

6262
| Method | Description |
6363
|--------|-------------|
@@ -340,7 +340,7 @@ Revision operations require appropriate document permissions:
340340

341341
### Related Documentation
342342

343-
- [JS SDK - Document Revisions](/docs/js-sdk#document-revisions) - Complete API reference
343+
- [JS SDK - Document Revisions](/docs/sdks/js-sdk#document-revisions) - Complete API reference
344344
- [YSON](/docs/internals/yson) - Understanding snapshot format
345345
- [Resources](/docs/advanced/resources) - Project configuration including auto-revisions
346346
- [CodePair](https://github.com/yorkie-team/codepair) - Reference implementation

docs/advanced/security.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Yorkie handles authentication failures based on the webhook response and HTTP st
120120
##### Token Refresh & Retry Behavior
121121
For `PushPull` (realtime sync) and `WatchDocuments`:
122122
- Yorkie automatically retries the request after refreshing the token
123-
- Notifies via [`document.subscribe('auth-error')`](/docs/js-sdk#documentsubscribeauth-error)
123+
- Notifies via [`document.subscribe('auth-error')`](/docs/sdks/js-sdk#documentsubscribeauth-error)
124124

125125
For other API calls:
126126
- The system does not automatically retry; the client must manually handle the `codes.Unauthenticated` error and retry the request

docs/getting-started/with-android-sdk.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ scope.launch {
153153
}
154154
```
155155

156-
Next, let's take a look at the [Android SDK](/docs/android-sdk).
156+
Next, let's take a look at the [Android SDK](/docs/sdks/android-sdk).

docs/getting-started/with-ios-sdk.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ await doc.subscribePresnece { event in
101101
}
102102
```
103103

104-
Next, let's take a look at the [iOS SDK](/docs/ios-sdk).
104+
Next, let's take a look at the [iOS SDK](/docs/sdks/ios-sdk).

0 commit comments

Comments
 (0)