@clidey/dory 0.1.0 → 0.3.0

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 (53) hide show
  1. package/README.md +1 -1
  2. package/docs/api-playground-demo.mdx +119 -0
  3. package/docs/api-reference/openapi.json +366 -0
  4. package/docs/api-reference/operations/create.mdx +5 -0
  5. package/docs/api-reference/operations/delete.mdx +5 -0
  6. package/docs/api-reference/operations/get.mdx +5 -0
  7. package/docs/api-reference/operations/update.mdx +5 -0
  8. package/docs/assets/dory.jpeg +0 -0
  9. package/docs/dory.json +12 -131
  10. package/docs/favicon.svg +75 -0
  11. package/docs/features.mdx +440 -0
  12. package/docs/introduction.mdx +44 -0
  13. package/docs/logo/logo.png +0 -0
  14. package/package.json +9 -10
  15. package/src/mdx/fence.tsx +2 -1
  16. package/src/mdx/mermaid.tsx +39 -11
  17. package/src/mdx/source.tsx +15 -4
  18. package/docs/README.md +0 -2
  19. package/docs/configuration/app-settings/feature-flags.mdx +0 -157
  20. package/docs/configuration/app-settings/user-settings.mdx +0 -201
  21. package/docs/configuration/installation-setup/env-vars.mdx +0 -198
  22. package/docs/configuration/installation-setup/installation.mdx +0 -127
  23. package/docs/integrations/analytics-monitoring/error-tracking.mdx +0 -199
  24. package/docs/integrations/analytics-monitoring/notifications.mdx +0 -189
  25. package/docs/integrations/analytics-monitoring/user-analytics.mdx +0 -182
  26. package/docs/integrations/shopify-integration/shopify-setup.mdx +0 -226
  27. package/docs/integrations/shopify-integration/shopify-webhooks.mdx +0 -207
  28. package/docs/overview/developer-overview/dev-architecture.mdx +0 -292
  29. package/docs/overview/product-intro/app-overview.mdx +0 -167
  30. package/docs/overview/product-intro/architecture.mdx +0 -203
  31. package/docs/overview/product-intro/core-concepts.mdx +0 -267
  32. package/docs/platform-admin/billing-subscriptions/billing.mdx +0 -176
  33. package/docs/platform-admin/system-maintenance/db-migrations.mdx +0 -184
  34. package/docs/platform-admin/system-maintenance/health-monitoring.mdx +0 -222
  35. package/docs/platform-admin/system-maintenance/queue-management.mdx +0 -234
  36. package/docs/platform-admin/user-team-management/teams.mdx +0 -170
  37. package/docs/platform-admin/user-team-management/users.mdx +0 -185
  38. package/docs/support/legal/dependency-analysis.mdx +0 -132
  39. package/docs/support/legal/privacy-terms.mdx +0 -73
  40. package/docs/support/troubleshooting/common-issues.mdx +0 -159
  41. package/docs/usage/api-usage/api-inventory.mdx +0 -213
  42. package/docs/usage/api-usage/api-products.mdx +0 -249
  43. package/docs/usage/api-usage/api-purchase-orders.mdx +0 -289
  44. package/docs/usage/api-usage/api-reports.mdx +0 -227
  45. package/docs/usage/api-usage/api-suppliers.mdx +0 -171
  46. package/docs/usage/api-usage/api-user-management.mdx +0 -171
  47. package/docs/usage/ui-workflows/bundles.mdx +0 -157
  48. package/docs/usage/ui-workflows/demand-planning.mdx +0 -210
  49. package/docs/usage/ui-workflows/favorites.mdx +0 -167
  50. package/docs/usage/ui-workflows/inventory-management.mdx +0 -179
  51. package/docs/usage/ui-workflows/onboarding.mdx +0 -215
  52. package/docs/usage/ui-workflows/purchase-orders.mdx +0 -200
  53. package/docs/usage/ui-workflows/reports.mdx +0 -257
package/README.md CHANGED
@@ -43,7 +43,7 @@ Dory is:
43
43
  Install Dory globally to use the CLI tool:
44
44
 
45
45
  ```bash
46
- npm install -g dory
46
+ npm install -g @clidey/dory
47
47
  ```
48
48
 
49
49
  ### CLI Usage
