Skip to content

Commit 759004f

Browse files
committed
Refactor documentation structure for GraphQL, WebSocket, and SSE APIs
1 parent f7e7c31 commit 759004f

9 files changed

Lines changed: 55 additions & 31 deletions

File tree

_includes/docs-sidebar.html

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ <h3 class="mt-2">MongoDB REST API</h3>
5959

6060
<div class="part">
6161
<a data-bs-toggle="collapse" href="#part3" role="button">
62-
<h3 class="mt-2">GraphQL & WebSocket</h3>
62+
<h3 class="mt-2">GraphQL API</h3>
6363
</a>
6464
<ul id="part3" class="collapse">
65-
<li class="subsection fw-bold">GraphQL API</li>
6665
<li><a href="/docs/graphql/">Overview</a></li>
6766
<li><a href="/docs/graphql/tutorial"><strong>Tutorial</strong></a></li>
6867
<li><a href="/docs/graphql/getting-started">Getting Started</a></li>
@@ -73,14 +72,26 @@ <h3 class="mt-2">GraphQL & WebSocket</h3>
7372
<li><a href="/docs/graphql/complex-app-example">Advanced Example</a></li>
7473
<li><a href="/docs/graphql/n-plus-one">Performance</a></li>
7574
<li><a href="/docs/graphql/best-practices">Best Practices</a></li>
75+
</ul>
76+
</div>
7677

77-
<li class="subsection fw-bold mt-2">WebSocket API</li>
78+
<div class="part">
79+
<a data-bs-toggle="collapse" href="#part-websocket" role="button">
80+
<h3 class="mt-2">WebSocket API</h3>
81+
</a>
82+
<ul id="part-websocket" class="collapse">
7883
<li><a href="/docs/websocket/">Overview</a></li>
7984
<li><a href="/docs/websocket/tutorial"><strong>Tutorial</strong></a></li>
8085
<li><a href="/docs/websocket/change-streams">Change Streams</a></li>
8186
<li><a href="/docs/websocket/variables">Variables</a></li>
87+
</ul>
88+
</div>
8289

