@brainfish-ai/devdoc 0.1.39 → 0.1.41

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.
@@ -1,6 +1,11 @@
1
- # Quickstart Template
1
+ # Quickstart Template (Diátaxis: Tutorial)
2
2
 
3
- Use this structure for getting-started documentation.
3
+ **Purpose:** Get users to their first success in minimal time.
4
+
5
+ **When to use:**
6
+ - First page new users see after the intro
7
+ - 5-10 minute "time to hello world"
8
+ - Builds confidence and momentum
4
9
 
5
10
  ## Format
6
11
 
@@ -8,172 +13,146 @@ Use this structure for getting-started documentation.
8
13
  ---
9
14
  title: Quickstart
10
15
  description: Get up and running with [Product] in 5 minutes
16
+ contentType: tutorial
11
17
  ---
12
18
 
13
19
  ## Overview
14
20
 
15
- [Product] helps you [main value proposition]. This guide gets you from zero to [first success metric] in under 5 minutes.
21
+ In this quickstart, you'll learn how to:
16
22
 
17
- ## How It Works
23
+ - [Outcome 1]
24
+ - [Outcome 2]
25
+ - [Outcome 3]
18
26
 
19
- ```mermaid
20
- flowchart LR
21
- A[Install] --> B[Configure]
22
- B --> C[First Request]
23
- C --> D[Success!]
24
- ```
27
+ **Time to complete:** ~5 minutes
25
28
 
26
- ## 1. Install
29
+ ## Prerequisites
27
30
 
28
- <CodeGroup>
29
- ```bash npm
30
- npm install package-name
31
- ```
31
+ <Note>
32
+ Before you begin, ensure you have:
33
+ - [Prerequisite 1]
34
+ - [Prerequisite 2]
35
+ </Note>
32
36
 
33
- ```bash yarn
34
- yarn add package-name
35
- ```
37
+ ## Step 1: [First Action]
36
38
 
37
- ```bash pnpm
38
- pnpm add package-name
39
- ```
40
- </CodeGroup>
39
+ Brief explanation of what we're doing.
41
40
 
42
- ## 2. Configure
41
+ <Tabs>
42
+ <Tab title="npm">
43
+ ```bash
44
+ npm install package-name
45
+ ```
46
+ </Tab>
47
+ <Tab title="yarn">
48
+ ```bash
49
+ yarn add package-name
50
+ ```
51
+ </Tab>
52
+ <Tab title="pnpm">
53
+ ```bash
54
+ pnpm add package-name
55
+ ```
56
+ </Tab>
57
+ </Tabs>
43
58
 
44
- Create a configuration file or set environment variables:
59
+ ## Step 2: [Second Action]
45
60
 
46
- ```bash
47
- export API_KEY=your_api_key_here
48
- ```
61
+ Explanation of this step.
49
62
 
50
- Or create a config file:
63
+ ```typescript
64
+ // Code example with comments
65
+ import { something } from 'package';
51
66
 
52
- ```json
53
- {
54
- "apiKey": "your_api_key_here"
55
- }
67
+ const result = something();
56
68
  ```
57
69
 
58
- <Note>
59
- Get your API key from the [dashboard](https://example.com/dashboard).
60
- </Note>
61
-
62
- ## 3. First Request
70
+ ## Step 3: [Third Action]
63
71
 
64
- Make your first API call:
72
+ Final step to complete the quickstart.
65
73
 
66
74
  ```typescript
