@knowcode/doc-builder 1.9.30 → 1.10.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 (198) hide show
  1. package/lib/core-builder.js +164 -174
  2. package/lib/emoji-mapper.js +27 -12
  3. package/package.json +12 -2
  4. package/.claude/settings.local.json +0 -56
  5. package/CACHE-BUSTING-GUIDE.md +0 -82
  6. package/CLAUDE.md +0 -86
  7. package/CONTRIBUTING.md +0 -148
  8. package/GITHUB_SETUP.md +0 -203
  9. package/RELEASE-NOTES-1.7.5.md +0 -64
  10. package/Screenshot 2025-07-22 at 19.51.21.png +0 -0
  11. package/Screenshot 2025-07-26 at 17.06.49.png +0 -0
  12. package/add-user-clive.sql +0 -35
  13. package/add-user-lindsay-fixed.sql +0 -85
  14. package/add-user-lindsay.sql +0 -68
  15. package/add-user-pmorgan.sql +0 -35
  16. package/add-user-robbie.sql +0 -35
  17. package/add-wru-users.sql +0 -105
  18. package/debug-login.sql +0 -30
  19. package/doc-builder.config.js +0 -126
  20. package/doc-builder.config.js.backup.1753793768283 +0 -47
  21. package/doc-builder.config.js.backup.1753803964423 +0 -114
  22. package/doc-builder.config.js.backup.1753945707032 +0 -115
  23. package/doc-builder.config.js.backup.1754059241330 +0 -115
  24. package/doc-builder.config.js.backup.1754119567787 +0 -123
  25. package/doc-builder.config.js.backup.1754120048862 +0 -124
  26. package/doc-builder.config.js.backup.1754120529913 +0 -124
  27. package/doc-builder.config.js.backup.1754218469785 +0 -124
  28. package/doc-builder.config.js.backup.1754384764054 +0 -124
  29. package/doc-builder.config.js.backup.1754567425847 +0 -124
  30. package/doc-builder.config.js.backup.1754568137859 +0 -126
  31. package/doc-builder.config.js.backup.1754569388252 +0 -126
  32. package/doc-builder.config.js.backup.1754576694123 +0 -126
  33. package/doc-builder.config.js.backup.1755031374829 +0 -126
  34. package/doc-builder.config.js.backup.1755034500990 +0 -126
  35. package/doc-builder.config.js.backup.1755034809236 +0 -126
  36. package/grant-access.sql +0 -15
  37. package/html/11.png +0 -0
  38. package/html/404.html +0 -115
  39. package/html/README.html +0 -522
  40. package/html/Screenshot 2025-08-12 at 21.35.07.png +0 -0
  41. package/html/about-doc-builder.html +0 -491
  42. package/html/auth.js +0 -157
  43. package/html/claude-workflow-guide.html +0 -525
  44. package/html/css/notion-style.css +0 -2502
  45. package/html/documentation-index.html +0 -471
  46. package/html/guides/authentication-default-change.html +0 -370
  47. package/html/guides/authentication-guide.html +0 -509
  48. package/html/guides/cache-control-anti-pattern.html +0 -361
  49. package/html/guides/claude-workflow-guide.html +0 -1074
  50. package/html/guides/configuration-guide.html +0 -472
  51. package/html/guides/document-standards.html +0 -518
  52. package/html/guides/documentation-standards.html +0 -694
  53. package/html/guides/html-embedding-guide.html +0 -461
  54. package/html/guides/image-modal-guide.html +0 -515
  55. package/html/guides/next-steps-walkthrough.html +0 -638
  56. package/html/guides/phosphor-icons-guide.html +0 -584
  57. package/html/guides/private-directory-authentication-troubleshooting.html +0 -555
  58. package/html/guides/private-directory-authentication.html +0 -541
  59. package/html/guides/public-site-deployment.html +0 -431
  60. package/html/guides/search-engine-verification-guide.html +0 -542
  61. package/html/guides/seo-guide.html +0 -661
  62. package/html/guides/seo-optimization-guide.html +0 -887
  63. package/html/guides/supabase-auth-implementation-plan.html +0 -543
  64. package/html/guides/supabase-auth-integration-plan.html +0 -671
  65. package/html/guides/supabase-auth-setup-guide.html +0 -498
  66. package/html/guides/supabase-authentication-complete-guide.html +0 -866
  67. package/html/guides/troubleshooting-guide.html +0 -633
  68. package/html/guides/vercel-deployment-auth-setup.html +0 -337
  69. package/html/guides/windows-setup-guide.html +0 -859
  70. package/html/image-modal-test.html +0 -318
  71. package/html/index.html +0 -522
  72. package/html/js/auth.js +0 -157
  73. package/html/js/main.js +0 -1754
  74. package/html/launch/README.html +0 -297
  75. package/html/launch/bubble-plugin-specification.html +0 -933
  76. package/html/launch/go-to-market-strategy.html +0 -663
  77. package/html/launch/launch-announcements.html +0 -593
  78. package/html/login.html +0 -102
  79. package/html/logout.html +0 -18
  80. package/html/private/cache-control-anti-pattern.html +0 -429
  81. package/html/private/launch/README.html +0 -371
  82. package/html/private/launch/auth-cleanup-summary.html +0 -361
  83. package/html/private/launch/bubble-plugin-specification.html +0 -1007
  84. package/html/private/launch/go-to-market-strategy.html +0 -737
  85. package/html/private/launch/launch-announcements.html +0 -667
  86. package/html/private/launch/vercel-deployment-auth-setup.html +0 -417
  87. package/html/private/next-steps-walkthrough.html +0 -679
  88. package/html/private/supabase-auth-implementation-completed.html +0 -454
  89. package/html/private/supabase-auth-implementation-plan.html +0 -594
  90. package/html/private/supabase-auth-integration-plan.html +0 -704
  91. package/html/private/supabase-auth-setup-guide.html +0 -555
  92. package/html/private/test-private-doc.html +0 -302
  93. package/html/private/user-management-tooling.html +0 -601
  94. package/html/prompts/Screenshot 2025-08-02 at 08.49.55.png +0 -0
  95. package/html/prompts/beautiful-documentation-design.html +0 -784
  96. package/html/prompts/markdown-document-standards.html +0 -422
  97. package/html/prompts/project-rename-strategy-sasha-publish.html +0 -530
  98. package/html/robots.txt +0 -9
  99. package/html/sitemap.xml +0 -357
  100. package/html/test-questions/how-does-it-work%3F.html +0 -294
  101. package/html/test-questions/step-1%3A%20getting-started.html +0 -289
  102. package/html/test-questions/what-is-the-purpose.html +0 -293
  103. package/html/test-status.html +0 -281
  104. package/html/vercel-cli-setup-guide.html +0 -495
  105. package/html/vercel-first-time-setup-guide.html +0 -454
  106. package/html/vercel.json +0 -29
  107. package/html-static/11.png +0 -0
  108. package/html-static/404.html +0 -115
  109. package/html-static/README.html +0 -609
  110. package/html-static/Screenshot 2025-08-12 at 21.35.07.png +0 -0
  111. package/html-static/about-doc-builder.html +0 -578
  112. package/html-static/css/notion-style.css +0 -2502
  113. package/html-static/documentation-index.html +0 -558
  114. package/html-static/guides/authentication-default-change.html +0 -457
  115. package/html-static/guides/authentication-guide.html +0 -596
  116. package/html-static/guides/claude-workflow-guide.html +0 -1161
  117. package/html-static/guides/configuration-guide.html +0 -559
  118. package/html-static/guides/documentation-standards.html +0 -781
  119. package/html-static/guides/html-embedding-guide.html +0 -548
  120. package/html-static/guides/image-modal-guide.html +0 -602
  121. package/html-static/guides/phosphor-icons-guide.html +0 -671
  122. package/html-static/guides/private-directory-authentication-troubleshooting.html +0 -642
  123. package/html-static/guides/private-directory-authentication.html +0 -628
  124. package/html-static/guides/public-site-deployment.html +0 -518
  125. package/html-static/guides/search-engine-verification-guide.html +0 -629
  126. package/html-static/guides/seo-guide.html +0 -748
  127. package/html-static/guides/seo-optimization-guide.html +0 -974
  128. package/html-static/guides/supabase-authentication-complete-guide.html +0 -953
  129. package/html-static/guides/troubleshooting-guide.html +0 -720
  130. package/html-static/guides/windows-setup-guide.html +0 -946
  131. package/html-static/image-modal-test.html +0 -405
  132. package/html-static/index.html +0 -609
  133. package/html-static/js/main.js +0 -1754
  134. package/html-static/prompts/Screenshot 2025-08-02 at 08.49.55.png +0 -0
  135. package/html-static/prompts/beautiful-documentation-design.html +0 -871
  136. package/html-static/prompts/markdown-document-standards.html +0 -509
  137. package/html-static/prompts/project-rename-strategy-sasha-publish.html +0 -617
  138. package/html-static/robots.txt +0 -5
  139. package/html-static/sitemap.xml +0 -195
  140. package/html-static/test-questions/how-does-it-work%3F.html +0 -381
  141. package/html-static/test-questions/step-1%3A%20getting-started.html +0 -376
  142. package/html-static/test-questions/what-is-the-purpose.html +0 -380
  143. package/html-static/vercel-cli-setup-guide.html +0 -582
  144. package/html-static/vercel-first-time-setup-guide.html +0 -541
  145. package/manage-users.sql +0 -191
  146. package/migrate-to-domain-auth.sql +0 -47
  147. package/package/CACHE-BUSTING-GUIDE.md +0 -82
  148. package/package/CHANGELOG.md +0 -902
  149. package/package/README.md +0 -248
  150. package/package/assets/css/notion-style.css +0 -2211
  151. package/package/assets/js/auth.js +0 -67
  152. package/package/assets/js/main.js +0 -1565
  153. package/package/cli.js +0 -764
  154. package/package/index.js +0 -38
  155. package/package/knowcode-doc-builder-1.3.15.tgz +0 -0
  156. package/package/lib/builder.js +0 -32
  157. package/package/lib/config.js +0 -278
  158. package/package/lib/core-builder.js +0 -957
  159. package/package/lib/deploy.js +0 -497
  160. package/package/lib/dev-server.js +0 -96
  161. package/package/package.json +0 -34
  162. package/package/scripts/npx-runner.js +0 -27
  163. package/package/scripts/setup.js +0 -56
  164. package/package/test-cache-bust.sh +0 -43
  165. package/public-config.js +0 -22
  166. package/public-html/404.html +0 -115
  167. package/public-html/README.html +0 -149
  168. package/public-html/css/notion-style.css +0 -2036
  169. package/public-html/index.html +0 -149
  170. package/public-html/js/auth.js +0 -67
  171. package/public-html/js/main.js +0 -1485
  172. package/quick-test-commands.md +0 -40
  173. package/recordings/Screenshot 2025-07-24 at 18.22.01.png +0 -0
  174. package/recordings/mh-ls-22jul.txt +0 -2305
  175. package/screenshot.png +0 -0
  176. package/scripts/Screenshot 2025-07-23 at 15.39.41.png +0 -0
  177. package/setup-database-v2.sql +0 -53
  178. package/setup-database.sql +0 -41
  179. package/test-auth-config.js +0 -17
  180. package/test-cache-bust.sh +0 -43
  181. package/test-docs/README.md +0 -39
  182. package/test-html/404.html +0 -115
  183. package/test-html/README.html +0 -172
  184. package/test-html/auth.js +0 -97
  185. package/test-html/css/notion-style.css +0 -2036
  186. package/test-html/index.html +0 -172
  187. package/test-html/js/auth.js +0 -97
  188. package/test-html/js/main.js +0 -1485
  189. package/test-html/login.html +0 -102
  190. package/test-html/logout.html +0 -18
  191. package/update-domain.sql +0 -9
  192. package/user-access-view.sql +0 -49
  193. package/user-management/README.md +0 -301
  194. package/user-management/add-users.sh +0 -776
  195. package/user-management/create-user.js +0 -65
  196. package/user-management/users.txt +0 -15
  197. package/view-all-users.sql +0 -40
  198. package/wru-auth-config.js +0 -17
