@knowcode/doc-builder 1.7.6 → 1.8.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 (42) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/CHANGELOG.md +22 -0
  3. package/assets/css/notion-style.css +9 -1
  4. package/html/README.html +5 -19
  5. package/html/css/notion-style.css +9 -1
  6. package/html/documentation-index.html +5 -19
  7. package/html/guides/authentication-default-change.html +5 -19
  8. package/html/guides/authentication-guide.html +189 -262
  9. package/html/guides/claude-workflow-guide.html +5 -19
  10. package/html/guides/documentation-standards.html +5 -19
  11. package/html/guides/phosphor-icons-guide.html +5 -19
  12. package/html/guides/private-directory-authentication.html +352 -0
  13. package/html/guides/public-site-deployment.html +11 -24
  14. package/html/guides/search-engine-verification-guide.html +5 -19
  15. package/html/guides/seo-guide.html +5 -19
  16. package/html/guides/seo-optimization-guide.html +5 -19
  17. package/html/guides/troubleshooting-guide.html +5 -19
  18. package/html/guides/windows-setup-guide.html +5 -19
  19. package/html/index.html +5 -19
  20. package/html/private/cache-control-anti-pattern.html +347 -0
  21. package/html/private/launch/README.html +289 -0
  22. package/html/private/launch/auth-cleanup-summary.html +279 -0
  23. package/html/private/launch/bubble-plugin-specification.html +925 -0
  24. package/html/private/launch/go-to-market-strategy.html +655 -0
  25. package/html/private/launch/launch-announcements.html +585 -0
  26. package/html/private/launch/vercel-deployment-auth-setup.html +329 -0
  27. package/html/private/next-steps-walkthrough.html +624 -0
  28. package/html/private/supabase-auth-implementation-completed.html +372 -0
  29. package/html/private/supabase-auth-implementation-plan.html +529 -0
  30. package/html/private/supabase-auth-integration-plan.html +657 -0
  31. package/html/private/supabase-auth-setup-guide.html +484 -0
  32. package/html/private/test-private-doc.html +220 -0
  33. package/html/sitemap.xml +113 -29
  34. package/html/vercel-cli-setup-guide.html +5 -19
  35. package/html/vercel-first-time-setup-guide.html +5 -19
  36. package/lib/config.js +24 -0
  37. package/lib/core-builder.js +40 -6
  38. package/lib/supabase-auth.js +60 -11
  39. package/package.json +1 -1
  40. package/user-management/README.md +81 -0
  41. package/user-management/add-users.sh +357 -0
  42. package/user-management/users.txt +15 -0