67
- import { Client } from 'package-name';
75
+ // Final code
76
+ console.log('Success!');
77
+ ```
68
78
 
69
- const client = new Client({ apiKey: process.env.API_KEY });
79
+ ## Verify It Works
70
80
 
71
- const result = await client.doSomething({
72
- input: "Hello, world!"
73
- });
81
+ Run the following to confirm everything is set up:
74
82
 
75
- console.log(result);
83
+ ```bash
84
+ npm run dev
76
85
  ```
77
86
 
78
- Expected output:
87
+ You should see:
79
88
 
80
- ```json
81
- {
82
- "success": true,
83
- "data": "..."
84
- }
85
89
  ```
86
-
87
- ## What Happens Behind the Scenes
88
-
89
- ```mermaid
90
- sequenceDiagram
91
- participant You
92
- participant SDK
93
- participant API
94
-
95
- You->>SDK: client.doSomething()
96
- SDK->>API: POST /v1/action
97
- API-->>SDK: Response
98
- SDK-->>You: Result object
90
+ ✓ Server started on http://localhost:3000
99
91
  ```
100
92
 
93
+ <Tip>
94
+ If you see an error, check the [Troubleshooting](/troubleshooting) guide.
95
+ </Tip>
96
+
97
+ ## What You've Built
98
+
99
+ Congratulations! You now have:
100
+
101
+ - [Achievement 1]
102
+ - [Achievement 2]
103
+ - [Achievement 3]
104
+
101
105
  ## Next Steps
102
106
 
103
107
  <CardGroup cols={2}>
104
- <Card title="Core Concepts" icon="book" href="/concepts">
105
- Understand how [Product] works.
108
+ <Card title="Core Concepts" icon="book-open" href="/concepts">
109
+ Understand the key concepts
106
110
  </Card>
107
- <Card title="API Reference" icon="code" href="/api-reference">
108
- Explore all available endpoints.
111
+ <Card title="Full Tutorial" icon="graduation-cap" href="/tutorial">
112
+ Build a complete project
109
113
  </Card>
110
- <Card title="Examples" icon="folder" href="/examples">
111
- See real-world use cases.
114
+ <Card title="Configuration" icon="gear" href="/config">
115
+ Customize your setup
112
116
  </Card>
113
- <Card title="SDKs" icon="puzzle" href="/sdks">
114
- Official client libraries.
117
+ <Card title="API Reference" icon="code" href="/reference">
118
+ Explore the full API
115
119
  </Card>
116
120
  </CardGroup>
117
121
  ```
118
122
 
119
- ## Mermaid Diagram Guidelines
123
+ ## Guidelines
120
124
 
121
- ### Simple Flow for Quickstart
125
+ - **Keep it short** - 5 minutes or less
126
+ - **Show immediate value** - User sees something working fast
127
+ - **Use tabs for alternatives** - npm/yarn/pnpm, different languages
128
+ - **End with success** - User should feel accomplished
129
+ - **Link forward** - Guide to next learning steps
130
+ - **Minimal explanation** - Save deep dives for tutorials
122
131
 
123
- Keep it simple - show the journey:
132
+ ## Diátaxis Principles for Quickstart
124
133
 
125
- ```mermaid
126
- flowchart LR
127
- A["📦 Install"] --> B["⚙️ Configure"]
128
- B --> C["🚀 Use"]
129
- C --> D["✅ Done!"]
130
- ```
134
+ | Principle | Application |
135
+ |-----------|-------------|
136
+ | Learning-oriented | User builds understanding through action |
137
+ | Minimal | Only essential steps, no extras |
138
+ | Success-focused | Every step moves toward working result |
139
+ | Motivating | Builds confidence for deeper learning |
131
140
 
132
- ### SDK Architecture
133
-
134
- ```mermaid
135
- flowchart TB
136
- subgraph "Your App"
137
- A[Your Code]
138
- end
139
- subgraph "SDK"
140
- B[Client]
141
- C[Auth]
142
- D[Retry Logic]
143
- end
144
- subgraph "Cloud"
145
- E[API]
146
- end
147
- A --> B
148
- B --> C
149
- B --> D
150
- B --> E
151
- ```
141
+ ## Quick vs Tutorial
152
142
 
153
- ### Authentication Flow
154
-
155
- ```mermaid
156
- sequenceDiagram
157
- participant App
158
- participant SDK
159
- participant Auth
160
- participant API
161
-
162
- App->>SDK: Initialize with API key
163
- SDK->>Auth: Validate key
164
- Auth-->>SDK: Valid
165
- App->>SDK: Make request
166
- SDK->>API: Authenticated request
167
- API-->>SDK: Response
168
- SDK-->>App: Data
169
- ```
143
+ | Quickstart | Tutorial |
144
+ |------------|----------|
145
+ | 5 minutes | 15-30 minutes |
146
+ | Essential steps only | Comprehensive learning |
147
+ | Working result | Deep understanding |
148
+ | Links to more | Self-contained |
149
+ | One path | Multiple sections |
170
150
 
171
- ## Guidelines
151
+ ## Content Type
152
+
153
+ Quickstarts are a specialized form of **Tutorial** (learning-oriented):
172
154
 
