@knowcode/doc-builder 1.8.2 → 1.8.4

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 (52) hide show
  1. package/.claude/settings.local.json +5 -1
  2. package/CHANGELOG.md +39 -3
  3. package/README.md +4 -4
  4. package/assets/css/notion-style.css +26 -0
  5. package/cli.js +9 -40
  6. package/debug-login.sql +30 -0
  7. package/html/README.html +27 -3
  8. package/html/auth.js +2 -2
  9. package/html/css/notion-style.css +26 -0
  10. package/html/documentation-index.html +27 -3
  11. package/html/guides/authentication-default-change.html +27 -3
  12. package/html/guides/authentication-guide.html +58 -45
  13. package/html/guides/claude-workflow-guide.html +27 -3
  14. package/html/guides/documentation-standards.html +27 -3
  15. package/html/guides/phosphor-icons-guide.html +27 -3
  16. package/html/guides/private-directory-authentication.html +59 -17
  17. package/html/guides/public-site-deployment.html +32 -9
  18. package/html/guides/search-engine-verification-guide.html +27 -3
  19. package/html/guides/seo-guide.html +27 -3
  20. package/html/guides/seo-optimization-guide.html +27 -3
  21. package/html/guides/troubleshooting-guide.html +27 -3
  22. package/html/guides/windows-setup-guide.html +27 -3
  23. package/html/index.html +27 -3
  24. package/html/js/auth.js +2 -2
  25. package/html/login.html +2 -2
  26. package/html/private/cache-control-anti-pattern.html +5 -5
  27. package/html/private/launch/README.html +5 -5
  28. package/html/private/launch/auth-cleanup-summary.html +5 -5
  29. package/html/private/launch/bubble-plugin-specification.html +5 -5
  30. package/html/private/launch/go-to-market-strategy.html +5 -5
  31. package/html/private/launch/launch-announcements.html +5 -5
  32. package/html/private/launch/vercel-deployment-auth-setup.html +27 -21
  33. package/html/private/next-steps-walkthrough.html +18 -45
  34. package/html/private/supabase-auth-implementation-completed.html +8 -8
  35. package/html/private/supabase-auth-implementation-plan.html +16 -33
  36. package/html/private/supabase-auth-integration-plan.html +34 -69
  37. package/html/private/supabase-auth-setup-guide.html +73 -84
  38. package/html/private/test-private-doc.html +5 -5
  39. package/html/private/user-management-tooling.html +9 -15
  40. package/html/sitemap.xml +44 -44
  41. package/html/vercel-cli-setup-guide.html +27 -3
  42. package/html/vercel-first-time-setup-guide.html +27 -3
  43. package/lib/config.js +3 -11
  44. package/lib/core-builder.js +7 -12
  45. package/lib/shared-auth-config.js +2 -10
  46. package/lib/supabase-auth.js +5 -11
  47. package/migrate-to-domain-auth.sql +47 -0
  48. package/package.json +1 -1
  49. package/setup-database-v2.sql +53 -0
  50. package/user-access-view.sql +49 -0
  51. package/user-management/README.md +9 -18
  52. package/user-management/add-users.sh +31 -11
@@ -98,8 +98,8 @@
98
98
  "name": "Knowcode Ltd",
99
99
  "url": "https://knowcode.tech"
100
100
  },