@@ -0,0 +1,119 @@
1
+ ---
2
+ title: 'API Playground Demo'
3
+ description: 'Interactive API playground for testing HTTP endpoints'
4
+ openapi: 'POST /plants'
5
+ ---
6
+
7
+ # API Playground Demo
8
+
9
+ This page demonstrates the new HTTP API playground that allows you to test API endpoints directly from the documentation.
10
+
11
+ ## Basic GET Request
12
+
13
+ Test a simple GET request with query parameters:
14
+
15
+ <APIPlayground
16
+ method="GET"
17
+ url="/api/users"
18
+ title="Get Users"
19
+ description="Retrieve a list of users with optional filtering"
20
+ parameters={[
21
+ {
22
+ name: "page",
23
+ type: "number",
24
+ description: "Page number for pagination",
25
+ defaultValue: "1"
26
+ },
27
+ {
28
+ name: "limit",
29
+ type: "number",
30
+ description: "Number of items per page",
31
+ defaultValue: "10"
32
+ },
33
+ {
34
+ name: "search",
35
+ type: "string",
36
+ description: "Search term to filter users"
37
+ }
38
+ ]}
39
+ baseUrl="https://jsonplaceholder.typicode.com"
40
+ />
41
+
42
+ ## POST Request with Body
43
+
44
+ Test a POST request with a JSON body:
45
+
46
+ <APIPlayground
47
+ method="POST"
48
+ url="/api/users"
49
+ title="Create User"
50
+ description="Create a new user account"
51
+ parameters={[]}
52
+ body={{
53
+ "name": "John Doe",
54
+ "email": "john@example.com",
55
+ "username": "johndoe"
56
+ }}
57
+ headers={{
58
+ "Content-Type": "application/json"
59
+ }}
60
+ authType="bearer"
61
+ baseUrl="https://jsonplaceholder.typicode.com"
62
+ />
63
+
64
+ ## Authenticated Endpoint
65
+
66
+ Test an endpoint that requires authentication:
67
+
68
+ <APIPlayground
69
+ method="GET"
70
+ url="/api/profile/{userId}"
71
+ title="Get User Profile"
72
+ description="Get detailed profile information for a specific user"
73
+ parameters={[
74
+ {
75
+ name: "userId",
76
+ type: "string",
77
+ required: true,
78
+ description: "The ID of the user to retrieve"
79
+ }
80
+ ]}
81
+ authType="bearer"
82
+ baseUrl="https://jsonplaceholder.typicode.com"
83
+ />
84
+
85
+ ## Features
86
+
87
+ The API playground provides:
88
+
89
+ - **Interactive Request Configuration**: Set parameters, headers, request body, and authentication
90
+ - **Multiple Auth Types**: Support for Bearer token, API key, and Basic authentication
91
+ - **Real-time Response**: See actual HTTP responses with status codes, headers, and formatted JSON
92
+ - **Request Timing**: Monitor request duration for performance analysis
93
+ - **Error Handling**: Clear error messages for failed requests
94
+ - **Copy-Paste Ready**: Generate curl commands and code examples
95
+
96
+ ## Usage in Documentation
97
+
98
+ To add a playground to your API documentation, use the `APIPlayground` component:
99
+
100
+ ```mdx
101
+ <APIPlayground
102
+ method="GET"
103
+ url="/api/endpoint"
104
+ title="Endpoint Title"
105
+ description="Description of what this endpoint does"
106
+ parameters={[
107
+ {
108
+ name: "param1",
109
+ type: "string",
110
+ required: true,
111
+ description: "Parameter description"
112
+ }
113
+ ]}
114
+ authType="bearer"
115
+ baseUrl="https://api.example.com"
116
+ />
117
+ ```
118
+
119
+ The playground seamlessly integrates with your existing API documentation and provides a Postman-like experience directly in the docs.
@@ -0,0 +1,366 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "Products API",
5
+ "version": "1.0.0",
6
+ "description": "API for managing products"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://api.example.com/v1",
11
+ "description": "Production server"
12
+ }
13
+ ],
14
+ "components": {
15
+ "securitySchemes": {
16
+ "ApiKeyAuth": {
17
+ "type": "apiKey",
18
+ "in": "header",
19
+ "name": "X-API-Key"
20
+ }
21
+ },
22
+ "schemas": {
23
+ "Product": {
24
+ "type": "object",
25
+ "required": ["name", "price", "category"],
26
+ "properties": {
27
+ "id": {
28
+ "type": "string",
29
+ "format": "uuid",
30
+ "description": "Unique identifier for the product"
31
+ },
32
+ "name": {
33
+ "type": "string",
34
+ "description": "Name of the product"
35
+ },
36
+ "description": {
37
+ "type": "string",
38
+ "description": "Detailed description of the product"
39
+ },
40
+ "price": {
41
+ "type": "number",
42
+ "format": "float",
43
+ "minimum": 0,
44
+ "description": "Price of the product"
45
+ },
46
+ "category": {
47
+ "type": "string",
48
+ "description": "Category of the product"
49
+ },
50
+ "inStock": {
51
+ "type": "boolean",
52
+ "default": true,
53
+ "description": "Whether the product is in stock"
54
+ },
55
+ "createdAt": {
56
+ "type": "string",
57
+ "format": "date-time",
58
+ "description": "Creation timestamp"
59
+ },
60
+ "updatedAt": {
61
+ "type": "string",
62
+ "format": "date-time",
63
+ "description": "Last update timestamp"
64
+ }
65
+ }
66
+ },
67
+ "Error": {
68
+ "type": "object",
69
+ "properties": {
70
+ "code": {
71
+ "type": "string",
72
+ "description": "Error code"
73
+ },
74
+ "message": {
75
+ "type": "string",
76
+ "description": "Error message"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ },
82
+ "paths": {
83
+ "/products": {
84
+ "get": {
85
+ "summary": "List all products",
86
+ "description": "Retrieve a paginated list of products",
87
+ "security": [
88
+ {
89
+ "ApiKeyAuth": []
90
+ }
91
+ ],
92
+ "parameters": [
93
+ {
94
+ "name": "page",
95
+ "in": "query",
96
+ "description": "Page number",
97
+ "required": false,
98
+ "schema": {
99
+ "type": "integer",
100
+ "default": 1,
101
+ "minimum": 1
102
+ }
103
+ },
104
+ {
105
+ "name": "limit",
106
+ "in": "query",
107
+ "description": "Number of items per page",
108
+ "required": false,
109
+ "schema": {
110
+ "type": "integer",
111
+ "default": 10,
112
+ "minimum": 1,
113
+ "maximum": 100
114
+ }
115
+ },
116
+ {
117
+ "name": "category",
118
+ "in": "query",
119
+ "description": "Filter by category",
120
+ "required": false,
121
+ "schema": {
122
+ "type": "string"
123
+ }
124
+ }
125
+ ],
126
+ "responses": {
127
+ "200": {
128
+ "description": "Successful response",
129
+ "content": {
130
+ "application/json": {
131
+ "schema": {
132
+ "type": "object",
133
+ "properties": {
134
+ "data": {
135
+ "type": "array",
136
+ "items": {
137
+ "$ref": "#/components/schemas/Product"
138
+ }
139
+ },
140
+ "total": {
141
+ "type": "integer"
142
+ },
143
+ "page": {
144
+ "type": "integer"
145
+ },
146
+ "limit": {
147
+ "type": "integer"
148
+ }
149
+ }
150
+ }
151
+ }
152
+ }
153
+ },
154
+ "401": {
155
+ "description": "Unauthorized",
156
+ "content": {
157
+ "application/json": {
158
+ "schema": {
159
+ "$ref": "#/components/schemas/Error"
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ },
166
+ "post": {
167
+ "summary": "Create a new product",
168
+ "description": "Create a new product with the provided details",
169
+ "security": [
170
+ {
171
+ "ApiKeyAuth": []
172
+ }
173
+ ],
174
+ "requestBody": {
175
+ "required": true,
176
+ "content": {
177
+ "application/json": {
178
+ "schema": {
179
+ "type": "object",
180
+ "required": ["name", "price", "category"],
181
+ "properties": {
182
+ "name": {
183
+ "type": "string"
184
+ },
185
+ "description": {
186
+ "type": "string"
187
+ },
188
+ "price": {
189
+ "type": "number",
190
+ "minimum": 0
191
+ },
192
+ "category": {
193
+ "type": "string"
194
+ },
195
+ "inStock": {
196
+ "type": "boolean"
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ },
203
+ "responses": {
204
+ "201": {
205
+ "description": "Product created successfully",
206
+ "content": {
207
+ "application/json": {
208
+ "schema": {
209
+ "$ref": "#/components/schemas/Product"
210
+ }
211
+ }
212
+ }
213
+ },
214
+ "400": {
215
+ "description": "Invalid input",
216
+ "content": {
217
+ "application/json": {
218
+ "schema": {
219
+ "$ref": "#/components/schemas/Error"
220
+ }
221
+ }
222
+ }
223
+ },
224
+ "401": {
225
+ "description": "Unauthorized",
226
+ "content": {
227
+ "application/json": {
228
+ "schema": {
229
+ "$ref": "#/components/schemas/Error"
230
+ }
231
+ }
232
+ }
233
+ }
234
+ }
235
+ }
236
+ },
237
+ "/products/{id}": {
238
+ "parameters": [
239
+ {
240
+ "name": "id",
241
+ "in": "path",
242
+ "required": true,
243
+ "schema": {
244
+ "type": "string",
245
+ "format": "uuid"
246
+ },
247
+ "description": "Product ID"
248
+ }
249
+ ],
250
+ "get": {
251
+ "summary": "Get product by ID",
252
+ "description": "Retrieve a specific product by its ID",
253
+ "security": [
254
+ {
255
+ "ApiKeyAuth": []
256
+ }
257
+ ],
258
+ "responses": {
259
+ "200": {
260
+ "description": "Successful response",
261
+ "content": {
262
+ "application/json": {
263
+ "schema": {
264
+ "$ref": "#/components/schemas/Product"
265
+ }
266
+ }
267
+ }
268
+ },
269
+ "404": {
270
+ "description": "Product not found",
271
+ "content": {
272
+ "application/json": {
273
+ "schema": {
274
+ "$ref": "#/components/schemas/Error"
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
280
+ },
281
+ "put": {
282
+ "summary": "Update product",
283
+ "description": "Update an existing product by its ID",
284
+ "security": [
285
+ {
286
+ "ApiKeyAuth": []
287
+ }
288
+ ],
289
+ "requestBody": {
290
+ "required": true,
291
+ "content": {
292
+ "application/json": {
293
+ "schema": {
294
+ "type": "object",
295
+ "properties": {
296
+ "name": {
297
+ "type": "string"
298
+ },
299
+ "description": {
300
+ "type": "string"
301
+ },
302
+ "price": {
303
+ "type": "number",
304
+ "minimum": 0
305
+ },
306
+ "category": {
307
+ "type": "string"
308
+ },
309
+ "inStock": {
310
+ "type": "boolean"
311
+ }
312
+ }
313
+ }
314
+ }
315
+ }
316
+ },
317
+ "responses": {
318
+ "200": {
319
+ "description": "Product updated successfully",
320
+ "content": {
321
+ "application/json": {
322
+ "schema": {
323
+ "$ref": "#/components/schemas/Product"
324
+ }
325
+ }
326
+ }
327
+ },
328
+ "404": {
329
+ "description": "Product not found",
330
+ "content": {
331
+ "application/json": {
332
+ "schema": {
333
+ "$ref": "#/components/schemas/Error"
334
+ }
335
+ }
336
+ }
337
+ }
338
+ }
339
+ },
340
+ "delete": {
341
+ "summary": "Delete product",
342
+ "description": "Delete a product by its ID",
343
+ "security": [
344
+ {
345
+ "ApiKeyAuth": []
346
+ }
347
+ ],
348
+ "responses": {
349
+ "204": {
350
+ "description": "Product deleted successfully"
351
+ },
352
+ "404": {
353
+ "description": "Product not found",
354
+ "content": {
355
+ "application/json": {
356
+ "schema": {
357
+ "$ref": "#/components/schemas/Error"
358
+ }
359
+ }
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+ }
366
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: 'POST /products'
3
+ description: 'Create a new product'
4
+ openapi: 'POST /products'
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: 'DELETE /products/{id}'
3
+ description: 'Delete a product'
4
+ openapi: 'DELETE /products/{id}'
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: 'GET /products'
3
+ description: 'Get a list of products'
4
+ openapi: 'GET /products'
5
+ ---
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: 'PUT /products/{id}'
3
+ description: 'Update a product'
4
+ openapi: 'PUT /products/{id}'
5
+ ---
Binary file
package/docs/dory.json CHANGED
@@ -1,154 +1,35 @@
1
1
  {
2
2
  "name": "Docucod",
3
- "colors": {
4
- "primary": "#60A5FA",
5
- "light": "#60A5FA",
6
- "dark": "#1E3A8A"
7
- },
8
- "favicon": "/favicon.svg",
9
- "styling": {
10
- "eyebrows": "breadcrumbs",
11
- "codeblocks": "dark"
12
- },
13
- "icons": {
14
- "library": "fontawesome"
15
- },
3
+ "favicon": "./favicon.svg",
16
4
  "fonts": {
17
5
  "family": "Montserrat",
18
6
  "source": "https://fonts.gstatic.com/s/googlesansflex/v5/t5sJIQcYNIWbFgDgAAzZ34auoVyXkJCOvp3SFWJbN5hF8Ju1x6sKCyp0l9sI40swNJwGpVd4AZzz0v6lJ4qFXNZhGjLvDSkV4USKMo6qQzwliVdHAy9jxTDHg_ugnAakpwGc-cxgUqDCIUI.woff2",
19
7
  "format": "woff2"
20
8
  },
21
- "background": {
22
- "decoration": "gradient"
23
- },
24
9
  "navigation": {
25
10
  "tabs": [
26
11
  {
27
- "tab": "Overview",
28
- "groups": [
29
- {
30
- "group": "Developer Overview",
31
- "pages": [
32
- "overview/developer-overview/dev-architecture"
33
- ]
34
- },
35
- {
36
- "group": "Product Intro",
37
- "pages": [
38
- "overview/product-intro/app-overview",
39
- "overview/product-intro/architecture",
40
- "overview/product-intro/core-concepts"
41
- ]
42
- }
43
- ]
44
- },
45
- {
46
- "tab": "Configuration",
12
+ "tab": "Documentation",
47
13
  "groups": [
48
14
  {
49
- "group": "App Settings",
15
+ "group": "Getting Started",
50
16
  "pages": [
51
- "configuration/app-settings/feature-flags",
52
- "configuration/app-settings/user-settings"
17
+ "introduction"
53
18
  ]
54
19
  },
55
20
  {
56
- "group": "Installation Setup",
57
- "pages": [
58
- "configuration/installation-setup/env-vars",
59
- "configuration/installation-setup/installation"
60
- ]
61
- }
62
- ]
63
- },
64
- {
65
- "tab": "Usage",
66
- "groups": [
67
- {
68
- "group": "API Usage",
69
- "pages": [
70
- "usage/api-usage/api-inventory",
71
- "usage/api-usage/api-products",
72
- "usage/api-usage/api-purchase-orders",
73
- "usage/api-usage/api-reports",
74
- "usage/api-usage/api-suppliers",
75
- "usage/api-usage/api-user-management"
76
- ]
77
- },
78
- {
79
- "group": "UI Workflows",
80
- "pages": [
81
- "usage/ui-workflows/bundles",
82
- "usage/ui-workflows/demand-planning",
83
- "usage/ui-workflows/favorites",
84
- "usage/ui-workflows/inventory-management",
85
- "usage/ui-workflows/onboarding",
86
- "usage/ui-workflows/purchase-orders",
87
- "usage/ui-workflows/reports"
88
- ]
89
- }
90
- ]
91
- },
92
- {
93
- "tab": "Integrations",
94
- "groups": [
95
- {
96
- "group": "Analytics Monitoring",
97
- "pages": [
98
- "integrations/analytics-monitoring/error-tracking",
99
- "integrations/analytics-monitoring/notifications",
100
- "integrations/analytics-monitoring/user-analytics"
101
- ]
102
- },
103
- {
104
- "group": "Shopify Integration",
105
- "pages": [
106
- "integrations/shopify-integration/shopify-setup",
107
- "integrations/shopify-integration/shopify-webhooks"
108
- ]
109
- }
110
- ]
111
- },
112
- {
113
- "tab": "Platform Admin",
114
- "groups": [
115
- {
116
- "group": "Billing Subscriptions",
117
- "pages": [
118
- "platform-admin/billing-subscriptions/billing"
119
- ]
120
- },
121
- {
122
- "group": "System Maintenance",
123
- "pages": [
124
- "platform-admin/system-maintenance/db-migrations",
125
- "platform-admin/system-maintenance/health-monitoring",
126
- "platform-admin/system-maintenance/queue-management"
127
- ]
128
- },
129
- {
130
- "group": "User Team Management",
131
- "pages": [
132
- "platform-admin/user-team-management/teams",
133
- "platform-admin/user-team-management/users"
134
- ]
135
- }
136
- ]
137
- },
138
- {
139
- "tab": "Support",
140
- "groups": [
141
- {
142
- "group": "Legal",
21
+ "group": "Features",
143
22
  "pages": [
144
- "support/legal/dependency-analysis",
145
- "support/legal/privacy-terms"
23
+ "features"
146
24
  ]
147
25
  },
148
26
  {
149
- "group": "Troubleshooting",
27
+ "group": "API Reference",
150
28
  "pages": [
151
- "support/troubleshooting/common-issues"
29
+ "api-reference/operations/create",
30
+ "api-reference/operations/get",
31
+ "api-reference/operations/update",
32
+ "api-reference/operations/delete"
152
33
  ]
153
34
  }
154
35
  ]
@@ -159,4 +40,4 @@
159
40
  "light": "./logo/logo.png",
160
41
  "dark": "./logo/logo.png"
161
42
  }
162
- }
43
+ }