173
- - Keep it under 5 minutes to complete
174
- - Use the minimum viable example
175
- - Show expected output at each step
176
- - Link to deeper documentation at the end
177
- - Include multiple installation methods
178
- - **Use simple flowcharts** to show the process
179
- - **Use sequence diagrams** to explain what happens
155
+ ```yaml
156
+ contentType: tutorial
157
+ subType: quickstart
158
+ ```
@@ -0,0 +1,264 @@
1
+ # Reference Template (Diátaxis: Information-Oriented)
2
+
3
+ **Purpose:** Provide accurate, complete information for lookup.
4
+
5
+ **When to use:**
6
+ - API documentation
7
+ - Configuration options
8
+ - Component props
9
+ - CLI commands
10
+ - Error codes
11
+
12
+ ## Format
13
+
14
+ ```mdx
15
+ ---
16
+ title: [Component/API/Config] Reference
17
+ description: Complete reference for [topic]
18
+ contentType: reference
19
+ ---
20
+
21
+ ## Overview
22
+
23
+ Brief description of what this reference covers and when to use it.
24
+
25
+ ## Properties / Parameters
26
+
27
+ | Property | Type | Required | Default | Description |
28
+ |----------|------|----------|---------|-------------|
29
+ | `name` | `string` | Yes | - | The display name |
30
+ | `enabled` | `boolean` | No | `true` | Whether feature is enabled |
31
+ | `options` | `Options` | No | `{}` | Configuration options |
32
+
33
+ ## Type Definitions
34
+
35
+ ```typescript
36
+ interface Options {
37
+ /** Maximum number of items */
38
+ maxItems?: number;
39
+
40
+ /** Callback when item is selected */
41
+ onSelect?: (item: Item) => void;
42
+
43
+ /** Custom renderer */
44
+ render?: (item: Item) => React.ReactNode;
45
+ }
46
+
47
+ interface Item {
48
+ id: string;
49
+ label: string;
50
+ value: unknown;
51
+ }
52
+ ```
53
+
54
+ ## Methods / Functions
55
+
56
+ ### `functionName(params)`
57
+
58
+ Brief description of what this function does.
59
+
60
+ **Parameters:**
61
+
62
+ | Name | Type | Required | Description |
63
+ |------|------|----------|-------------|
64
+ | `param1` | `string` | Yes | Description |
65
+ | `param2` | `Options` | No | Configuration |
66
+
67
+ **Returns:** `ReturnType` - Description of return value.
68
+
69
+ **Throws:**
70
+ - `ErrorType` - When this error occurs.
71
+
72
+ **Example:**
73
+
74
+ ```typescript
75
+ const result = functionName('value', { option: true });
76
+ ```
77
+
78
+ ## Configuration Options
79
+
80
+ ### `configOption`
81
+
82
+ <Note>
83
+ This option requires [prerequisite].
84
+ </Note>
85
+
86
+ **Type:** `string | string[]`
87
+
88
+ **Default:** `"default"`
89
+
90
+ Description of what this option does and when to use it.
91
+
92
+ ```json
93
+ {
94
+ "configOption": "value"
95
+ }
96
+ ```
97
+
98
+ ## Error Codes
99
+
100
+ | Code | Name | Description | Resolution |
101
+ |------|------|-------------|------------|
102
+ | `E001` | `InvalidInput` | Input validation failed | Check input format |
103
+ | `E002` | `NotFound` | Resource not found | Verify resource exists |
104
+ | `E003` | `Unauthorized` | Authentication required | Add auth header |
105
+
106
+ ## Constants
107
+
108
+ | Constant | Value | Description |
109
+ |----------|-------|-------------|
110
+ | `MAX_SIZE` | `1000` | Maximum allowed size |
111
+ | `DEFAULT_TIMEOUT` | `30000` | Default timeout in ms |
112
+
113
+ ## Examples
114
+
115
+ ### Basic Usage
116
+
117
+ ```typescript
118
+ import { Component } from 'package';
119
+
120
+ const instance = new Component({
121
+ name: 'example',
122
+ enabled: true,
123
+ });
124
+ ```
125
+
126
+ ### Advanced Usage
127
+
128
+ ```typescript
129
+ import { Component, Options } from 'package';
130
+
131
+ const options: Options = {
132
+ maxItems: 100,
133
+ onSelect: (item) => console.log(item),
134
+ };
135
+
136
+ const instance = new Component({
137
+ name: 'advanced',
138
+ options,
139
+ });
140
+ ```
141
+
142
+ ## Related
143
+
144
+ - [Configuration Guide](/config) - How to configure this feature
145
+ - [Tutorial](/tutorial) - Step-by-step introduction
146
+ - [Other Reference](/other) - Related reference documentation
147
+ ```
148
+
149
+ ## Guidelines
150
+
151
+ - **Be accurate** - Every detail must be correct
152
+ - **Be complete** - Cover all properties, methods, options
153
+ - **Be consistent** - Use same format throughout
154
+ - **Be concise** - No unnecessary explanation
155
+ - **Include types** - Always show TypeScript types
156
+ - **Show examples** - Every feature needs an example
157
+ - **Link to context** - Point to related how-tos and tutorials
158
+
159
+ ## Diátaxis Principles for Reference
160
+
161
+ | Principle | Application |
162
+ |-----------|-------------|
163
+ | Information-oriented | Focus on describing accurately |
164
+ | Consistent | Same structure for similar items |
165
+ | Complete | Cover everything, omit nothing |
166
+ | Neutral | No opinions, just facts |
167
+ | Well-organized | Easy to find specific info |
168
+
169
+ ## Reference Patterns
170
+
171
+ ### API Endpoint Reference
172
+
173
+ ```mdx
174
+ ### `POST /users`
175
+
176
+ Create a new user.
177
+
178
+ **Request Body:**
179
+
180
+ | Field | Type | Required | Description |
181
+ |-------|------|----------|-------------|
182
+ | `email` | `string` | Yes | User email |
183
+ | `name` | `string` | Yes | Display name |
184
+
185
+ **Response:** `201 Created`
186
+
187
+ ```json
188
+ {
189
+ "id": "usr_123",
190
+ "email": "user@example.com",
191
+ "name": "John Doe",
192
+ "createdAt": "2026-01-25T10:00:00Z"
193
+ }
194
+ ```
195
+
196
+ **Errors:**
197
+
198
+ | Status | Code | Description |
199
+ |--------|------|-------------|
200
+ | `400` | `VALIDATION_ERROR` | Invalid input |
201
+ | `409` | `ALREADY_EXISTS` | Email taken |
202
+ ```
203
+
204
+ ### CLI Command Reference
205
+
206
+ ```mdx
207
+ ### `devdoc deploy`
208
+
209
+ Deploy documentation to DevDoc hosting.
210
+
211
+ **Usage:**
212
+
213
+ ```bash
214
+ devdoc deploy [options]
215
+ ```
216
+
217
+ **Options:**
218
+
219
+ | Flag | Short | Description | Default |
220
+ |------|-------|-------------|---------|
221
+ | `--project` | `-p` | Project ID | From config |
222
+ | `--branch` | `-b` | Target branch | `main` |
223
+ | `--message` | `-m` | Deploy message | Auto |
224
+ | `--dry-run` | | Preview without deploying | `false` |
225
+
226
+ **Examples:**
227
+
228
+ ```bash
229
+ # Basic deploy
230
+ devdoc deploy
231
+
232
+ # Deploy to specific project
233
+ devdoc deploy --project proj_123
234
+
235
+ # Preview changes
236
+ devdoc deploy --dry-run
237
+ ```
238
+ ```
239
+
240
+ ### Component Props Reference
241
+
242
+ ```mdx
243
+ ### `<Button>`
244
+
245
+ A customizable button component.
246
+
247
+ **Props:**
248
+
249
+ | Prop | Type | Default | Description |
250
+ |------|------|---------|-------------|
251
+ | `variant` | `'primary' \| 'secondary' \| 'ghost'` | `'primary'` | Button style |
252
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Button size |
253
+ | `disabled` | `boolean` | `false` | Disable button |
254
+ | `onClick` | `() => void` | - | Click handler |
255
+ | `children` | `React.ReactNode` | - | Button content |
256
+
257
+ **Example:**
258
+
259
+ ```tsx
260
+ <Button variant="primary" size="lg" onClick={handleClick}>
261
+ Click me
262
+ </Button>
263
+ ```
264
+ ```
@@ -1,6 +1,11 @@
1
- # Tutorial Template
1
+ # Tutorial Template (Diátaxis: Learning-Oriented)
2
2
 