@@ -0,0 +1,329 @@
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="Your test documentation site is now live at:">
7
+ <title>Vercel Deployment Authentication Setup Guide</title>
8
+
9
+ <meta name="author" content="Lindsay Smith">
10
+ <meta name="keywords" content="documentation, markdown, static site generator, vercel, notion-style, supabase, authentication">
11
+ <meta name="robots" content="index, follow">
12
+ <link rel="canonical" href="https://doc-builder-delta.vercel.app/private/launch/vercel-deployment-auth-setup.html">
13
+
14
+ <!-- Open Graph / Facebook -->
15
+ <meta property="og:type" content="article">
16
+ <meta property="og:url" content="https://doc-builder-delta.vercel.app/private/launch/vercel-deployment-auth-setup.html">
17
+ <meta property="og:title" content="Vercel Deployment Authentication Setup Guide">
18
+ <meta property="og:description" content="Your test documentation site is now live at:">
19
+ <meta property="og:image" content="https://doc-builder-delta.vercel.app/og-default.png">
20
+ <meta property="og:site_name" content="@knowcode/doc-builder">
21
+ <meta property="og:locale" content="en_US">
22
+
23
+ <!-- Twitter Card -->
24
+ <meta name="twitter:card" content="summary_large_image">
25
+ <meta name="twitter:site" content="@planbbackups">
26
+ <meta name="twitter:creator" content="@planbbackups">
27
+ <meta name="twitter:title" content="Vercel Deployment Authentication Setup Guide">
28
+ <meta name="twitter:description" content="Your test documentation site is now live at:">
29
+ <meta name="twitter:image" content="https://doc-builder-delta.vercel.app/og-default.png">
30
+
31
+ <!-- Custom Meta Tags -->
32
+ <meta name="google-site-verification" content="FtzcDTf5BQ9K5EfnGazQkgU2U4FiN3ITzM7gHwqUAqQ">
33
+ <meta name="msvalidate.01" content="B2D8C4C12C530D47AA962B24CAA09630">
34
+
35
+ <!-- Fonts -->
36
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
37
+
38
+ <!-- Icons -->
39
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
40
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.css">
41
+
42
+ <!-- Mermaid -->
43
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
44
+
45
+ <!-- Styles -->
46
+ <link rel="stylesheet" href="/css/notion-style.css">
47
+
48
+
49
+
50
+ <!-- Favicon -->
51
+ <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>">
52
+
53
+ <script type="application/ld+json">
54
+ {
55
+ "@context": "https://schema.org",
56
+ "@type": "TechArticle",
57
+ "headline": "Vercel Deployment Authentication Setup Guide",
58
+ "description": "Your test documentation site is now live at:",
59
+ "author": {
60
+ "@type": "Person",
61
+ "name": "Lindsay Smith"
62
+ },
63
+ "publisher": {
64
+ "@type": "Organization",
65
+ "name": "Knowcode Ltd",
66
+ "url": "https://knowcode.tech"
67
+ },
68
+ "datePublished": "2025-07-26T09:59:23.000Z",
69
+ "dateModified": "2025-07-26T09:59:23.000Z",
70
+ "mainEntityOfPage": {
71
+ "@type": "WebPage",
72
+ "@id": "https://doc-builder-delta.vercel.app/private/launch/vercel-deployment-auth-setup.html"
73
+ },
74
+ "breadcrumb": {
75
+ "@type": "BreadcrumbList",
76
+ "itemListElement": [
77
+ {
78
+ "@type": "ListItem",
79
+ "position": 1,
80
+ "name": "@knowcode/doc-builder",
81
+ "item": "https://doc-builder-delta.vercel.app"
82
+ },
83
+ {
84
+ "@type": "ListItem",
85
+ "position": 2,
86
+ "name": "Private",
87
+ "item": "https://doc-builder-delta.vercel.app/private/"
88
+ },
89
+ {
90
+ "@type": "ListItem",
91
+ "position": 3,
92
+ "name": "Launch",
93
+ "item": "https://doc-builder-delta.vercel.app/private/launch/"
94
+ },
95
+ {
96
+ "@type": "ListItem",
97
+ "position": 4,
98
+ "name": "Vercel Deployment Auth Setup",
99
+ "item": "https://doc-builder-delta.vercel.app/private/launch/vercel-deployment-auth-setup.html"
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ </script>
105
+ </head>
106
+ <body>
107
+ <!-- Header -->
108
+ <header class="header">
109
+ <div class="header-content">
110
+ <a href="/index.html" class="logo">@knowcode/doc-builder</a>
111
+
112
+ <div class="header-actions">
113
+ <div class="deployment-info">
114
+ <span class="deployment-date" title="Built with doc-builder v1.8.0">Last updated: Jul 26, 2025, 09:59 AM UTC</span>
115
+ </div>
116
+
117
+
118
+
119
+ <button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
120
+ <i class="fas fa-moon"></i>
121
+ </button>
122
+
123
+ <button id="menu-toggle" class="menu-toggle" aria-label="Toggle menu">
124
+ <i class="fas fa-bars"></i>
125
+ </button>
126
+ </div>
127
+ </div>
128
+ </header>
129
+
130
+ <!-- Preview Banner -->
131
+ <div id="preview-banner" class="preview-banner">
132
+ <div class="banner-content">
133
+ <i class="fas fa-exclamation-triangle banner-icon"></i>
134
+ <span class="banner-text">This documentation is a preview version - some content may be incomplete</span>
135
+ <button id="dismiss-banner" class="banner-dismiss" aria-label="Dismiss banner">
136
+ <i class="fas fa-times"></i>
137
+ </button>
138
+ </div>
139
+ </div>
140
+
141
+ <!-- Breadcrumbs -->
142
+ <nav class="breadcrumbs" id="breadcrumbs">
143
+ <!-- Breadcrumbs will be generated by JavaScript -->
144
+ </nav>
145
+
146
+ <!-- Main Content -->
147
+ <div class="main-wrapper">
148
+ <!-- Sidebar -->
149
+ <aside class="sidebar">
150
+ <div class="sidebar-header">
151
+ <div class="filter-box">
152
+ <input type="text" placeholder="Filter items..." class="filter-input" id="nav-filter">
153
+ <i class="fas fa-search filter-icon"></i>
154
+ </div>
155
+ </div>
156
+ <nav class="navigation">
157
+
158
+ <div class="nav-section" data-level="0">
159
+ <a class="nav-title" href="/README.html" >
160
+ <i class="fas fa-home"></i> Documentation
161
+ </a>
162
+ <div class="nav-content" >
163
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
164
+ <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="fas fa-file-alt"></i> Documentation Index</a>
165
+ <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="fas fa-file-alt"></i> Vercel Cli Setup Guide</a>
166
+ <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="fas fa-file-alt"></i> Vercel First Time Setup Guide</a></div></div>
167
+ <div class="nav-section" data-level="1">
168
+ <a class="nav-title collapsible" href="#" data-target="nav-guides-1" >
169
+ <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
170
+ </a>
171
+ <div class="nav-content collapsed" id="nav-guides-1">
172
+ <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="fas fa-file-alt"></i> Authentication Default Change</a>
173
+ <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="fas fa-file-alt"></i> Authentication Guide</a>
174
+ <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="fas fa-file-alt"></i> Claude Workflow Guide</a>
175
+ <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="fas fa-file-alt"></i> Documentation Standards</a>
176
+ <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="fas fa-file-alt"></i> Phosphor Icons Guide</a>
177
+ <a href="/guides/private-directory-authentication.html" class="nav-item" data-tooltip="The @knowcode/doc-builder now includes automatic authentication for documents placed in a directory."><i class="fas fa-file-alt"></i> Private Directory Authentication</a>
178
+ <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="fas fa-file-alt"></i> Public Site Deployment</a>
179
+ <a href="/guides/search-engine-verification-guide.html" class="nav-item" data-tooltip="Search engine verification provides access to powerful webmaster tools:."><i class="fas fa-file-alt"></i> Search Engine Verification Guide</a>
180
+ <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="fas fa-file-alt"></i> Seo Guide</a>
181
+ <a href="/guides/seo-optimization-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder includes comprehensive SEO (Search Engine Optimization) features that automatically optimize your documentation for search..."><i class="fas fa-file-alt"></i> Seo Optimization Guide</a>
182
+ <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="fas fa-file-alt"></i> Troubleshooting Guide</a>
183
+ <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="fas fa-file-alt"></i> Windows Setup Guide</a></div></div>
184
+ </nav>
185
+ <div class="resize-handle"></div>
186
+ </aside>
187
+
188
+ <!-- Content Area -->
189
+ <main class="content">
190
+ <div class="content-inner">
191
+ <h1>Vercel Deployment Authentication Setup Guide</h1>
192
+ <h2>Your Deployed Site</h2>
193
+ <p>Your test documentation site is now live at:</p>
194
+ <ul>
195
+ <li><strong>URL</strong>: <a href="https://doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app">https://doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app</a></li>
196
+ </ul>
197
+ <h2>Step 1: Update Supabase Database</h2>
198
+ <p>You need to update the domain in your Supabase database to allow authentication from the Vercel domain.</p>
199
+ <h3>Option A: Using Supabase Dashboard (Recommended)</h3>
200
+ <ol>
201
+ <li>Go to your Supabase project: <a href="https://supabase.com/dashboard/project/xcihhnfcitjrwbynxmka">https://supabase.com/dashboard/project/xcihhnfcitjrwbynxmka</a></li>
202
+ <li>Click on <strong>Table Editor</strong> in the left sidebar</li>
203
+ <li>Select the <code>docbuilder_sites</code> table</li>
204
+ <li>Find the row with ID <code>4d8a53bf-dcdd-48c0-98e0-cd1451518735</code></li>
205
+ <li>Click the edit icon (pencil)</li>
206
+ <li>Change the <code>domain</code> field from <code>localhost:3000</code> to <code>doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app</code></li>
207
+ <li>Click <strong>Save</strong></li>
208
+ </ol>
209
+ <h3>Option B: Using SQL Editor</h3>
210
+ <ol>
211
+ <li>Go to your Supabase project dashboard</li>
212
+ <li>Click on <strong>SQL Editor</strong> in the left sidebar</li>
213
+ <li>Run this SQL command:</li>
214
+ </ol>
215
+ <pre><code class="language-sql">-- Update domain for Vercel deployment
216
+ UPDATE docbuilder_sites
217
+ SET domain = &#39;doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app&#39;
218
+ WHERE id = &#39;4d8a53bf-dcdd-48c0-98e0-cd1451518735&#39;;
219
+
220
+ -- Verify the update
221
+ SELECT id, domain, name
222
+ FROM docbuilder_sites
223
+ WHERE id = &#39;4d8a53bf-dcdd-48c0-98e0-cd1451518735&#39;;
224
+ </code></pre>
225
+ <h2>Step 2: Test Authentication Flow</h2>
226
+ <p>Once the database is updated, test the authentication:</p>
227
+ <ol>
228
+ <li><strong>Visit your site</strong>: <a href="https://doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app">https://doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app</a></li>
229
+ <li>You should be automatically redirected to the login page</li>
230
+ <li>Login with your test credentials:<ul>
231
+ <li>Email: <code>testuser@example.com</code></li>
232
+ <li>Password: <code>testpass123</code></li>
233
+ </ul>
234
+ </li>
235
+ <li>After successful login, you should see the test documentation content</li>
236
+ </ol>
237
+ <h2>Step 3: Verify Authentication Features</h2>
238
+ <h3><i class="ph ph-check-circle" aria-label="checked"></i> What Should Work:</h3>
239
+ <ul>
240
+ <li>Automatic redirect to login for unauthenticated users</li>
241
+ <li>No content flash before redirect (fixed with CSS)</li>
242
+ <li>Successful login with valid credentials</li>
243
+ <li>Access to documentation after authentication</li>
244
+ <li>Logout functionality</li>
245
+ <li>Session persistence across page refreshes</li>
246
+ </ul>
247
+ <h3><i class="ph ph-magnifying-glass" aria-label="search"></i> Things to Check:</h3>
248
+ <ol>
249
+ <li><strong>Network Tab</strong>: Look for Supabase API calls to verify authentication</li>
250
+ <li><strong>Console</strong>: Check for any JavaScript errors</li>
251
+ <li><strong>Browser Cache</strong>: Clear cache if you see stale content</li>
252
+ <li><strong>Session Storage</strong>: Verify Supabase JWT token is stored</li>
253
+ </ol>
254
+ <h2>Troubleshooting</h2>
255
+ <h3>If Login Fails:</h3>
256
+ <ul>
257
+ <li>Verify the domain was updated correctly in Supabase</li>
258
+ <li>Check browser console for errors</li>
259
+ <li>Ensure cookies are enabled</li>
260
+ <li>Try incognito/private browsing mode</li>
261
+ </ul>
262
+ <h3>If Content Doesn&#39;t Show After Login:</h3>
263
+ <ul>
264
+ <li>Clear browser cache completely</li>
265
+ <li>Check console for JavaScript errors</li>
266
+ <li>Verify the <code>authenticated</code> class is added to body element</li>
267
+ <li>Ensure JavaScript is enabled</li>
268
+ </ul>
269
+ <h2>Next Steps</h2>
270
+ <p>After successful testing, you can:</p>
271
+ <ol>
272
+ <li><p><strong>Create Production Deployment</strong>:</p>
273
+ <pre><code class="language-bash"># Deploy to production URL
274
+ vercel --prod
275
+ </code></pre>
276
+ </li>
277
+ <li><p><strong>Add Custom Domain</strong>:</p>
278
+ <ul>
279
+ <li>Configure custom domain in Vercel</li>
280
+ <li>Update Supabase database with new domain</li>
281
+ </ul>
282
+ </li>
283
+ <li><p><strong>Add More Users</strong>:</p>
284
+ <pre><code class="language-bash"># Use CLI command
285
+ npx @knowcode/doc-builder auth:add-user production-email@example.com
286
+ </code></pre>
287
+ </li>
288
+ <li><p><strong>Deploy Multiple Sites</strong>:</p>
289
+ <ul>
290
+ <li>Each site gets unique site_id</li>
291
+ <li>Users can have access to multiple sites</li>
292
+ <li>Central authentication system</li>
293
+ </ul>
294
+ </li>
295
+ </ol>
296
+ <h2>Security Notes</h2>
297
+ <ul>
298
+ <li>The Supabase URL and anon key are public (by design)</li>
299
+ <li>Security is enforced through Row Level Security (RLS) policies</li>
300
+ <li>JWT tokens expire and auto-refresh</li>
301
+ <li>Password hashing is handled by Supabase (bcrypt)</li>
302
+ </ul>
303
+ <h2>Important URLs</h2>
304
+ <ul>
305
+ <li><strong>Live Site</strong>: <a href="https://doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app">https://doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app</a></li>
306
+ <li><strong>Supabase Dashboard</strong>: <a href="https://supabase.com/dashboard/project/xcihhnfcitjrwbynxmka">https://supabase.com/dashboard/project/xcihhnfcitjrwbynxmka</a></li>
307
+ <li><strong>Vercel Dashboard</strong>: <a href="https://vercel.com/dashboard">https://vercel.com/dashboard</a></li>
308
+ </ul>
309
+ <hr>
310
+ <p><strong>Status</strong>: Ready for database update and testing<br><strong>Next Action</strong>: Update the domain in Supabase database</p>
311
+
312
+ </div>
313
+ </main>
314
+ </div>
315
+
316
+ <!-- Scripts -->
317
+ <script>
318
+ // Pass configuration to frontend
319
+ window.docBuilderConfig = {
320
+ features: {
321
+ showPdfDownload: true,
322
+ menuDefaultOpen: false
323
+ }
324
+ };
325
+ </script>
326
+ <script src="/js/main.js"></script>
327
+
328
+ </body>
329
+ </html>