@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
@@ -1,555 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <meta name="description" content="When your private directory isn&#039;t being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.">
7
- <title>Private Directory Authentication Troubleshooting</title>
8
-
9
- <meta name="generator" content="@knowcode/doc-builder by Knowcode Ltd">
10
- <meta name="author" content="Lindsay Smith">
11
- <meta name="keywords" content="documentation, markdown, static site generator, vercel, notion-style, check, private">
12
- <meta name="robots" content="index, follow">
13
- <link rel="canonical" href="https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html">
14
-
15
- <!-- Open Graph / Facebook -->
16
- <meta property="og:type" content="article">
17
- <meta property="og:url" content="https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html">
18
- <meta property="og:title" content="Private Directory Authentication Troubleshooting">
19
- <meta property="og:description" content="When your private directory isn&#39;t being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.">
20
- <meta property="og:image" content="https://doc-builder-delta.vercel.app/og-default.png">
21
- <meta property="og:site_name" content="@knowcode/doc-builder">
22
- <meta property="og:locale" content="en_US">
23
-
24
- <!-- Twitter Card -->
25
- <meta name="twitter:card" content="summary_large_image">
26
- <meta name="twitter:site" content="@planbbackups">
27
- <meta name="twitter:creator" content="@planbbackups">
28
- <meta name="twitter:title" content="Private Directory Authentication Troubleshooting">
29
- <meta name="twitter:description" content="When your private directory isn&#39;t being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.">
30
- <meta name="twitter:image" content="https://doc-builder-delta.vercel.app/og-default.png">
31
-
32
- <!-- Custom Meta Tags -->
33
- <meta name="google-site-verification" content="FtzcDTf5BQ9K5EfnGazQkgU2U4FiN3ITzM7gHwqUAqQ">
34
- <meta name="msvalidate.01" content="B2D8C4C12C530D47AA962B24CAA09630">
35
-
36
- <!-- Fonts -->
37
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
38
-
39
- <!-- Icons -->
40
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
41
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.css">
42
-
43
- <!-- Mermaid -->
44
- <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
45
-
46
- <!-- Styles -->
47
- <link rel="stylesheet" href="/css/notion-style.css">
48
-
49
-
50
-
51
-
52
- <!-- Hide content until auth check -->
53
- <style>
54
- body {
55
- visibility: hidden;
56
- opacity: 0;
57
- transition: opacity 0.3s ease;
58
- }
59
- body.authenticated {
60
- visibility: visible;
61
- opacity: 1;
62
- }
63
- /* Show login/logout pages immediately */
64
- body.auth-page {
65
- visibility: visible;
66
- opacity: 1;
67
- }
68
- /* Style auth button consistently */
69
- .auth-btn {
70
- background: none;
71
- border: none;
72
- color: var(--text-secondary);
73
- cursor: pointer;
74
- padding: 0.5rem;
75
- border-radius: 0.5rem;
76
- transition: all 0.2s;
77
- font-size: 1.1rem;
78
- }
79
- .auth-btn:hover {
80
- background: var(--bg-secondary);
81
- color: var(--text-primary);
82
- }
83
- </style>
84
-
85
-
86
- <!-- Favicon -->
87
- <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>✨</text></svg>">
88
-
89
- <script type="application/ld+json">
90
- {
91
- "@context": "https://schema.org",
92
- "@type": "TechArticle",
93
- "headline": "Private Directory Authentication Troubleshooting",
94
- "description": "When your private directory isn't being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.",
95
- "author": {
96
- "@type": "Person",
97
- "name": "Lindsay Smith"
98
- },
99
- "publisher": {
100
- "@type": "Organization",
101
- "name": "Knowcode Ltd",
102
- "url": "https://knowcode.tech"
103
- },
104
- "datePublished": "2025-08-12T21:40:09.376Z",
105
- "dateModified": "2025-08-12T21:40:09.376Z",
106
- "mainEntityOfPage": {
107
- "@type": "WebPage",
108
- "@id": "https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html"
109
- },
110
- "breadcrumb": {
111
- "@type": "BreadcrumbList",
112
- "itemListElement": [
113
- {
114
- "@type": "ListItem",
115
- "position": 1,
116
- "name": "@knowcode/doc-builder",
117
- "item": "https://doc-builder-delta.vercel.app"
118
- },
119
- {
120
- "@type": "ListItem",
121
- "position": 2,
122
- "name": "Guides",
123
- "item": "https://doc-builder-delta.vercel.app/guides/"
124
- },
125
- {
126
- "@type": "ListItem",
127
- "position": 3,
128
- "name": "Private Directory Authentication Troubleshooting",
129
- "item": "https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html"
130
- }
131
- ]
132
- }
133
- }
134
- </script>
135
- </head>
136
- <body>
137
-
138
- <!-- Header -->
139
- <header class="header">
140
- <div class="header-content">
141
- <a href="/index.html" class="logo">@knowcode/doc-builder</a>
142
-
143
- <div class="header-actions">
144
- <div class="deployment-info">
145
- <span class="deployment-date" title="Built with doc-builder v1.9.29">Last updated: Aug 12, 2025, 09:40 PM UTC</span>
146
- </div>
147
-
148
-
149
- <a href="../../login.html" class="auth-btn" title="Login/Logout">
150
- <i class="fas fa-sign-in-alt"></i>
151
- </a>
152
-
153
-
154
- <button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
155
- <i class="fas fa-moon"></i>
156
- </button>
157
-
158
- <button id="menu-toggle" class="menu-toggle" aria-label="Toggle menu">
159
- <i class="fas fa-bars"></i>
160
- </button>
161
- </div>
162
- </div>
163
- </header>
164
-
165
-
166
-
167
-
168
- <!-- Breadcrumbs -->
169
- <nav class="breadcrumbs " id="breadcrumbs" >
170
- <!-- Breadcrumbs will be generated by JavaScript -->
171
- </nav>
172
-
173
- <!-- Main Content -->
174
- <div class="main-wrapper">
175
- <!-- Sidebar -->
176
- <aside class="sidebar">
177
- <div class="sidebar-header">
178
- <div class="filter-box">
179
- <input type="text" placeholder="Search menu..." class="filter-input" id="nav-filter">
180
- <i class="fas fa-search filter-icon"></i>
181
- </div>
182
- </div>
183
- <nav class="navigation">
184
-
185
- <div class="nav-section" data-level="0">
186
- <a class="nav-title toggle-all-nav expanded" href="#" id="nav-toggle-all" title="Collapse/Expand All">
187
- <i class="ph ph-caret-down" id="toggle-all-icon"></i> Documentation
188
- </a>
189
- <div class="nav-content">
190
- <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="ph ph-file-text"></i> Overview</a>
191
- <a href="/about-doc-builder.html" class="nav-item" data-tooltip="About @knowcode/doc-builder."><i class="ph ph-check-circle" style="color: #059669;"></i> About Doc Builder</a>
192
- <a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Documentation Index</a>
193
- <a href="/image-modal-test.html" class="nav-item" data-tooltip="This document tests the new image modal functionality in doc-builder."><i class="ph ph-file-text"></i> Image Modal Test</a>
194
- <a href="/vercel-cli-setup-guide.html" class="nav-item" data-tooltip="This guide provides comprehensive instructions for installing the Vercel CLI across different operating systems."><i class="ph ph-check-circle" style="color: #059669;"></i> Vercel Cli Setup Guide</a>
195
- <a href="/vercel-first-time-setup-guide.html" class="nav-item" data-tooltip="This guide walks you through the Vercel deployment process when using ."><i class="ph ph-check-circle" style="color: #059669;"></i> Vercel First Time Setup Guide</a></div></div>
196
- <div class="nav-section" data-level="1">
197
- <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
198
- <i class="ph ph-caret-right collapse-icon"></i><i class="ph ph-book"></i> Guides
199
- </a>
200
- <div class="nav-content" id="nav-guides-1">
201
- <a href="/guides/authentication-default-change.html" class="nav-item" data-tooltip="Starting from version 1.7.4, @knowcode/doc-builder now defaults to no authentication for all documentation sites."><i class="ph ph-file-text"></i> Authentication Default Change</a>
202
- <a href="/guides/authentication-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase - a secure, scalable authentication platform."><i class="ph ph-check-circle" style="color: #059669;"></i> Authentication Guide</a>
203
- <a href="/guides/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Claude Workflow Guide</a>
204
- <a href="/guides/configuration-guide.html" class="nav-item" data-tooltip="This guide explains how @knowcode/doc-builder handles configuration files and settings."><i class="ph ph-check-circle" style="color: #059669;"></i> Configuration Guide</a>
205
- <a href="/guides/documentation-standards.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Documentation Standards</a>
206
- <a href="/guides/html-embedding-guide.html" class="nav-item" data-tooltip="Starting from version 1.9.2, doc-builder treats HTML files ( and ) as attachments that are automatically copied to your output directory during the..."><i class="ph ph-check-circle" style="color: #059669;"></i> Html Embedding Guide</a>
207
- <a href="/guides/image-modal-guide.html" class="nav-item" data-tooltip="When users click on any image in your generated documentation, it opens in a professional modal overlay with: Full-screen viewing experience Smooth..."><i class="ph ph-check-circle" style="color: #059669;"></i> Image Modal Guide</a>
208
- <a href="/guides/phosphor-icons-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder automatically converts Unicode emojis in your markdown files to beautiful Phosphor icons in the generated HTML."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Phosphor Icons Guide</a>
209
- <a href="/guides/private-directory-authentication.html" class="nav-item" data-tooltip="The @knowcode/doc-builder provides flexible authentication options to protect your documentation."><i class="ph ph-check-circle" style="color: #059669;"></i> Private Directory Authentication</a>
210
- <a href="/guides/private-directory-authentication-troubleshooting.html" class="nav-item active" data-tooltip="Private Directory Authentication Troubleshooting."><i class="ph ph-check-circle" style="color: #059669;"></i> Private Directory Authentication Troubleshooting</a>
211
- <a href="/guides/public-site-deployment.html" class="nav-item" data-tooltip="The @knowcode/doc-builder now supports deploying public documentation sites without authentication."><i class="ph ph-check-circle" style="color: #059669;"></i> Public Site Deployment</a>
212
- <a href="/guides/search-engine-verification-guide.html" class="nav-item" data-tooltip="Search engine verification provides access to powerful webmaster tools:."><i class="ph ph-check-circle" style="color: #059669;"></i> Search Engine Verification Guide</a>
213
- <a href="/guides/seo-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder includes comprehensive SEO (Search Engine Optimization) features to help your documentation rank better in search results and..."><i class="ph ph-check-circle" style="color: #059669;"></i> Seo Guide</a>
214
- <a href="/guides/seo-optimization-guide.html" class="nav-item" data-tooltip="Comprehensive guide to optimizing documentation for search engines. Learn SEO best practices, use built-in features, and improve your rankings."><i class="ph ph-check-circle" style="color: #059669;"></i> SEO Optimization Guide for @knowcode/doc-builder</a>
215
- <a href="/guides/supabase-authentication-complete-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder includes built-in Supabase authentication that provides enterprise-grade security with zero configuration."><i class="ph ph-check-circle" style="color: #059669;"></i> Supabase Authentication Complete Guide</a>
216
- <a href="/guides/troubleshooting-guide.html" class="nav-item" data-tooltip="This guide helps you resolve common issues when using @knowcode/doc-builder."><i class="ph ph-check-circle" style="color: #059669;"></i> Troubleshooting Guide</a>
217
- <a href="/guides/windows-setup-guide.html" class="nav-item" data-tooltip="This guide helps Windows users set up the complete AI-powered documentation workflow using Claude Code, @knowcode/doc-builder, and Vercel."><i class="ph ph-check-circle" style="color: #059669;"></i> Windows Setup Guide</a></div></div>
218
- <div class="nav-section private-nav" data-level="1">
219
- <a class="nav-title collapsible" href="#" data-target="nav-private-1" >
220
- <i class="ph ph-caret-right collapse-icon"></i><i class="ph ph-lock"></i> Private
221
- </a>
222
- <div class="nav-content collapsed" id="nav-private-1">
223
- <a href="/private/cache-control-anti-pattern.html" class="nav-item" data-tooltip="Cache Control Anti-Pattern: Why Aggressive Cache-Busting is Bad for Documentation Sites."><i class="ph ph-check-circle" style="color: #059669;"></i> Cache Control Anti Pattern</a>
224
- <a href="/private/next-steps-walkthrough.html" class="nav-item" data-tooltip="Now that we&#039;ve implemented Supabase authentication, let&#039;s walk through testing the implementation and preparing for deployment."><i class="ph ph-check-circle" style="color: #059669;"></i> Next Steps Walkthrough</a>
225
- <a href="/private/supabase-auth-implementation-completed.html" class="nav-item" data-tooltip="This document records the successful implementation of Supabase authentication in @knowcode/doc-builder v1.7.5+."><i class="ph ph-check-circle" style="color: #059669;"></i> Supabase Auth Implementation Completed</a>
226
- <a href="/private/supabase-auth-implementation-plan.html" class="nav-item" data-tooltip="Supabase Auth Implementation Plan for @knowcode/doc-builder."><i class="ph ph-check-circle" style="color: #059669;"></i> Supabase Auth Implementation Plan</a>
227
- <a href="/private/supabase-auth-integration-plan.html" class="nav-item" data-tooltip="Supabase Authentication Integration Plan for @knowcode/doc-builder."><i class="ph ph-check-circle" style="color: #059669;"></i> Supabase Auth Integration Plan</a>
228
- <a href="/private/supabase-auth-setup-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase."><i class="ph ph-check-circle" style="color: #059669;"></i> Supabase Auth Setup Guide</a>
229
- <a href="/private/test-private-doc.html" class="nav-item" data-tooltip="Test Private Document."><i class="ph ph-file-text"></i> Test Private Doc</a>
230
- <a href="/private/user-management-tooling.html" class="nav-item" data-tooltip="The user management system is a set of tools designed to manage user access to Supabase-authenticated documentation sites built with."><i class="ph ph-check-circle" style="color: #059669;"></i> User Management Tooling</a></div></div>
231
- <div class="nav-section private-nav" data-level="2">
232
- <a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
233
- <i class="ph ph-caret-right collapse-icon"></i><i class="ph ph-rocket-launch"></i> Launch
234
- </a>
235
- <div class="nav-content collapsed" id="nav-private-launch-2">
236
- <a href="/private/launch/README.html" class="nav-item" data-tooltip="This directory contains all documentation related to the commercial launch of @knowcode/doc-builder, including go-to-market strategy, platform..."><i class="ph ph-check-circle" style="color: #059669;"></i> Launch Overview</a>
237
- <a href="/private/launch/auth-cleanup-summary.html" class="nav-item" data-tooltip="All references to the old client-side authentication system have been removed from @knowcode/doc-builder."><i class="ph ph-check-circle" style="color: #059669;"></i> Auth Cleanup Summary</a>
238
- <a href="/private/launch/bubble-plugin-specification.html" class="nav-item" data-tooltip="This document outlines the technical specification for creating a Bubble.io plugin that integrates @knowcode/doc-builder, enabling Bubble developers..."><i class="ph ph-x-circle" style="color: #dc2626;"></i> Bubble Plugin Specification</a>
239
- <a href="/private/launch/go-to-market-strategy.html" class="nav-item" data-tooltip="Go-to-Market Strategy &amp; Product Launch Plan."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Go To Market Strategy</a>
240
- <a href="/private/launch/launch-announcements.html" class="nav-item" data-tooltip="This document contains ready-to-use announcement templates for launching @knowcode/doc-builder across various platforms and channels."><i class="ph ph-check-circle" style="color: #059669;"></i> Launch Announcements</a>
241
- <a href="/private/launch/vercel-deployment-auth-setup.html" class="nav-item" data-tooltip="Vercel Deployment Authentication Setup Guide."><i class="ph ph-check-circle" style="color: #059669;"></i> Vercel Deployment Auth Setup</a></div></div>
242
- <div class="nav-section" data-level="1">
243
- <a class="nav-title collapsible" href="#" data-target="nav-prompts-1" >
244
- <i class="ph ph-caret-right collapse-icon"></i><i class="ph ph-chat-circle-dots"></i> Prompts
245
- </a>
246
- <div class="nav-content collapsed" id="nav-prompts-1">
247
- <a href="/prompts/beautiful-documentation-design.html" class="nav-item" data-tooltip="🎨 Beautiful Documentation Design Guide."><i class="ph ph-check-circle" style="color: #059669;"></i> Beautiful Documentation Design</a>
248
- <a href="/prompts/markdown-document-standards.html" class="nav-item" data-tooltip="Detailed introduction to the topic..."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Markdown Document Standards</a>
249
- <a href="/prompts/project-rename-strategy-sasha-publish.html" class="nav-item" data-tooltip="This document outlines the comprehensive strategy for renaming the @knowcode/doc-builder project to &quot;sasha-publish&quot;, including all package references,..."><i class="ph ph-x-circle" style="color: #dc2626;"></i> Project Rename Strategy Sasha Publish</a></div></div>
250
- <div class="nav-section" data-level="1">
251
- <a class="nav-title collapsible" href="#" data-target="nav-test-questions-1" >
252
- <i class="ph ph-caret-right collapse-icon"></i><i class="ph ph-folder"></i> Test Questions
253
- </a>
254
- <div class="nav-content collapsed" id="nav-test-questions-1">
255
- <a href="/test-questions/how-does-it-work%3F.html" class="nav-item" data-tooltip="This is a test file to verify that question marks work properly in filenames."><i class="ph ph-file-text"></i> How Does It Work?</a>
256
- <a href="/test-questions/step-1%3A%20getting-started.html" class="nav-item" data-tooltip="Step 1: Getting Started."><i class="ph ph-file-text"></i> Step 1: Getting Started</a>
257
- <a href="/test-questions/what-is-the-purpose.html" class="nav-item" data-tooltip="Understanding the purpose of our documentation system"><i class="ph ph-file-text"></i> What Is The Purpose?</a></div></div>
258
- </nav>
259
- <div class="resize-handle"></div>
260
- </aside>
261
-
262
- <!-- Content Area -->
263
- <main class="content">
264
- <div class="content-inner">
265
- <h1>Private Directory Authentication Troubleshooting</h1>
266
- <p>When your private directory isn&#39;t being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.</p>
267
- <h2>Quick Diagnostic Checklist</h2>
268
- <h3>1. <i style="font-size: 1.2em" class="ph ph-crane" aria-label="construction"></i> Build Process Detection</h3>
269
- <p><strong>Check if authentication was detected during build:</strong></p>
270
- <pre><code class="language-bash">npm run build
271
- </code></pre>
272
- <p>Look for this message in the build output:</p>
273
- <pre><code>🔐 Found private directory - automatically enabling Supabase authentication
274
- Note: Grant users access by adding domain to the docbuilder_access table
275
- </code></pre>
276
- <p><i style="font-size: 1.2em" class="ph ph-x-circle" aria-label="error"></i> <strong>If you DON&#39;T see this message:</strong></p>
277
- <ul>
278
- <li>Your <code>docs/private/</code> directory may not exist or be empty</li>
279
- <li>The directory might not be properly named (check spelling/case)</li>
280
- <li>The build process may not have sufficient permissions to read the directory</li>
281
- </ul>
282
- <h3>2. <i style="font-size: 1.2em" class="ph ph-folder" aria-label="folder"></i> Directory Structure Check</h3>
283
- <p><strong>Verify your directory structure:</strong></p>
284
- <pre><code class="language-bash">ls -la docs/
285
- </code></pre>
286
- <p>Expected structure:</p>
287
- <pre><code>docs/
288
- ├── README.md # ✅ Public
289
- ├── other-docs.md # ✅ Public
290
- └── private/ # 🔐 Should require auth
291
- ├── secret-doc.md # 🔐 Should require auth
292
- └── admin/ # 🔐 Should require auth
293
- └── config.md # 🔐 Should require auth
294
- </code></pre>
295
- <p><i style="font-size: 1.2em" class="ph ph-x-circle" aria-label="error"></i> <strong>Common issues:</strong></p>
296
- <ul>
297
- <li><code>Private/</code> (capital P) instead of <code>private/</code> (lowercase)</li>
298
- <li>Empty <code>private/</code> directory</li>
299
- <li><code>private</code> file instead of directory</li>
300
- <li>Symlinks that aren&#39;t properly resolved</li>
301
- </ul>
302
- <h3>3. <i style="font-size: 1.2em" class="ph ph-magnifying-glass" aria-label="search"></i> Generated HTML Verification</h3>
303
- <p><strong>Check if auth.js was included in your build:</strong></p>
304
- <pre><code class="language-bash">ls -la html/js/auth.js
305
- </code></pre>
306
- <p><i style="font-size: 1.2em" class="ph ph-x-circle" aria-label="error"></i> <strong>If auth.js is missing:</strong></p>
307
- <ul>
308
- <li>Authentication wasn&#39;t enabled during build</li>
309
- <li>Check build logs for errors</li>
310
- <li>Verify <code>docs/private/</code> directory exists and contains files</li>
311
- </ul>
312
- <p><strong>Check if private files are being built:</strong></p>
313
- <pre><code class="language-bash">ls -la html/private/
314
- </code></pre>
315
- <p><i style="font-size: 1.2em" class="ph ph-check-circle" aria-label="checked"></i> <strong>Expected:</strong> Private HTML files should exist but be protected by authentication<br><i style="font-size: 1.2em" class="ph ph-x-circle" aria-label="error"></i> <strong>Problem:</strong> If private directory doesn&#39;t exist in output, files weren&#39;t processed</p>
316
- <h3>4. <i style="font-size: 1.2em" class="ph ph-globe" aria-label="global"></i> Browser Testing</h3>
317
- <p><strong>Test in browser (open DevTools Console):</strong></p>
318
- <ol>
319
- <li><strong>Visit a public page</strong> - should load normally</li>
320
- <li><strong>Visit a private page directly</strong> (e.g., <code>yoursite.com/private/secret-doc.html</code>)</li>
321
- <li><strong>Check console for errors:</strong></li>
322
- </ol>
323
- <pre><code class="language-javascript">// Should see these in console for private pages:
324
- // &quot;Checking authentication for private page...&quot;
325
- // &quot;User not authenticated, redirecting to login&quot;
326
- </code></pre>
327
- <p><i style="font-size: 1.2em" class="ph ph-x-circle" aria-label="error"></i> <strong>Common issues:</strong></p>
328
- <ul>
329
- <li>No console messages = auth.js not loading</li>
330
- <li>JavaScript errors = Supabase connection issues</li>
331
- <li>Page loads without auth = private pages not properly protected</li>
332
- </ul>
333
- <h3>5. <i style="font-size: 1.2em" class="ph ph-key" aria-label="key"></i> Authentication Configuration</h3>
334
- <p><strong>Check Supabase connection:</strong></p>
335
- <pre><code class="language-bash">grep -r &quot;supabase&quot; html/js/auth.js
336
- </code></pre>
337
- <p>Should contain:</p>
338
- <ul>
339
- <li>Valid Supabase URL</li>
340
- <li>Valid anonymous key</li>
341
- <li>Domain checking logic</li>
342
- </ul>
343
- <p><i style="font-size: 1.2em" class="ph ph-x-circle" aria-label="error"></i> <strong>Red flags:</strong></p>
344
- <ul>
345
- <li>Missing Supabase credentials</li>
346
- <li>Localhost-only configuration in production</li>
347
- <li>Network errors to Supabase</li>
348
- </ul>
349
- <h2>Common Problems &amp; Solutions</h2>
350
- <h3>Problem 1: &quot;Build shows no private directory detection&quot;</h3>
351
- <p><strong>Cause:</strong> Directory structure issue</p>
352
- <p><strong>Solutions:</strong></p>
353
- <pre><code class="language-bash"># Check if directory exists and has content
354
- ls -la docs/private/
355
- find docs/private/ -name &quot;*.md&quot; -type f
356
-
357
- # Create proper structure if missing
358
- mkdir -p docs/private
359
- echo &quot;# Private Document&quot; &gt; docs/private/test.md
360
-
361
- # Rebuild
362
- npm run build
363
- </code></pre>
364
- <h3>Problem 2: &quot;Private pages load without authentication&quot;</h3>
365
- <p><strong>Cause:</strong> Authentication JavaScript not loading or functioning</p>
366
- <p><strong>Debug steps:</strong></p>
367
- <ol>
368
- <li><strong>Check if auth.js exists:</strong> <code>ls html/js/auth.js</code></li>
369
- <li><strong>Check browser DevTools Network tab</strong> - is auth.js loading?</li>
370
- <li><strong>Check browser Console</strong> - any JavaScript errors?</li>
371
- <li><strong>Verify URL pattern</strong> - does your private URL include <code>/private/</code>?</li>
372
- </ol>
373
- <p><strong>Solutions:</strong></p>
374
- <pre><code class="language-bash"># Force rebuild with verbose output
375
- npm run build -- --verbose
376
-
377
- # Check generated auth.js for errors
378
- cat html/js/auth.js | head -20
379
- </code></pre>
380
- <h3>Problem 3: &quot;Authentication works locally but not in production&quot;</h3>
381
- <p><strong>Cause:</strong> Domain-based access control issue</p>
382
- <p><strong>Debug steps:</strong></p>
383
- <ol>
384
- <li><strong>Check your domain in database:</strong></li>
385
- </ol>
386
- <pre><code class="language-sql">SELECT * FROM docbuilder_access WHERE domain = &#39;yourdomain.com&#39;;
387
- </code></pre>
388
- <ol start="2">
389
- <li><strong>Verify user access:</strong></li>
390
- </ol>
391
- <pre><code class="language-sql">SELECT u.email, da.domain
392
- FROM auth.users u
393
- JOIN docbuilder_access da ON u.id = da.user_id
394
- WHERE da.domain = &#39;yourdomain.com&#39;;
395
- </code></pre>
396
- <p><strong>Solutions:</strong></p>
397
- <pre><code class="language-sql">-- Add your production domain
398
- INSERT INTO docbuilder_access (user_id, domain)
399
- VALUES (&#39;your-user-uuid&#39;, &#39;yourdomain.com&#39;);
400
-
401
- -- Add common domain variations
402
- INSERT INTO docbuilder_access (user_id, domain) VALUES
403
- (&#39;your-user-uuid&#39;, &#39;yourdomain.com&#39;),
404
- (&#39;your-user-uuid&#39;, &#39;www.yourdomain.com&#39;),
405
- (&#39;your-user-uuid&#39;, &#39;docs.yourdomain.com&#39;);
406
- </code></pre>
407
- <h3>Problem 4: &quot;Users can&#39;t login&quot;</h3>
408
- <p><strong>Cause:</strong> User access not granted in database</p>
409
- <p><strong>Debug steps:</strong></p>
410
- <ol>
411
- <li><strong>Check user exists in Supabase Auth dashboard</strong></li>
412
- <li><strong>Verify user has domain access in <code>docbuilder_access</code> table</strong></li>
413
- <li><strong>Check domain matches exactly (case-sensitive)</strong></li>
414
- </ol>
415
- <p><strong>Solutions:</strong></p>
416
- <pre><code class="language-sql">-- Find user ID from email
417
- SELECT id, email FROM auth.users WHERE email = &#39;user@example.com&#39;;
418
-
419
- -- Grant access using the user ID
420
- INSERT INTO docbuilder_access (user_id, domain)
421
- VALUES (&#39;uuid-from-above&#39;, &#39;yourdomain.com&#39;);
422
- </code></pre>
423
- <h2>Step-by-Step Diagnosis</h2>
424
- <h3>Step 1: Verify Build Configuration</h3>
425
- <pre><code class="language-bash"># 1. Check your project structure
426
- tree docs/ -I node_modules
427
-
428
- # 2. Look for config overrides
429
- cat doc-builder.config.js 2&gt;/dev/null || echo &quot;No config file&quot;
430
-
431
- # 3. Clean build
432
- rm -rf html/
433
- npm run build
434
-
435
- # 4. Verify authentication files were created
436
- ls -la html/js/auth.js html/login.html html/logout.html
437
- </code></pre>
438
- <h3>Step 2: Test Authentication Flow</h3>
439
- <pre><code class="language-bash"># 1. Start local server
440
- cd html/
441
- python3 -m http.server 8000
442
-
443
- # 2. Open browser to http://localhost:8000
444
- # 3. Navigate to a private page URL
445
- # 4. Check if redirected to login
446
- </code></pre>
447
- <h3>Step 3: Database Verification</h3>
448
- <pre><code class="language-sql">-- Connect to your Supabase database and run:
449
-
450
- -- 1. Check table exists
451
- \dt docbuilder_access
452
-
453
- -- 2. Check your domain entries
454
- SELECT domain, COUNT(*) as user_count
455
- FROM docbuilder_access
456
- GROUP BY domain;
457
-
458
- -- 3. Check specific user access
459
- SELECT u.email, da.domain
460
- FROM auth.users u
461
- JOIN docbuilder_access da ON u.id = da.user_id
462
- WHERE u.email = &#39;your-email@example.com&#39;;
463
- </code></pre>
464
- <h2>Emergency Fixes</h2>
465
- <h3>Quick Fix 1: Force Authentication On</h3>
466
- <p>Add to your <code>doc-builder.config.js</code>:</p>
467
- <pre><code class="language-javascript">module.exports = {
468
- features: {
469
- authentication: &#39;supabase&#39; // Forces entire site to require auth
470
- }
471
- };
472
- </code></pre>
473
- <h3>Quick Fix 2: Manual Auth.js Check</h3>
474
- <p>Verify authentication script is working:</p>
475
- <pre><code class="language-javascript">// Add to browser console on private page:
476
- if (typeof supabase !== &#39;undefined&#39;) {
477
- console.log(&#39;✅ Supabase loaded&#39;);
478
- } else {
479
- console.log(&#39;❌ Supabase not loaded - check auth.js&#39;);
480
- }
481
- </code></pre>
482
- <h3>Quick Fix 3: Bypass for Testing</h3>
483
- <p><strong><i style="font-size: 1.2em" class="ph ph-warning-circle" aria-label="warning"></i> TEMPORARY ONLY - DO NOT USE IN PRODUCTION</strong></p>
484
- <pre><code class="language-javascript">// Add to html/js/auth.js for testing (REMOVE AFTER TESTING):
485
- // document.body.classList.add(&#39;authenticated&#39;);
486
- // console.log(&#39;🚨 BYPASSING AUTH - REMOVE THIS&#39;);
487
- </code></pre>
488
- <h2>Prevention Checklist</h2>
489
- <p><i style="font-size: 1.2em" class="ph ph-check-circle" aria-label="checked"></i> <strong>Before deploying:</strong></p>
490
- <ul>
491
- <li><input disabled="" type="checkbox"> <code>docs/private/</code> directory exists and contains files</li>
492
- <li><input disabled="" type="checkbox"> Build logs show &quot;Found private directory&quot; message </li>
493
- <li><input disabled="" type="checkbox"> <code>html/js/auth.js</code> file exists after build</li>
494
- <li><input disabled="" type="checkbox"> Users added to <code>docbuilder_access</code> table with correct domain</li>
495
- <li><input disabled="" type="checkbox"> Tested authentication flow on staging/local environment</li>
496
- <li><input disabled="" type="checkbox"> Verified private pages redirect to login when not authenticated</li>
497
- <li><input disabled="" type="checkbox"> Confirmed authenticated users can access private content</li>
498
- </ul>
499
- <p><i style="font-size: 1.2em" class="ph ph-check-circle" aria-label="checked"></i> <strong>After deploying:</strong></p>
500
- <ul>
501
- <li><input disabled="" type="checkbox"> Test private page access in incognito browser</li>
502
- <li><input disabled="" type="checkbox"> Verify login/logout flow works</li>
503
- <li><input disabled="" type="checkbox"> Check browser DevTools for JavaScript errors</li>
504
- <li><input disabled="" type="checkbox"> Confirm domain matches database entries exactly</li>
505
- </ul>
506
- <h2>Getting Help</h2>
507
- <p>If authentication still isn&#39;t working after following this guide:</p>
508
- <ol>
509
- <li><p><strong>Gather debug info:</strong></p>
510
- <ul>
511
- <li>Build output logs</li>
512
- <li>Browser DevTools Console errors</li>
513
- <li>Network tab showing failed requests</li>
514
- <li>Your domain name and directory structure</li>
515
- </ul>
516
- </li>
517
- <li><p><strong>Check common scenarios:</strong></p>
518
- <ul>
519
- <li>Does it work locally but not in production?</li>
520
- <li>Does the login page appear but login fails?</li>
521
- <li>Are private pages completely public?</li>
522
- <li>Do you see JavaScript errors?</li>
523
- </ul>
524
- </li>
525
- <li><p><strong>Verify requirements:</strong></p>
526
- <ul>
527
- <li>Supabase project is accessible</li>
528
- <li>Database table <code>docbuilder_access</code> exists</li>
529
- <li>User accounts exist in Supabase Auth</li>
530
- <li>Domain entries match your deployment URL exactly</li>
531
- </ul>
532
- </li>
533
- </ol>
534
- <p>The authentication system is designed to &quot;fail secure&quot; - if there are any doubts about configuration, it should redirect to login rather than expose private content.</p>
535
-
536
- </div>
537
- </main>
538
- </div>
539
-
540
- <!-- Scripts -->
541
- <script>
542
- // Pass configuration to frontend
543
- window.docBuilderConfig = {
544
- features: {
545
- showPdfDownload: true,
546
- menuDefaultOpen: false,
547
- mermaidEnhanced: true
548
- }
549
- };
550
- </script>
551
- <script src="/js/main.js"></script>
552
- <script src="https://unpkg.com/@supabase/supabase-js@2"></script>
553
- <script src="/js/auth.js"></script>
554
- </body>
555
- </html>