3
- Use this structure when creating step-by-step tutorials.
3
+ **Purpose:** Guide users through a learning experience to build understanding.
4
+
5
+ **When to use:**
6
+ - First-time user experiences
7
+ - Teaching new concepts hands-on
8
+ - Building something from scratch
4
9
 
5
10
  ## Format
6
11
 
@@ -8,6 +13,7 @@ Use this structure when creating step-by-step tutorials.
8
13
  ---
9
14
  title: Build [Something] with [Technology]
10
15
  description: A complete tutorial to [achieve outcome] from scratch
16
+ contentType: tutorial
11
17
  ---
12
18
 
13
19
  ## What You'll Build
@@ -20,7 +26,7 @@ Brief description of the end result and why it's useful.
20
26
 
21
27
  ## Architecture Overview
22
28
 
23
- Show the system architecture with a mermaid diagram:
29
+ Show the system with a mermaid diagram:
24
30
 
25
31
  ```mermaid
26
32
  flowchart TB
@@ -118,11 +124,13 @@ Expected output:
118
124
 
119
125
  ## Troubleshooting
120
126
 
121
- <Accordion title="Error: [Common error message]">
122
- **Cause:** Explanation of why this happens.
123
-
124
- **Solution:** How to fix it.
125
- </Accordion>
127
+ <AccordionGroup>
128
+ <Accordion title="Error: [Common error message]">
129
+ **Cause:** Explanation of why this happens.
130
+
131
+ **Solution:** How to fix it.
132
+ </Accordion>
133
+ </AccordionGroup>
126
134
 
127
135
  ## Next Steps
128
136
 
@@ -132,6 +140,15 @@ Now that you've built [X], you can:
132
140
  - [Enhancement 2]
133
141
  - [Related tutorial link]
134
142
 
143
+ <CardGroup cols={2}>
144
+ <Card title="Next Tutorial" href="/path">
145
+ Continue learning with the next tutorial
146
+ </Card>
147
+ <Card title="Reference" href="/path">
148
+ Deep dive into the API reference
149
+ </Card>
150
+ </CardGroup>
151
+
135
152
  ## Complete Code
136
153
 
137
154
  <Accordion title="View complete source code">
@@ -141,72 +158,23 @@ Now that you've built [X], you can:
141
158
  </Accordion>
142
159
  ```