package/package/index.js DELETED
@@ -1,38 +0,0 @@
1
- /**
2
- * @knowcode/doc-builder - Programmatic API
3
- *
4
- * This module exports functions for use in scripts or other tools
5
- */
6
-
7
- const { build } = require('./lib/builder');
8
- const { startDevServer } = require('./lib/dev-server');
9
- const { deployToVercel, setupVercelProject } = require('./lib/deploy');
10
- const { loadConfig, createDefaultConfig } = require('./lib/config');
11
-
12
- module.exports = {
13
- // Main functions
14
- build,
15
- startDevServer,
16
- deployToVercel,
17
- setupVercelProject,
18
-
19
- // Config utilities
20
- loadConfig,
21
- createDefaultConfig,
22
-
23
- // Convenience wrapper for common operations
24
- async buildDocs(configPath = 'doc-builder.config.js', options = {}) {
25
- const config = await loadConfig(configPath, options);
26
- return build(config);
27
- },
28
-
29
- async deploy(configPath = 'doc-builder.config.js', options = {}) {
30
- const config = await loadConfig(configPath, options);
31
- return deployToVercel(config, options.prod);
32
- },
33
-
34
- async dev(configPath = 'doc-builder.config.js', options = {}) {
35
- const config = await loadConfig(configPath, options);
36
- return startDevServer(config, options.port || 3000);
37
- }
38
- };
@@ -1,32 +0,0 @@
1
- const fs = require('fs-extra');
2
- const path = require('path');
3
- const chalk = require('chalk');
4
- const { buildDocumentation } = require('./core-builder');
5
-
6
- /**
7
- * Main build function
8
- * Now fully self-contained!
9
- */
10
- async function build(config) {
11
- console.log(chalk.blue(`\n🚀 Building ${config.siteName}...\n`));
12
-
13
- // Validate config
14
- if (!config || typeof config !== 'object') {
15
- throw new Error('Invalid configuration provided to build function');
16
- }
17
-
18
- try {
19
- // Use the self-contained builder
20
- await buildDocumentation(config);
21
- console.log(chalk.green('\n✨ Build complete!\n'));
22
- } catch (error) {
23
- console.error(chalk.red('\n❌ Build failed:'), error.message);
24
- throw error;
25
- }
26
- }
27
-
28
- // Asset copying is now handled in core-builder.js
29
-
30
- module.exports = {
31
- build
32
- };
@@ -1,278 +0,0 @@
1
- const fs = require('fs-extra');
2
- const path = require('path');
3
- const chalk = require('chalk');
4
-
5
- /**
6
- * Default configuration
7
- */
8
- const defaultConfig = {
9
- // Source and output directories
10
- docsDir: 'docs',
11
- outputDir: 'html',
12
-
13
- // Site metadata
14
- siteName: 'Documentation',
15
- siteDescription: 'Documentation site built with @knowcode/doc-builder',
16
-
17
- // Features
18
- features: {
19
- authentication: false,
20
- changelog: true,
21
- mermaid: true,
22
- tooltips: true,
23
- search: false,
24
- darkMode: true
25
- },
26
-
27
- // Authentication (if enabled)
28
- auth: {
29
- username: 'admin',
30
- password: 'password'
31
- },
32
-
33
- // Changelog settings
34
- changelog: {
35
- daysBack: 14,
36
- enabled: true
37
- },
38
-
39
- // Navigation configuration
40
- folderOrder: [],
41
- folderDescriptions: {},
42
- folderIcons: {},
43
-
44
- // Deployment
45
- deployment: {
46
- platform: 'vercel',
47
- outputDirectory: 'html'
48
- }
49
- };
50
-
51
- /**
52
- * Notion-inspired preset - clean, modern documentation style
53
- */
54
- const notionInspiredPreset = {
55
- docsDir: 'docs',
56
- outputDir: 'html',
57
- siteName: 'Documentation', // Clean default name
58
- siteDescription: 'Transforming complex sales through intelligent automation',
59
-
60
- features: {
61
- authentication: true,
62
- changelog: true,
63
- mermaid: true,
64
- tooltips: true,
65
- search: false,
66
- darkMode: true
67
- },
68
-
69
- auth: {
70
- username: 'admin',
71
- password: 'docs2025'
72
- },
73
-
74
- changelog: {
75
- daysBack: 14,
76
- enabled: true
77
- },
78
-
79
- // Folder descriptions from existing code
80
- folderDescriptions: {
81
- 'product-roadmap': 'Strategic vision, timeline, and feature planning',
82
- 'product-requirements': 'Detailed product specifications, requirements documents, and feature definitions',
83
- 'architecture': 'System design, data flows, and technical infrastructure documentation',
84
- 'system-analysis': 'Comprehensive system analysis, functional requirements, and cross-component documentation',
85
- 'bubble': 'Core application platform - business logic, UI/UX, and user workflows',
86
- 'quickbase': 'Database schema, data management, and backend operations',
87
- 'activecampaign': 'Marketing automation integration and lead management system',
88
- 'juno-signer': 'Document signing service for digital signatures and PDF generation',
89
- 'juno-api-deprecated': 'Legacy API documentation (deprecated, for reference only)',
90
- 'postman': 'API testing tools, collections, and test automation',
91
- 'mcp': 'Model Context Protocol setup and configuration guides',
92
- 'team': 'Team roles, responsibilities, and task assignments',
93
- 'thought-leadership': 'Strategic thinking, industry insights, and future vision',
94
- 'paths': 'Dynamic pathway routing system for insurance applications',
95
- 'testing': 'Testing procedures, checklists, and quality assurance',
96
- 'technical': 'Technical documentation and implementation details',
97
- 'application': 'Application components, data types, and workflows'
98
- },
99
-
100
- folderIcons: {
101
- 'root': 'fas fa-home',
102
- 'product-roadmap': 'fas fa-road',
103
- 'product-requirements': 'fas fa-clipboard-list',
104
- 'architecture': 'fas fa-sitemap',
105
- 'system-analysis': 'fas fa-analytics',
106
- 'system': 'fas fa-cogs',
107
- 'bubble': 'fas fa-bubble',
108
- 'quickbase': 'fas fa-database',
109
- 'activecampaign': 'fas fa-envelope',
110
- 'juno-signer': 'fas fa-signature',
111
- 'juno-api-deprecated': 'fas fa-archive',
112
- 'postman': 'fas fa-flask',
113
- 'mcp': 'fas fa-puzzle-piece',
114
- 'team': 'fas fa-users',
115
- 'thought-leadership': 'fas fa-lightbulb',
116
- 'middleware': 'fas fa-layer-group',
117
- 'paths': 'fas fa-route',
118
- 'testing': 'fas fa-vial',
119
- 'juno-api': 'fas fa-plug'
120
- },
121
-
122
- folderOrder: [
123
- 'product-roadmap',
124
- 'product-requirements',
125
- 'architecture',
126
- 'system-analysis',
127
- 'bubble',
128
- 'quickbase',
129
- 'activecampaign',
130
- 'juno-signer',
131
- 'juno-api-deprecated',
132
- 'postman',
133
- 'mcp',
134
- 'team',
135
- 'thought-leadership'
136
- ]
137
- };
138
-
139
- /**
140
- * Load configuration
141
- */
142
- async function loadConfig(configPath, options = {}) {
143
- let config = { ...defaultConfig };
144
-
145
- // Apply preset if specified
146
- if (options.preset === 'notion-inspired') {
147
- config = { ...config, ...notionInspiredPreset };
148
- }
149
-
150
- // Load custom config file if it exists
151
- const customConfigPath = path.join(process.cwd(), configPath);
152
- if (fs.existsSync(customConfigPath)) {
153
- try {
154
- const customConfig = require(customConfigPath);
155
- config = { ...config, ...customConfig };
156
-
157
- // Handle alternative config formats
158
- if (customConfig.site) {
159
- // Map site.title to siteName
160
- if (customConfig.site.title) {
161
- config.siteName = customConfig.site.title;
162
- console.log(chalk.gray(` Using site name: ${config.siteName}`));
163
- }
164
- if (customConfig.site.description) {
165
- config.siteDescription = customConfig.site.description;
166
- }
167
- }
168
-
169
- // Map input/output to docsDir/outputDir
170
- if (customConfig.input) {
171
- config.docsDir = customConfig.input;
172
- }
173
- if (customConfig.output) {
174
- config.outputDir = customConfig.output;
175
- }
176
-
177
- console.log(chalk.gray(`Loaded config from ${configPath}`));
178
- } catch (error) {
179
- console.warn(chalk.yellow(`Warning: Failed to load config file: ${error.message}`));
180
- }
181
- } else if (!options.preset && !options.legacy) {
182
- console.log(chalk.gray('No config file found, using defaults'));
183
- }
184
-
185
- // Apply CLI options (these override config file)
186
- if (options.input) {
187
- config.docsDir = options.input;
188
- }
189
- if (options.output) {
190
- config.outputDir = options.output;
191
- }
192
- if (options.auth === false) {
193
- config.features.authentication = false;
194
- }
195
- if (options.changelog === false) {
196
- config.features.changelog = false;
197
- config.changelog.enabled = false;
198
- }
199
-
200
- // Legacy mode - auto-detect structure
201
- if (options.legacy) {
202
- const docsPath = path.join(process.cwd(), 'docs');
203
- const htmlPath = path.join(process.cwd(), 'html');
204
-
205
- if (fs.existsSync(docsPath) && fs.existsSync(htmlPath)) {
206
- console.log(chalk.gray('Legacy mode: detected docs/ and html/ structure'));
207
- config.docsDir = 'docs';
208
- config.outputDir = 'html';
209
- }
210
- }
211
-
212
- // Validate paths - but be lenient for deploy command
213
- const docsPath = path.join(process.cwd(), config.docsDir);
214
- if (!fs.existsSync(docsPath)) {
215
- console.warn(chalk.yellow(`Warning: Documentation directory not found: ${config.docsDir}`));
216
- console.log(chalk.gray(`Create it with: mkdir ${config.docsDir} && echo "# Documentation" > ${config.docsDir}/README.md`));
217
- // Don't throw error - let commands handle missing directories appropriately
218
- }
219
-
220
- return config;
221
- }
222
-
223
- /**
224
- * Create default configuration
225
- */
226
- async function createDefaultConfig() {
227
- const answers = await require('prompts')([
228
- {
229
- type: 'text',
230
- name: 'siteName',
231
- message: 'Site name:',
232
- initial: 'My Documentation'
233
- },
234
- {
235
- type: 'text',
236
- name: 'siteDescription',
237
- message: 'Site description:',
238
- initial: 'Documentation for my project'
239
- },
240
- {
241
- type: 'confirm',
242
- name: 'authentication',
243
- message: 'Enable authentication?',
244
- initial: false
245
- },
246
- {
247
- type: prev => prev ? 'text' : null,
248
- name: 'authUsername',
249
- message: 'Authentication username:',
250
- initial: 'admin'
251
- },
252
- {
253
- type: prev => prev ? 'password' : null,
254
- name: 'authPassword',
255
- message: 'Authentication password:',
256
- initial: 'password'
257
- }
258
- ]);
259
-
260
- const config = { ...defaultConfig };
261
- config.siteName = answers.siteName;
262
- config.siteDescription = answers.siteDescription;
263
- config.features.authentication = answers.authentication;
264
-
265
- if (answers.authentication) {
266
- config.auth.username = answers.authUsername;
267
- config.auth.password = answers.authPassword;
268
- }
269
-
270
- return config;
271
- }
272
-
273
- module.exports = {
274
- defaultConfig,
275
- notionInspiredPreset,
276
- loadConfig,
277
- createDefaultConfig
278
- };