@knowcode/doc-builder 1.9.1 → 1.9.2
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.
- package/CHANGELOG.md +29 -0
- package/README.md +1 -0
- package/html/README.html +150 -33
- package/html/css/notion-style.css +394 -13
- package/html/documentation-index.html +128 -10
- package/html/guides/authentication-default-change.html +131 -7
- package/html/guides/authentication-guide.html +142 -19
- package/html/guides/claude-workflow-guide.html +138 -22
- package/html/guides/documentation-standards.html +134 -11
- package/html/guides/html-embedding-guide.html +450 -0
- package/html/guides/image-modal-guide.html +133 -10
- package/html/guides/phosphor-icons-guide.html +151 -27
- package/html/guides/private-directory-authentication.html +131 -7
- package/html/guides/public-site-deployment.html +131 -7
- package/html/guides/search-engine-verification-guide.html +131 -7
- package/html/guides/seo-guide.html +131 -7
- package/html/guides/seo-optimization-guide.html +160 -38
- package/html/guides/troubleshooting-guide.html +142 -19
- package/html/guides/windows-setup-guide.html +162 -38
- package/html/image-modal-test.html +126 -8
- package/html/index.html +150 -33
- package/html/js/auth.js +118 -39
- package/html/js/main.js +259 -25
- package/html/private/cache-control-anti-pattern.html +136 -12
- package/html/private/launch/README.html +145 -15
- package/html/private/launch/auth-cleanup-summary.html +154 -24
- package/html/private/launch/bubble-plugin-specification.html +137 -7
- package/html/private/launch/go-to-market-strategy.html +139 -9
- package/html/private/launch/launch-announcements.html +153 -24
- package/html/private/launch/vercel-deployment-auth-setup.html +139 -9
- package/html/private/next-steps-walkthrough.html +138 -14
- package/html/private/supabase-auth-implementation-completed.html +144 -21
- package/html/private/supabase-auth-implementation-plan.html +137 -14
- package/html/private/supabase-auth-integration-plan.html +143 -21
- package/html/private/supabase-auth-setup-guide.html +140 -16
- package/html/private/test-private-doc.html +131 -7
- package/html/private/user-management-tooling.html +131 -7
- package/html/prompts/markdown-document-standards.html +135 -12
- package/html/sitemap.xml +58 -46
- package/html/vercel-cli-setup-guide.html +129 -11
- package/html/vercel-first-time-setup-guide.html +126 -8
- package/lib/config.js +2 -0
- package/package.json +1 -1
|
@@ -3,14 +3,41 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<meta name="description" content="
|
|
7
|
-
<title>Supabase Authentication Integration Plan for @
|
|
6
|
+
<meta name="description" content="Transform @knowcode/doc-builder from basic client-side authentication to a sophisticated, centralized authentication system powered by Supabase that enables:">
|
|
7
|
+
<title>Supabase Authentication Integration Plan for @k...</title>
|
|
8
|
+
|
|
9
|
+
<meta name="author" content="Lindsay Smith">
|
|
10
|
+
<meta name="keywords" content="documentation, markdown, static site generator, vercel, notion-style, authentication, security">
|
|
11
|
+
<meta name="robots" content="index, follow">
|
|
12
|
+
<link rel="canonical" href="https://doc-builder-delta.vercel.app/private/supabase-auth-integration-plan.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/supabase-auth-integration-plan.html">
|
|
17
|
+
<meta property="og:title" content="Supabase Authentication Integration Plan for @k...">
|
|
18
|
+
<meta property="og:description" content="Transform @knowcode/doc-builder from basic client-side authentication to a sophisticated, centralized authentication system powered by Supabase that enables:">
|
|
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="Supabase Authentication Integration Plan for @k...">
|
|
28
|
+
<meta name="twitter:description" content="Transform @knowcode/doc-builder from basic client-side authentication to a sophisticated, centralized authentication system powered by Supabase that enables:">
|
|
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">
|
|
8
34
|
|
|
9
35
|
<!-- Fonts -->
|
|
10
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">
|
|
11
37
|
|
|
12
38
|
<!-- Icons -->
|
|
13
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">
|
|
14
41
|
|
|
15
42
|
<!-- Mermaid -->
|
|
16
43
|
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
|
@@ -18,8 +45,90 @@
|
|
|
18
45
|
<!-- Styles -->
|
|
19
46
|
<link rel="stylesheet" href="/css/notion-style.css">
|
|
20
47
|
|
|
48
|
+
|
|
49
|
+
<!-- Hide content until auth check -->
|
|
50
|
+
<style>
|
|
51
|
+
body {
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transition: opacity 0.3s ease;
|
|
55
|
+
}
|
|
56
|
+
body.authenticated {
|
|
57
|
+
visibility: visible;
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
/* Show login/logout pages immediately */
|
|
61
|
+
body.auth-page {
|
|
62
|
+
visibility: visible;
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
/* Style auth button consistently */
|
|
66
|
+
.auth-btn {
|
|
67
|
+
background: none;
|
|
68
|
+
border: none;
|
|
69
|
+
color: var(--text-secondary);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
padding: 0.5rem;
|
|
72
|
+
border-radius: 0.5rem;
|
|
73
|
+
transition: all 0.2s;
|
|
74
|
+
font-size: 1.1rem;
|
|
75
|
+
}
|
|
76
|
+
.auth-btn:hover {
|
|
77
|
+
background: var(--bg-secondary);
|
|
78
|
+
color: var(--text-primary);
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
81
|
+
|
|
82
|
+
|
|
21
83
|
<!-- Favicon -->
|
|
22
|
-
<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
|
|
84
|
+
<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>">
|
|
85
|
+
|
|
86
|
+
<script type="application/ld+json">
|
|
87
|
+
{
|
|
88
|
+
"@context": "https://schema.org",
|
|
89
|
+
"@type": "TechArticle",
|
|
90
|
+
"headline": "Supabase Authentication Integration Plan for @knowcode/doc-builder",
|
|
91
|
+
"description": "Transform @knowcode/doc-builder from basic client-side authentication to a sophisticated, centralized authentication system powered by Supabase that enables:",
|
|
92
|
+
"author": {
|
|
93
|
+
"@type": "Person",
|
|
94
|
+
"name": "Lindsay Smith"
|
|
95
|
+
},
|
|
96
|
+
"publisher": {
|
|
97
|
+
"@type": "Organization",
|
|
98
|
+
"name": "Knowcode Ltd",
|
|
99
|
+
"url": "https://knowcode.tech"
|
|
100
|
+
},
|
|
101
|
+
"datePublished": "2025-07-28T10:31:53.253Z",
|
|
102
|
+
"dateModified": "2025-07-28T10:31:53.253Z",
|
|
103
|
+
"mainEntityOfPage": {
|
|
104
|
+
"@type": "WebPage",
|
|
105
|
+
"@id": "https://doc-builder-delta.vercel.app/private/supabase-auth-integration-plan.html"
|
|
106
|
+
},
|
|
107
|
+
"breadcrumb": {
|
|
108
|
+
"@type": "BreadcrumbList",
|
|
109
|
+
"itemListElement": [
|
|
110
|
+
{
|
|
111
|
+
"@type": "ListItem",
|
|
112
|
+
"position": 1,
|
|
113
|
+
"name": "@knowcode/doc-builder",
|
|
114
|
+
"item": "https://doc-builder-delta.vercel.app"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"@type": "ListItem",
|
|
118
|
+
"position": 2,
|
|
119
|
+
"name": "Private",
|
|
120
|
+
"item": "https://doc-builder-delta.vercel.app/private/"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"@type": "ListItem",
|
|
124
|
+
"position": 3,
|
|
125
|
+
"name": "Supabase Auth Integration Plan",
|
|
126
|
+
"item": "https://doc-builder-delta.vercel.app/private/supabase-auth-integration-plan.html"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
23
132
|
</head>
|
|
24
133
|
<body>
|
|
25
134
|
<!-- Header -->
|
|
@@ -29,10 +138,14 @@
|
|
|
29
138
|
|
|
30
139
|
<div class="header-actions">
|
|
31
140
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.
|
|
141
|
+
<span class="deployment-date" title="Built with doc-builder v1.9.1">Last updated: Jul 28, 2025, 10:31 AM UTC</span>
|
|
33
142
|
</div>
|
|
34
143
|
|
|
35
144
|
|
|
145
|
+
<a href="../../login.html" class="auth-btn" title="Login/Logout">
|
|
146
|
+
<i class="fas fa-sign-in-alt"></i>
|
|
147
|
+
</a>
|
|
148
|
+
|
|
36
149
|
|
|
37
150
|
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
|
|
38
151
|
<i class="fas fa-moon"></i>
|
|
@@ -92,6 +205,7 @@
|
|
|
92
205
|
<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>
|
|
93
206
|
<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>
|
|
94
207
|
<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>
|
|
208
|
+
<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="fas fa-file-alt"></i> Html Embedding Guide</a>
|
|
95
209
|
<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="fas fa-file-alt"></i> Image Modal Guide</a>
|
|
96
210
|
<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>
|
|
97
211
|
<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="fas fa-file-alt"></i> Private Directory Authentication</a>
|
|
@@ -101,7 +215,7 @@
|
|
|
101
215
|
<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>
|
|
102
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="fas fa-file-alt"></i> Troubleshooting Guide</a>
|
|
103
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="fas fa-file-alt"></i> Windows Setup Guide</a></div></div>
|
|
104
|
-
<div class="nav-section" data-level="1">
|
|
218
|
+
<div class="nav-section private-nav" data-level="1">
|
|
105
219
|
<a class="nav-title collapsible expanded" href="#" data-target="nav-private-1" >
|
|
106
220
|
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
|
|
107
221
|
</a>
|
|
@@ -114,7 +228,7 @@
|
|
|
114
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="fas fa-file-alt"></i> Supabase Auth Setup Guide</a>
|
|
115
229
|
<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>
|
|
116
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="fas fa-file-alt"></i> User Management Tooling</a></div></div>
|
|
117
|
-
<div class="nav-section" data-level="2">
|
|
231
|
+
<div class="nav-section private-nav" data-level="2">
|
|
118
232
|
<a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
|
|
119
233
|
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
|
|
120
234
|
</a>
|
|
@@ -150,7 +264,6 @@
|
|
|
150
264
|
</ul>
|
|
151
265
|
<h2>Architecture Overview</h2>
|
|
152
266
|
<div class="mermaid-wrapper">
|
|
153
|
-
<div class="mermaid-title">Diagram</div>
|
|
154
267
|
<div class="mermaid">graph TB
|
|
155
268
|
subgraph "Supabase Cloud"
|
|
156
269
|
DB[(PostgreSQL)]
|
|
@@ -227,7 +340,6 @@ CREATE POLICY "View own access logs" ON access_logs
|
|
|
227
340
|
<h2>Implementation Architecture</h2>
|
|
228
341
|
<h3>1. Authentication Flow</h3>
|
|
229
342
|
<div class="mermaid-wrapper">
|
|
230
|
-
<div class="mermaid-title">Diagram</div>
|
|
231
343
|
<div class="mermaid">sequenceDiagram
|
|
232
344
|
participant User
|
|
233
345
|
participant DocSite
|
|
@@ -466,21 +578,21 @@ npx @knowcode/doc-builder auth logs --days 30
|
|
|
466
578
|
<h2>Security Benefits</h2>
|
|
467
579
|
<h3>Current Basic Auth Vulnerabilities</h3>
|
|
468
580
|
<ul>
|
|
469
|
-
<li
|
|
470
|
-
<li
|
|
471
|
-
<li
|
|
472
|
-
<li
|
|
473
|
-
<li
|
|
581
|
+
<li><i class="ph ph-x-circle" aria-label="error"></i> Credentials visible in browser</li>
|
|
582
|
+
<li><i class="ph ph-x-circle" aria-label="error"></i> No password hashing</li>
|
|
583
|
+
<li><i class="ph ph-x-circle" aria-label="error"></i> No session management</li>
|
|
584
|
+
<li><i class="ph ph-x-circle" aria-label="error"></i> No audit trail</li>
|
|
585
|
+
<li><i class="ph ph-x-circle" aria-label="error"></i> Single shared password</li>
|
|
474
586
|
</ul>
|
|
475
587
|
<h3>Supabase Auth Security</h3>
|
|
476
588
|
<ul>
|
|
477
|
-
<li
|
|
478
|
-
<li
|
|
479
|
-
<li
|
|
480
|
-
<li
|
|
481
|
-
<li
|
|
482
|
-
<li
|
|
483
|
-
<li
|
|
589
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> Server-side authentication</li>
|
|
590
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> Bcrypt password hashing</li>
|
|
591
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> JWT tokens with expiration</li>
|
|
592
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> Row Level Security</li>
|
|
593
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> Comprehensive audit logs</li>
|
|
594
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> Multi-factor authentication support</li>
|
|
595
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> OAuth provider support</li>
|
|
484
596
|
</ul>
|
|
485
597
|
<h2>Cost Analysis</h2>
|
|
486
598
|
<h3>Supabase Free Tier</h3>
|
|
@@ -565,7 +677,17 @@ npx @knowcode/doc-builder auth logs --days 30
|
|
|
565
677
|
</div>
|
|
566
678
|
|
|
567
679
|
<!-- Scripts -->
|
|
680
|
+
<script>
|
|
681
|
+
// Pass configuration to frontend
|
|
682
|
+
window.docBuilderConfig = {
|
|
683
|
+
features: {
|
|
684
|
+
showPdfDownload: true,
|
|
685
|
+
menuDefaultOpen: false
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
</script>
|
|
568
689
|
<script src="/js/main.js"></script>
|
|
569
|
-
|
|
690
|
+
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
|
|
691
|
+
<script src="/js/auth.js"></script>
|
|
570
692
|
</body>
|
|
571
693
|
</html>
|
|
@@ -3,14 +3,41 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<meta name="description" content="
|
|
7
|
-
<title>Supabase Authentication Setup Guide
|
|
6
|
+
<meta name="description" content="Complete guide for setting up secure authentication for your @knowcode/doc-builder documentation sites using Supabase.">
|
|
7
|
+
<title>Supabase Authentication Setup Guide | @knowcode/doc-builder</title>
|
|
8
|
+
|
|
9
|
+
<meta name="author" content="Lindsay Smith">
|
|
10
|
+
<meta name="keywords" content="documentation, markdown, static site generator, vercel, notion-style, supabase, your">
|
|
11
|
+
<meta name="robots" content="index, follow">
|
|
12
|
+
<link rel="canonical" href="https://doc-builder-delta.vercel.app/private/supabase-auth-setup-guide.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/supabase-auth-setup-guide.html">
|
|
17
|
+
<meta property="og:title" content="Supabase Authentication Setup Guide | @knowcode/doc-builder">
|
|
18
|
+
<meta property="og:description" content="Complete guide for setting up secure authentication for your @knowcode/doc-builder documentation sites using Supabase.">
|
|
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="Supabase Authentication Setup Guide | @knowcode/doc-builder">
|
|
28
|
+
<meta name="twitter:description" content="Complete guide for setting up secure authentication for your @knowcode/doc-builder documentation sites using Supabase.">
|
|
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">
|
|
8
34
|
|
|
9
35
|
<!-- Fonts -->
|
|
10
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">
|
|
11
37
|
|
|
12
38
|
<!-- Icons -->
|
|
13
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">
|
|
14
41
|
|
|
15
42
|
<!-- Mermaid -->
|
|
16
43
|
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
|
@@ -18,8 +45,90 @@
|
|
|
18
45
|
<!-- Styles -->
|
|
19
46
|
<link rel="stylesheet" href="/css/notion-style.css">
|
|
20
47
|
|
|
48
|
+
|
|
49
|
+
<!-- Hide content until auth check -->
|
|
50
|
+
<style>
|
|
51
|
+
body {
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transition: opacity 0.3s ease;
|
|
55
|
+
}
|
|
56
|
+
body.authenticated {
|
|
57
|
+
visibility: visible;
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
/* Show login/logout pages immediately */
|
|
61
|
+
body.auth-page {
|
|
62
|
+
visibility: visible;
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
/* Style auth button consistently */
|
|
66
|
+
.auth-btn {
|
|
67
|
+
background: none;
|
|
68
|
+
border: none;
|
|
69
|
+
color: var(--text-secondary);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
padding: 0.5rem;
|
|
72
|
+
border-radius: 0.5rem;
|
|
73
|
+
transition: all 0.2s;
|
|
74
|
+
font-size: 1.1rem;
|
|
75
|
+
}
|
|
76
|
+
.auth-btn:hover {
|
|
77
|
+
background: var(--bg-secondary);
|
|
78
|
+
color: var(--text-primary);
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
81
|
+
|
|
82
|
+
|
|
21
83
|
<!-- Favicon -->
|
|
22
|
-
<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
|
|
84
|
+
<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>">
|
|
85
|
+
|
|
86
|
+
<script type="application/ld+json">
|
|
87
|
+
{
|
|
88
|
+
"@context": "https://schema.org",
|
|
89
|
+
"@type": "TechArticle",
|
|
90
|
+
"headline": "Supabase Authentication Setup Guide",
|
|
91
|
+
"description": "Complete guide for setting up secure authentication for your @knowcode/doc-builder documentation sites using Supabase.",
|
|
92
|
+
"author": {
|
|
93
|
+
"@type": "Person",
|
|
94
|
+
"name": "Lindsay Smith"
|
|
95
|
+
},
|
|
96
|
+
"publisher": {
|
|
97
|
+
"@type": "Organization",
|
|
98
|
+
"name": "Knowcode Ltd",
|
|
99
|
+
"url": "https://knowcode.tech"
|
|
100
|
+
},
|
|
101
|
+
"datePublished": "2025-07-28T10:31:53.256Z",
|
|
102
|
+
"dateModified": "2025-07-28T10:31:53.256Z",
|
|
103
|
+
"mainEntityOfPage": {
|
|
104
|
+
"@type": "WebPage",
|
|
105
|
+
"@id": "https://doc-builder-delta.vercel.app/private/supabase-auth-setup-guide.html"
|
|
106
|
+
},
|
|
107
|
+
"breadcrumb": {
|
|
108
|
+
"@type": "BreadcrumbList",
|
|
109
|
+
"itemListElement": [
|
|
110
|
+
{
|
|
111
|
+
"@type": "ListItem",
|
|
112
|
+
"position": 1,
|
|
113
|
+
"name": "@knowcode/doc-builder",
|
|
114
|
+
"item": "https://doc-builder-delta.vercel.app"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"@type": "ListItem",
|
|
118
|
+
"position": 2,
|
|
119
|
+
"name": "Private",
|
|
120
|
+
"item": "https://doc-builder-delta.vercel.app/private/"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"@type": "ListItem",
|
|
124
|
+
"position": 3,
|
|
125
|
+
"name": "Supabase Auth Setup Guide",
|
|
126
|
+
"item": "https://doc-builder-delta.vercel.app/private/supabase-auth-setup-guide.html"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
23
132
|
</head>
|
|
24
133
|
<body>
|
|
25
134
|
<!-- Header -->
|
|
@@ -29,10 +138,14 @@
|
|
|
29
138
|
|
|
30
139
|
<div class="header-actions">
|
|
31
140
|
<div class="deployment-info">
|
|
32
|
-
<span class="deployment-date" title="Built with doc-builder v1.
|
|
141
|
+
<span class="deployment-date" title="Built with doc-builder v1.9.1">Last updated: Jul 28, 2025, 10:31 AM UTC</span>
|
|
33
142
|
</div>
|
|
34
143
|
|
|
35
144
|
|
|
145
|
+
<a href="../../login.html" class="auth-btn" title="Login/Logout">
|
|
146
|
+
<i class="fas fa-sign-in-alt"></i>
|
|
147
|
+
</a>
|
|
148
|
+
|
|
36
149
|
|
|
37
150
|
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
|
|
38
151
|
<i class="fas fa-moon"></i>
|
|
@@ -92,6 +205,7 @@
|
|
|
92
205
|
<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>
|
|
93
206
|
<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>
|
|
94
207
|
<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>
|
|
208
|
+
<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="fas fa-file-alt"></i> Html Embedding Guide</a>
|
|
95
209
|
<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="fas fa-file-alt"></i> Image Modal Guide</a>
|
|
96
210
|
<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>
|
|
97
211
|
<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="fas fa-file-alt"></i> Private Directory Authentication</a>
|
|
@@ -101,7 +215,7 @@
|
|
|
101
215
|
<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>
|
|
102
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="fas fa-file-alt"></i> Troubleshooting Guide</a>
|
|
103
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="fas fa-file-alt"></i> Windows Setup Guide</a></div></div>
|
|
104
|
-
<div class="nav-section" data-level="1">
|
|
218
|
+
<div class="nav-section private-nav" data-level="1">
|
|
105
219
|
<a class="nav-title collapsible expanded" href="#" data-target="nav-private-1" >
|
|
106
220
|
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
|
|
107
221
|
</a>
|
|
@@ -114,7 +228,7 @@
|
|
|
114
228
|
<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>
|
|
115
229
|
<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>
|
|
116
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="fas fa-file-alt"></i> User Management Tooling</a></div></div>
|
|
117
|
-
<div class="nav-section" data-level="2">
|
|
231
|
+
<div class="nav-section private-nav" data-level="2">
|
|
118
232
|
<a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
|
|
119
233
|
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
|
|
120
234
|
</a>
|
|
@@ -200,7 +314,7 @@ CREATE POLICY "Users see own access" ON docbuilder_access
|
|
|
200
314
|
</ul>
|
|
201
315
|
</li>
|
|
202
316
|
</ol>
|
|
203
|
-
<p
|
|
317
|
+
<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>
|
|
204
318
|
<h2>Step 4: Initialize Authentication</h2>
|
|
205
319
|
<h3>Option 1: Automatic Setup (v1.8.2+)</h3>
|
|
206
320
|
<p>Just create a config file or use the <code>--preset</code> flag:</p>
|
|
@@ -270,7 +384,7 @@ npx @knowcode/doc-builder build
|
|
|
270
384
|
# Deploy to Vercel
|
|
271
385
|
npx @knowcode/doc-builder deploy
|
|
272
386
|
</code></pre>
|
|
273
|
-
<p>Your documentation site now has secure authentication!
|
|
387
|
+
<p>Your documentation site now has secure authentication! <i class="ph ph-confetti" aria-label="party"></i></p>
|
|
274
388
|
<h2>User Management</h2>
|
|
275
389
|
<h3>List Users with Access</h3>
|
|
276
390
|
<pre><code class="language-sql">-- List all users for a specific domain
|
|
@@ -322,13 +436,13 @@ INSERT INTO docbuilder_access (user_id, domain) VALUES
|
|
|
322
436
|
<h2>Security Features</h2>
|
|
323
437
|
<h3>What Supabase Provides</h3>
|
|
324
438
|
<ul>
|
|
325
|
-
<li
|
|
326
|
-
<li
|
|
327
|
-
<li
|
|
328
|
-
<li
|
|
329
|
-
<li
|
|
330
|
-
<li
|
|
331
|
-
<li
|
|
439
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Password hashing</strong> with bcrypt</li>
|
|
440
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> <strong>JWT tokens</strong> with automatic refresh</li>
|
|
441
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Session management</strong> with secure cookies</li>
|
|
442
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Rate limiting</strong> on authentication endpoints</li>
|
|
443
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Email verification</strong> (optional)</li>
|
|
444
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Password reset</strong> flows</li>
|
|
445
|
+
<li><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Multi-factor authentication</strong> (optional)</li>
|
|
332
446
|
</ul>
|
|
333
447
|
<h3>Row Level Security</h3>
|
|
334
448
|
<p>All data access is protected by RLS policies:</p>
|
|
@@ -414,7 +528,17 @@ INSERT INTO docbuilder_access (user_id, domain) VALUES
|
|
|
414
528
|
</div>
|
|
415
529
|
|
|
416
530
|
<!-- Scripts -->
|
|
531
|
+
<script>
|
|
532
|
+
// Pass configuration to frontend
|
|
533
|
+
window.docBuilderConfig = {
|
|
534
|
+
features: {
|
|
535
|
+
showPdfDownload: true,
|
|
536
|
+
menuDefaultOpen: false
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
</script>
|
|
417
540
|
<script src="/js/main.js"></script>
|
|
418
|
-
|
|
541
|
+
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
|
|
542
|
+
<script src="/js/auth.js"></script>
|
|
419
543
|
</body>
|
|
420
544
|
</html>
|