83-
<li class="subsection fw-bold mt-2">SSE API</li>
90+
<div class="part">
91+
<a data-bs-toggle="collapse" href="#part-sse" role="button">
92+
<h3 class="mt-2">SSE API</h3>
93+
</a>
94+
<ul id="part-sse" class="collapse">
8495
<li><a href="/docs/sse/">Overview</a></li>
8596
<li><a href="/docs/sse/tutorial"><strong>Tutorial</strong></a></li>
8697
<li><a href="/docs/sse/custom-service">Custom SseService</a></li>
@@ -239,7 +250,9 @@ <h3 class="mt-2">Reference</h3>
239250
const menuMapping = {
240251
'overview': 'part1', // Foundations
241252
'mongodb': 'part2', // MongoDB REST API
242-
'graphql': 'part3', // GraphQL & WebSocket
253+
'graphql': 'part3', // GraphQL API
254+
'websocket': 'part-websocket', // WebSocket API
255+
'sse': 'part-sse', // SSE API
243256
'security': 'part4', // Security
244257
'setup': 'part5', // Deployment
245258
'framework': 'part6', // Framework

docs/index.adoc

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -187,27 +187,27 @@ Choose the path that matches your goal:
187187
|link:/docs/foundations/quick-start[Quick Start] (15 min)
188188

189189
|3
190-
|link:/docs/graphql-websocket/graphql/tutorial[GraphQL Tutorial] (30 min)
190+
|link:/docs/graphql/tutorial[GraphQL Tutorial] (30 min)
191191

192192
|4
193-
|link:/docs/graphql-websocket/graphql/getting-started[Getting Started] (20 min)
193+
|link:/docs/graphql/getting-started[Getting Started] (20 min)
194194

195195
|5
196-
|link:/docs/graphql-websocket/graphql/graphql-apps[GraphQL Apps] (20 min)
196+
|link:/docs/graphql/graphql-apps[GraphQL Apps] (20 min)
197197

198198
|6
199-
|link:/docs/graphql-websocket/graphql/schema[Schema Design] (20 min)
199+
|link:/docs/graphql/schema[Schema Design] (20 min)
200200

201201
|7
202-
|link:/docs/graphql-websocket/graphql/mappings[Mappings] (20 min)
202+
|link:/docs/graphql/mappings[Mappings] (20 min)
203203

204204
|8
205-
|link:/docs/graphql-websocket/graphql/resolvers[Resolvers] (20 min)
205+
|link:/docs/graphql/resolvers[Resolvers] (20 min)
206206
|===
207207

208208
**✓ You can now build GraphQL APIs with RESTHeart!**
209209

210-
*Next steps:* Learn link:/docs/graphql-websocket/graphql/n-plus-one[Performance Optimization], study link:/docs/graphql-websocket/graphql/complex-app-example[Advanced Example], review link:/docs/graphql-websocket/graphql/best-practices[Best Practices]
210+
*Next steps:* Learn link:/docs/graphql/n-plus-one[Performance Optimization], study link:/docs/graphql/complex-app-example[Advanced Example], review link:/docs/graphql/best-practices[Best Practices]
211211

212212
'''
213213

@@ -225,37 +225,47 @@ Complete guide to the REST API - CRUD, queries, aggregations, transactions, and
225225

226226
*Read this to use RESTHeart's MongoDB API without coding.*
227227

228-
=== link:/docs/graphql-websocket/graphql/[Part 3: GraphQL & WebSocket APIs]
229-
GraphQL API for flexible queries and WebSocket API for real-time data.
228+
=== link:/docs/graphql/[Part 3: GraphQL API]
229+
GraphQL API for flexible queries and mutations on MongoDB.
230230

231-
*Alternative APIs for specific use cases.*
231+
*Use when clients need to specify exactly the data shape they want.*
232232

233-
=== link:/docs/security/overview[Part 4: Security]
233+
=== link:/docs/websocket/[Part 4: WebSocket API]
234+
Bidirectional real-time data streams backed by MongoDB change streams.
235+
236+
*Use when clients need a persistent full-duplex connection.*
237+
238+
=== link:/docs/sse/[Part 5: SSE API]
239+
Server-Sent Events for real-time server-push streams — both MongoDB change streams and custom plugin endpoints.
240+
241+
*Use when clients only need to receive events (no client-to-server messages). Works over plain HTTP with native browser `EventSource` support and automatic reconnection.*
242+
243+
=== link:/docs/security/overview[Part 6: Security]
234244
User management, authentication methods, authorization, and production security.
235245

236246
*Essential for securing your APIs.*
237247

238-
=== link:/docs/deployment/configuration[Part 5: Configuration & Deployment]
248+
=== link:/docs/deployment/configuration[Part 7: Configuration & Deployment]
239249
Configuration options, deployment scenarios, operations, and performance tuning.
240250

241251
*Deploy RESTHeart to production.*
242252

243-
=== link:/docs/framework/overview[Part 6: Extending RESTHeart]
253+
=== link:/docs/framework/overview[Part 8: Extending RESTHeart]
244254
Plugin development - Services, Interceptors, Providers, and Initializers.
245255

246256
*Build custom functionality with the framework.*
247257

248-
=== link:/docs/framework/overview[Part 7: Extending Security]
258+
=== link:/docs/framework/overview[Part 9: Extending Security]
249259
Develop custom authentication and authorization plugins.
250260

251261
*Extend the security layer.*
252262

253-
=== link:/docs/cloud/[Part 8: RESTHeart Cloud]
263+
=== link:/docs/cloud/[Part 10: RESTHeart Cloud]
254264
RESTHeart Cloud features, Sophia AI, and webhooks.
255265

256266
*Use the managed cloud offering.*
257267

258-
=== link:/docs/reference/faq[Part 9: Reference]
268+
=== link:/docs/reference/faq[Part 11: Reference]
259269
API reference, migration guides, FAQ, examples, and resources.
260270

261271
*Quick reference and additional resources.*
@@ -307,15 +317,16 @@ API reference, migration guides, FAQ, examples, and resources.
307317
Hands-on guides to get you started:
308318

309319
* link:/docs/mongodb-rest/tutorial[REST API Tutorial] - Learn the REST API through examples
310-
* link:/docs/graphql-websocket/graphql/tutorial[GraphQL Tutorial] - Build a GraphQL API
311-
* link:/docs/graphql-websocket/websocket/tutorial[WebSocket Tutorial] - Real-time data with WebSockets
320+
* link:/docs/graphql/tutorial[GraphQL Tutorial] - Build a GraphQL API
321+
* link:/docs/websocket/tutorial[WebSocket Tutorial] - Real-time data with WebSockets
322+
* link:/docs/sse/tutorial[SSE Tutorial] - Server-push streams over HTTP with MongoDB change streams
312323
* link:/docs/security/tutorial[Security Tutorial] - Set up authentication and authorization
313324
* link:/docs/framework/tutorial[Plugin Development Tutorial] - Build your first plugin
314325

315326
== 🌟 Why RESTHeart?
316327

317328
* **Zero Code Required** - Use MongoDB APIs out of the box
318-
* **Instant APIs** - REST, GraphQL, WebSocket for MongoDB
329+
* **Instant APIs** - REST, GraphQL, WebSocket, and SSE for MongoDB
319330
* **Secure by Default** - Built-in authentication and authorization
320331
* **Highly Extensible** - Simple plugin system in Java, Kotlin, or JavaScript
321332
* **High Performance** - Virtual threads for massive scalability

docs/sse/custom-service.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
docs_version: 9
33
title: Custom SseService Plugin
44
layout: docs-adoc
5-
menu: graphql
5+
menu: sse
66
applies_to: both
77
---
88

docs/sse/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
docs_version: 9
33
title: SSE API Overview
44
layout: docs-adoc
5-
menu: graphql
5+
menu: sse
66
applies_to: both
77
---
88

docs/sse/tutorial.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
docs_version: 9
33
title: "Tutorial: Change Streams over SSE"
44
layout: docs-adoc
5-
menu: graphql
5+
menu: sse
66
applies_to: both
77
---
88

docs/websocket/change-streams.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
docs_version: 9
33
title: Change streams
44
layout: docs-adoc
5-
menu: graphql
5+
menu: websocket
66
applies_to: both
77
redirect_from:
88
- /docs/graphql-websocket/websocket/change-streams

docs/websocket/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
docs_version: 9
33
title: WebSocket API Overview
44
layout: docs-adoc
5-
menu: graphql
5+
menu: websocket
66
applies_to: both
77
redirect_from:
88
- /docs/graphql-websocket/websocket/

docs/websocket/tutorial.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
docs_version: 9
33
title: WebSocket API Tutorial
44
layout: docs-adoc
5-
menu: graphql
5+
menu: websocket
66
liquid: true
77
applies_to: both
88
redirect_from:

docs/websocket/variables.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
docs_version: 9
33
title: Using Variables
44
layout: docs-adoc
5-
menu: graphql
5+
menu: websocket
66
applies_to: both
77
redirect_from:
88
- /docs/graphql-websocket/websocket/variables

0 commit comments

Comments
 (0)