143
160
 
144
- ## Mermaid Diagram Guidelines
145
-
146
- ### Architecture Diagrams
147
-
148
- Use subgraphs to group related components:
149
-
150
- ```mermaid
151
- flowchart TB
152
- subgraph Client["Client Layer"]
153
- A[Web App]
154
- B[Mobile App]
155
- end
156
- subgraph Services["Service Layer"]
157
- C[Auth Service]
158
- D[API Gateway]
159
- end
160
- subgraph Data["Data Layer"]
161
- E[(Database)]
162
- F[(Cache)]
163
- end
164
- A --> D
165
- B --> D
166
- D --> C
167
- D --> E
168
- D --> F
169
- ```
170
-
171
- ### Process Flow
172
-
173
- Show the build/deploy process:
174
-
175
- ```mermaid
176
- flowchart LR
177
- A[Code] --> B[Build]
178
- B --> C[Test]
179
- C --> D{Pass?}
180
- D -->|Yes| E[Deploy]
181
- D -->|No| F[Fix]
182
- F --> B
183
- ```
184
-
185
- ### Class/Component Diagram
186
-
187
- ```mermaid
188
- classDiagram
189
- class User {
190
- +String id
191
- +String email
192
- +create()
193
- +update()
194
- }
195
- class Order {
196
- +String id
197
- +String userId
198
- +submit()
199
- }
200
- User "1" --> "*" Order
201
- ```
202
-
203
161
  ## Guidelines
204
162
 
205
- - Show the end result first to motivate readers
206
- - Break into digestible parts (10-15 min each)
207
- - Include checkpoints where readers can verify progress
208
- - Provide complete code at the end for reference
209
- - Add troubleshooting for common issues
163
+ - **Show the end result first** to motivate readers
164
+ - **Break into digestible parts** (10-15 min each)
165
+ - **Include checkpoints** where readers can verify progress
166
+ - **Provide complete code** at the end for reference
167
+ - **Add troubleshooting** for common issues
210
168
  - **Use architecture diagrams** at the start
211
169
  - **Use sequence diagrams** for API interactions
212
170
  - **Use flowcharts** for decision logic
171
+
172
+ ## Diátaxis Principles for Tutorials
173
+
174
+ | Principle | Application |
175
+ |-----------|-------------|
176
+ | Learning-oriented | Focus on building understanding, not just completing tasks |
177
+ | Practical | Users learn by doing something meaningful |
178
+ | Safe | Mistakes are ok - provide recovery paths |
179
+ | Structured | Clear beginning, middle, end with milestones |
180
+ | Repeatable | Can be followed step-by-step to same result |