101
- "datePublished": "2025-07-26T10:38:42.034Z",
102
- "dateModified": "2025-07-26T10:38:42.034Z",
101
+ "datePublished": "2025-07-26T11:44:31.537Z",
102
+ "dateModified": "2025-07-26T11:44:31.537Z",
103
103
  "mainEntityOfPage": {
104
104
  "@type": "WebPage",
105
105
  "@id": "https://doc-builder-delta.vercel.app/private/supabase-auth-setup-guide.html"
@@ -138,7 +138,7 @@
138
138
 
139
139
  <div class="header-actions">
140
140
  <div class="deployment-info">
141
- <span class="deployment-date" title="Built with doc-builder v1.8.1">Last updated: Jul 26, 2025, 10:38 AM UTC</span>
141
+ <span class="deployment-date" title="Built with doc-builder v1.8.3">Last updated: Jul 26, 2025, 11:44 AM UTC</span>
142
142
  </div>
143
143
 
144
144
 
@@ -212,7 +212,7 @@
212
212
  <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>
213
213
  <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>
214
214
  <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>
215
- <div class="nav-section" data-level="1">
215
+ <div class="nav-section private-nav" data-level="1">
216
216
  <a class="nav-title collapsible expanded" href="#" data-target="nav-private-1" >
217
217
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
218
218
  </a>
@@ -225,7 +225,7 @@
225
225
  <a href="/private/supabase-auth-setup-guide.html" class="nav-item active" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase."><i class="fas fa-file-alt"></i> Supabase Auth Setup Guide</a>
226
226
  <a href="/private/test-private-doc.html" class="nav-item" data-tooltip="Test Private Document."><i class="fas fa-file-alt"></i> Test Private Doc</a>
227
227
  <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="fas fa-file-alt"></i> User Management Tooling</a></div></div>
228
- <div class="nav-section" data-level="2">
228
+ <div class="nav-section private-nav" data-level="2">
229
229
  <a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
230
230
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
231
231
  </a>
@@ -249,10 +249,11 @@
249
249
  <p>@knowcode/doc-builder supports enterprise-grade authentication through Supabase. This provides:</p>
250
250
  <ul>
251
251
  <li><strong>Secure authentication</strong> with industry-standard security practices</li>
252
- <li><strong>Multi-site support</strong> - one account can access multiple documentation sites</li>
252
+ <li><strong>Domain-based access</strong> - automatic authentication based on site domain</li>
253
253
  <li><strong>User management</strong> through CLI commands</li>
254
254
  <li><strong>Password reset</strong> functionality built-in</li>
255
255
  <li><strong>Enterprise features</strong> like audit logging and access control</li>
256
+ <li><strong>Zero configuration</strong> - built-in credentials (v1.8.2+)</li>
256
257
  </ul>
257
258
  <h2>Prerequisites</h2>
258
259
  <ol>
@@ -272,41 +273,30 @@
272
273
  <p>Wait for the project to be created (usually 1-2 minutes).</p>
273
274
  <h2>Step 2: Create Database Tables</h2>
274
275
  <p>In your Supabase dashboard, go to <strong>SQL Editor</strong> and run this SQL:</p>
275
- <pre><code class="language-sql">-- Table 1: Documentation sites
276
- CREATE TABLE docbuilder_sites (
277
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
278
- domain TEXT UNIQUE NOT NULL,
279
- name TEXT NOT NULL,
280
- created_at TIMESTAMPTZ DEFAULT NOW()
281
- );
282
-
283
- -- Table 2: User access mapping
276
+ <pre><code class="language-sql">-- Single table for user access control (simplified!)
284
277
  CREATE TABLE docbuilder_access (
285
278
  user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE,
286
- site_id UUID REFERENCES docbuilder_sites(id) ON DELETE CASCADE,
279
+ domain TEXT NOT NULL,
287
280
  created_at TIMESTAMPTZ DEFAULT NOW(),
288
- PRIMARY KEY (user_id, site_id)
281
+ PRIMARY KEY (user_id, domain)
289
282
  );
290
283
 
284
+ -- Create index for faster lookups
285
+ CREATE INDEX idx_docbuilder_access_domain ON docbuilder_access(domain);
286
+
291
287
  -- Enable Row Level Security
292
- ALTER TABLE docbuilder_sites ENABLE ROW LEVEL SECURITY;
293
288
  ALTER TABLE docbuilder_access ENABLE ROW LEVEL SECURITY;
294
289
 
295
- -- RLS Policy: Users can only see sites they have access to
296
- CREATE POLICY &quot;Users see accessible sites&quot; ON docbuilder_sites
297
- FOR SELECT USING (
298
- EXISTS (
299
- SELECT 1 FROM docbuilder_access
300
- WHERE site_id = docbuilder_sites.id
301
- AND user_id = auth.uid()
302
- )
303
- );
304
-
305
- -- RLS Policy: Users can see their own access
290
+ -- RLS Policy: Users can only see their own access
306
291
  CREATE POLICY &quot;Users see own access&quot; ON docbuilder_access
307
292
  FOR SELECT USING (user_id = auth.uid());
308
293
  </code></pre>
309
- <h2>Step 3: Get Supabase Credentials</h2>
294
+ <h2>Step 3: Configure Authentication (Automatic in v1.8.2+)</h2>
295
+ <p>As of version 1.8.2, Supabase credentials are automatically configured! You have two options:</p>
296
+ <h3>Option 1: Use Built-in Credentials (Recommended)</h3>
297
+ <p>Simply create a <code>docs/private/</code> directory or set <code>authentication: &#39;supabase&#39;</code> in your config. The system will automatically use the shared authentication database.</p>
298
+ <h3>Option 2: Use Custom Supabase Project</h3>
299
+ <p>If you want to use your own Supabase project:</p>
310
300
  <ol>
311
301
  <li>In your Supabase dashboard, go to <strong>Settings</strong> → <strong>API</strong></li>
312
302
  <li>Copy these values:<ul>
@@ -317,16 +307,20 @@ CREATE POLICY &quot;Users see own access&quot; ON docbuilder_access
317
307
  </ol>
318
308
  <p><i class="ph ph-warning-circle" aria-label="warning"></i> <strong>Never share your service role key</strong> - only use the anon/public key for doc-builder.</p>
319
309
  <h2>Step 4: Initialize Authentication</h2>
320
- <p>Run the initialization command in your documentation project:</p>
321
- <pre><code class="language-bash">npx @knowcode/doc-builder auth:init
310
+ <h3>Option 1: Automatic Setup (v1.8.2+)</h3>
311
+ <p>Just create a config file or use the <code>--preset</code> flag:</p>
312
+ <pre><code class="language-javascript">// doc-builder.config.js
313
+ module.exports = {
314
+ siteName: &#39;My Documentation&#39;,
315
+
316
+ features: {
317
+ authentication: &#39;supabase&#39;
318
+ }
319
+ // No auth config needed - uses built-in credentials!
320
+ };
322
321
  </code></pre>
323
- <p>This will prompt you for:</p>
324
- <ul>
325
- <li>Your Supabase project URL</li>
326
- <li>Your Supabase anonymous key </li>
327
- <li>A name for your documentation site</li>
328
- </ul>
329
- <p>It creates a <code>doc-builder.config.js</code> file like this:</p>
322
+ <h3>Option 2: Custom Supabase Project</h3>
323
+ <p>If using your own Supabase project:</p>
330
324
  <pre><code class="language-javascript">module.exports = {
331
325
  siteName: &#39;My Documentation&#39;,
332
326
 
@@ -336,24 +330,13 @@ CREATE POLICY &quot;Users see own access&quot; ON docbuilder_access
336
330
 
337
331
  auth: {
338
332
  supabaseUrl: &#39;https://xxx.supabase.co&#39;,
339
- supabaseAnonKey: &#39;eyJ...&#39;,
340
- siteId: &#39;&#39; // Will be set in next step
333
+ supabaseAnonKey: &#39;eyJ...&#39;
334
+ // No siteId needed - uses domain automatically!
341
335
  }
342
336
  };
343
337
  </code></pre>
344
- <h2>Step 5: Add Your Site to Database</h2>
345
- <h3>Option A: Using SQL (Recommended)</h3>
346
- <p>In Supabase SQL Editor, run:</p>
347
- <pre><code class="language-sql">INSERT INTO docbuilder_sites (domain, name)
348
- VALUES (&#39;docs.yourcompany.com&#39;, &#39;Company Documentation&#39;)
349
- RETURNING id;
350
- </code></pre>
351
- <p>Copy the returned ID and update your config file&#39;s <code>siteId</code> field.</p>
352
- <h3>Option B: Using CLI (Coming Soon)</h3>
353
- <pre><code class="language-bash">npx @knowcode/doc-builder auth:add-site \
354
- --domain docs.yourcompany.com \
355
- --name &quot;Company Documentation&quot;
356
- </code></pre>
338
+ <h2>Step 5: No Site Registration Needed!</h2>
339
+ <p>The new domain-based system eliminates the need for site registration. The system automatically uses the current domain (e.g., <code>docs.example.com</code>) as the access key. Just grant users access to your domain in the next step.</p>
357
340
  <h2>Step 6: Create Your First User</h2>
358
341
  <h3>Method 1: Through Supabase Dashboard</h3>
359
342
  <ol>
@@ -367,14 +350,23 @@ RETURNING id;
367
350
  <p>Users can sign up when they visit your documentation site and try to log in.</p>
368
351
  <h2>Step 7: Grant User Access</h2>
369
352
  <h3>Using SQL:</h3>
370
- <pre><code class="language-sql">-- Replace with actual user ID and site ID
371
- INSERT INTO docbuilder_access (user_id, site_id)
372
- VALUES (&#39;user-uuid-here&#39;, &#39;site-uuid-here&#39;);
353
+ <pre><code class="language-sql">-- Grant access by domain (no site ID needed!)
354
+ INSERT INTO docbuilder_access (user_id, domain)
355
+ VALUES (
356
+ (SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;),
357
+ &#39;docs.yourcompany.com&#39;
358
+ );
359
+
360
+ -- Grant access to multiple domains
361
+ INSERT INTO docbuilder_access (user_id, domain) VALUES
362
+ ((SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;), &#39;docs.yourcompany.com&#39;),
363
+ ((SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;), &#39;staging-docs.yourcompany.com&#39;),
364
+ ((SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;), &#39;localhost:3000&#39;);
373
365
  </code></pre>
374
366
  <h3>Using CLI (Coming Soon):</h3>
375
367
  <pre><code class="language-bash">npx @knowcode/doc-builder auth:grant \
376
368
  --email user@example.com \
377
- --site-id your-site-uuid
369
+ --domain docs.yourcompany.com
378
370
  </code></pre>
379
371
  <h2>Step 8: Build and Deploy</h2>
380
372
  <pre><code class="language-bash"># Build with Supabase authentication
@@ -386,55 +378,52 @@ npx @knowcode/doc-builder deploy
386
378
  <p>Your documentation site now has secure authentication! <i class="ph ph-confetti" aria-label="party"></i></p>
387
379
  <h2>User Management</h2>
388
380
  <h3>List Users with Access</h3>
389
- <pre><code class="language-sql">SELECT u.email, da.created_at as granted_at
381
+ <pre><code class="language-sql">-- List all users for a specific domain
382
+ SELECT u.email, da.created_at as granted_at
390
383
  FROM docbuilder_access da
391
384
  JOIN auth.users u ON u.id = da.user_id
392
- WHERE da.site_id = &#39;your-site-id&#39;;
385
+ WHERE da.domain = &#39;docs.yourcompany.com&#39;;
393
386
  </code></pre>
394
387
  <h3>Revoke Access</h3>
395
- <pre><code class="language-sql">DELETE FROM docbuilder_access
388
+ <pre><code class="language-sql">-- Remove access for a specific domain
389
+ DELETE FROM docbuilder_access
396
390
  WHERE user_id = (SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;)
397
- AND site_id = &#39;your-site-id&#39;;
391
+ AND domain = &#39;docs.yourcompany.com&#39;;
398
392
  </code></pre>
399
393
  <h3>Reset User Password</h3>
400
394
  <p>Users can reset their own passwords through the login page &quot;Forgot Password&quot; link.</p>
401
395
  <h2>Environment Variables (Optional)</h2>
402
- <p>For better security, use environment variables:</p>
396
+ <p>For better security with custom Supabase projects, use environment variables:</p>
403
397
  <pre><code class="language-bash"># .env
404
398
  SUPABASE_URL=https://xxx.supabase.co
405
399
  SUPABASE_ANON_KEY=eyJ...
406
- DOC_SITE_ID=your-site-uuid
407
400
  </code></pre>
408
401
  <p>Update your config:</p>
409
402
  <pre><code class="language-javascript">module.exports = {
410
403
  auth: {
411
404
  supabaseUrl: process.env.SUPABASE_URL,
412
- supabaseAnonKey: process.env.SUPABASE_ANON_KEY,
413
- siteId: process.env.DOC_SITE_ID
405
+ supabaseAnonKey: process.env.SUPABASE_ANON_KEY
406
+ // No siteId needed - uses domain automatically!
414
407
  }
415
408
  };
416
409
  </code></pre>
417
410
  <h2>Multi-Site Setup</h2>
418
- <p>To use one Supabase project for multiple documentation sites:</p>
411
+ <p>The domain-based system makes multi-site setup incredibly simple:</p>
419
412
  <ol>
420
- <li>Add each site to the database:</li>
421
- </ol>
422
- <pre><code class="language-sql">INSERT INTO docbuilder_sites (domain, name) VALUES
423
- (&#39;docs.product1.com&#39;, &#39;Product 1 Docs&#39;),
424
- (&#39;internal.company.com&#39;, &#39;Internal Docs&#39;),
425
- (&#39;api.company.com&#39;, &#39;API Documentation&#39;);
426
- </code></pre>
427
- <ol start="2">
428
- <li><p>Create separate config files for each site with different <code>siteId</code> values</p>
413
+ <li><p><strong>No site registration needed</strong> - Each domain is automatically recognized</p>
429
414
  </li>
430
- <li><p>Grant users access to specific sites:</p>
415
+ <li><p><strong>Grant users access to multiple domains</strong>:</p>
431
416
  </li>
432
417
  </ol>
433
- <pre><code class="language-sql">-- User can access both Product 1 and Internal docs
434
- INSERT INTO docbuilder_access (user_id, site_id) VALUES
435
- (&#39;user-uuid&#39;, &#39;product1-site-uuid&#39;),
436
- (&#39;user-uuid&#39;, &#39;internal-site-uuid&#39;);
418
+ <pre><code class="language-sql">-- User can access multiple documentation sites
419
+ INSERT INTO docbuilder_access (user_id, domain) VALUES
420
+ ((SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;), &#39;docs.product1.com&#39;),
421
+ ((SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;), &#39;internal.company.com&#39;),
422
+ ((SELECT id FROM auth.users WHERE email = &#39;user@example.com&#39;), &#39;api.company.com&#39;);
437
423
  </code></pre>
424
+ <ol start="3">
425
+ <li><strong>Same configuration for all sites</strong> - Just deploy to different domains!</li>
426
+ </ol>
438
427
  <h2>Security Features</h2>
439
428
  <h3>What Supabase Provides</h3>
440
429
  <ul>
@@ -449,8 +438,8 @@ INSERT INTO docbuilder_access (user_id, site_id) VALUES
449
438
  <h3>Row Level Security</h3>
450
439
  <p>All data access is protected by RLS policies:</p>
451
440
  <ul>
452
- <li>Users can only see sites they have access to</li>
453
441
  <li>Users can only see their own access records</li>
442
+ <li>Domain-based access is automatically enforced</li>
454
443
  <li>No way to access other users&#39; data</li>
455
444
  </ul>
456
445
  <h2>Troubleshooting</h2>
@@ -463,8 +452,8 @@ INSERT INTO docbuilder_access (user_id, site_id) VALUES
463
452
  <h3>Users Can&#39;t Access Site</h3>
464
453
  <ul>
465
454
  <li>Verify the user exists in <code>auth.users</code> table</li>
466
- <li>Check that user has access in <code>docbuilder_access</code> table </li>
467
- <li>Confirm the <code>site_id</code> matches your config</li>
455
+ <li>Check that user has access in <code>docbuilder_access</code> table for the correct domain</li>
456
+ <li>Confirm the domain in the database matches your deployment URL</li>
468
457
  </ul>
469
458
  <h3>Login Page Not Working</h3>
470
459
  <ul>
@@ -98,8 +98,8 @@
98
98
  "name": "Knowcode Ltd",
99
99
  "url": "https://knowcode.tech"
100
100
  },
101
- "datePublished": "2025-07-26T10:38:42.036Z",
102
- "dateModified": "2025-07-26T10:38:42.036Z",
101
+ "datePublished": "2025-07-26T11:44:31.538Z",
102
+ "dateModified": "2025-07-26T11:44:31.538Z",
103
103
  "mainEntityOfPage": {
104
104
  "@type": "WebPage",
105
105
  "@id": "https://doc-builder-delta.vercel.app/private/test-private-doc.html"
@@ -138,7 +138,7 @@
138
138
 
139
139
  <div class="header-actions">
140
140
  <div class="deployment-info">
141
- <span class="deployment-date" title="Built with doc-builder v1.8.1">Last updated: Jul 26, 2025, 10:38 AM UTC</span>
141
+ <span class="deployment-date" title="Built with doc-builder v1.8.3">Last updated: Jul 26, 2025, 11:44 AM UTC</span>
142
142
  </div>
143
143
 
144
144
 
@@ -212,7 +212,7 @@
212
212
  <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>
213
213
  <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>
214
214
  <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>
215
- <div class="nav-section" data-level="1">
215
+ <div class="nav-section private-nav" data-level="1">
216
216
  <a class="nav-title collapsible expanded" href="#" data-target="nav-private-1" >
217
217
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
218
218
  </a>
@@ -225,7 +225,7 @@
225
225
  <a href="/private/supabase-auth-setup-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase."><i class="fas fa-file-alt"></i> Supabase Auth Setup Guide</a>
226
226
  <a href="/private/test-private-doc.html" class="nav-item active" data-tooltip="Test Private Document."><i class="fas fa-file-alt"></i> Test Private Doc</a>
227
227
  <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="fas fa-file-alt"></i> User Management Tooling</a></div></div>
228
- <div class="nav-section" data-level="2">
228
+ <div class="nav-section private-nav" data-level="2">
229
229
  <a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
230
230
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
231
231
  </a>
@@ -98,8 +98,8 @@
98
98
  "name": "Knowcode Ltd",
99
99
  "url": "https://knowcode.tech"
100
100
  },
101
- "datePublished": "2025-07-26T10:38:42.038Z",
102
- "dateModified": "2025-07-26T10:38:42.038Z",
101
+ "datePublished": "2025-07-26T11:44:31.539Z",
102
+ "dateModified": "2025-07-26T11:44:31.539Z",
103
103
  "mainEntityOfPage": {
104
104
  "@type": "WebPage",
105
105
  "@id": "https://doc-builder-delta.vercel.app/private/user-management-tooling.html"
@@ -138,7 +138,7 @@
138
138
 
139
139
  <div class="header-actions">
140
140
  <div class="deployment-info">
141
- <span class="deployment-date" title="Built with doc-builder v1.8.1">Last updated: Jul 26, 2025, 10:38 AM UTC</span>
141
+ <span class="deployment-date" title="Built with doc-builder v1.8.3">Last updated: Jul 26, 2025, 11:44 AM UTC</span>
142
142
  </div>
143
143
 
144
144
 
@@ -212,7 +212,7 @@
212
212
  <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>
213
213
  <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>
214
214
  <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>
215
- <div class="nav-section" data-level="1">
215
+ <div class="nav-section private-nav" data-level="1">
216
216
  <a class="nav-title collapsible expanded" href="#" data-target="nav-private-1" >
217
217
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
218
218
  </a>
@@ -225,7 +225,7 @@
225
225
  <a href="/private/supabase-auth-setup-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase."><i class="fas fa-file-alt"></i> Supabase Auth Setup Guide</a>
226
226
  <a href="/private/test-private-doc.html" class="nav-item" data-tooltip="Test Private Document."><i class="fas fa-file-alt"></i> Test Private Doc</a>
227
227
  <a href="/private/user-management-tooling.html" class="nav-item active" 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="fas fa-file-alt"></i> User Management Tooling</a></div></div>
228
- <div class="nav-section" data-level="2">
228
+ <div class="nav-section private-nav" data-level="2">
229
229
  <a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
230
230
  <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
231
231
  </a>
@@ -273,21 +273,15 @@
273
273
  </li>
274
274
  </ol>
275
275
  <h3>Database Schema</h3>
276
- <p>The system works with two main tables:</p>
277
- <p><strong>docbuilder_sites</strong></p>
278
- <ul>
279
- <li><code>id</code> (UUID) - Primary key</li>
280
- <li><code>domain</code> (TEXT) - Site URL without https://</li>
281
- <li><code>name</code> (TEXT) - Display name</li>
282
- <li><code>created_at</code> (TIMESTAMP)</li>
283
- </ul>
276
+ <p>The system now uses a simplified single-table design:</p>
284
277
  <p><strong>docbuilder_access</strong></p>
285
278
  <ul>
286
279
  <li><code>user_id</code> (UUID) - References auth.users</li>
287
- <li><code>site_id</code> (UUID) - References docbuilder_sites</li>
280
+ <li><code>domain</code> (TEXT) - Site domain (e.g., docs.example.com)</li>
288
281
  <li><code>created_at</code> (TIMESTAMP)</li>
289
- <li>Composite primary key on (user_id, site_id)</li>
282
+ <li>Primary key on (user_id, domain)</li>
290
283
  </ul>
284
+ <p>No more site registration needed! The system automatically uses the current domain.</p>
291
285
  <h2>Implementation Details</h2>
292
286
  <h3>User Creation Methods</h3>
293
287
  <p>Due to Supabase CLI limitations (no direct user creation commands), the system offers three methods:</p>