@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.
- package/lib/core-builder.js +164 -174
- package/lib/emoji-mapper.js +27 -12
- package/package.json +12 -2
- package/.claude/settings.local.json +0 -56
- package/CACHE-BUSTING-GUIDE.md +0 -82
- package/CLAUDE.md +0 -86
- package/CONTRIBUTING.md +0 -148
- package/GITHUB_SETUP.md +0 -203
- package/RELEASE-NOTES-1.7.5.md +0 -64
- package/Screenshot 2025-07-22 at 19.51.21.png +0 -0
- package/Screenshot 2025-07-26 at 17.06.49.png +0 -0
- package/add-user-clive.sql +0 -35
- package/add-user-lindsay-fixed.sql +0 -85
- package/add-user-lindsay.sql +0 -68
- package/add-user-pmorgan.sql +0 -35
- package/add-user-robbie.sql +0 -35
- package/add-wru-users.sql +0 -105
- package/debug-login.sql +0 -30
- package/doc-builder.config.js +0 -126
- package/doc-builder.config.js.backup.1753793768283 +0 -47
- package/doc-builder.config.js.backup.1753803964423 +0 -114
- package/doc-builder.config.js.backup.1753945707032 +0 -115
- package/doc-builder.config.js.backup.1754059241330 +0 -115
- package/doc-builder.config.js.backup.1754119567787 +0 -123
- package/doc-builder.config.js.backup.1754120048862 +0 -124
- package/doc-builder.config.js.backup.1754120529913 +0 -124
- package/doc-builder.config.js.backup.1754218469785 +0 -124
- package/doc-builder.config.js.backup.1754384764054 +0 -124
- package/doc-builder.config.js.backup.1754567425847 +0 -124
- package/doc-builder.config.js.backup.1754568137859 +0 -126
- package/doc-builder.config.js.backup.1754569388252 +0 -126
- package/doc-builder.config.js.backup.1754576694123 +0 -126
- package/doc-builder.config.js.backup.1755031374829 +0 -126
- package/doc-builder.config.js.backup.1755034500990 +0 -126
- package/doc-builder.config.js.backup.1755034809236 +0 -126
- package/grant-access.sql +0 -15
- package/html/11.png +0 -0
- package/html/404.html +0 -115
- package/html/README.html +0 -522
- package/html/Screenshot 2025-08-12 at 21.35.07.png +0 -0
- package/html/about-doc-builder.html +0 -491
- package/html/auth.js +0 -157
- package/html/claude-workflow-guide.html +0 -525
- package/html/css/notion-style.css +0 -2502
- package/html/documentation-index.html +0 -471
- package/html/guides/authentication-default-change.html +0 -370
- package/html/guides/authentication-guide.html +0 -509
- package/html/guides/cache-control-anti-pattern.html +0 -361
- package/html/guides/claude-workflow-guide.html +0 -1074
- package/html/guides/configuration-guide.html +0 -472
- package/html/guides/document-standards.html +0 -518
- package/html/guides/documentation-standards.html +0 -694
- package/html/guides/html-embedding-guide.html +0 -461
- package/html/guides/image-modal-guide.html +0 -515
- package/html/guides/next-steps-walkthrough.html +0 -638
- package/html/guides/phosphor-icons-guide.html +0 -584
- package/html/guides/private-directory-authentication-troubleshooting.html +0 -555
- package/html/guides/private-directory-authentication.html +0 -541
- package/html/guides/public-site-deployment.html +0 -431
- package/html/guides/search-engine-verification-guide.html +0 -542
- package/html/guides/seo-guide.html +0 -661
- package/html/guides/seo-optimization-guide.html +0 -887
- package/html/guides/supabase-auth-implementation-plan.html +0 -543
- package/html/guides/supabase-auth-integration-plan.html +0 -671
- package/html/guides/supabase-auth-setup-guide.html +0 -498
- package/html/guides/supabase-authentication-complete-guide.html +0 -866
- package/html/guides/troubleshooting-guide.html +0 -633
- package/html/guides/vercel-deployment-auth-setup.html +0 -337
- package/html/guides/windows-setup-guide.html +0 -859
- package/html/image-modal-test.html +0 -318
- package/html/index.html +0 -522
- package/html/js/auth.js +0 -157
- package/html/js/main.js +0 -1754
- package/html/launch/README.html +0 -297
- package/html/launch/bubble-plugin-specification.html +0 -933
- package/html/launch/go-to-market-strategy.html +0 -663
- package/html/launch/launch-announcements.html +0 -593
- package/html/login.html +0 -102
- package/html/logout.html +0 -18
- package/html/private/cache-control-anti-pattern.html +0 -429
- package/html/private/launch/README.html +0 -371
- package/html/private/launch/auth-cleanup-summary.html +0 -361
- package/html/private/launch/bubble-plugin-specification.html +0 -1007
- package/html/private/launch/go-to-market-strategy.html +0 -737
- package/html/private/launch/launch-announcements.html +0 -667
- package/html/private/launch/vercel-deployment-auth-setup.html +0 -417
- package/html/private/next-steps-walkthrough.html +0 -679
- package/html/private/supabase-auth-implementation-completed.html +0 -454
- package/html/private/supabase-auth-implementation-plan.html +0 -594
- package/html/private/supabase-auth-integration-plan.html +0 -704
- package/html/private/supabase-auth-setup-guide.html +0 -555
- package/html/private/test-private-doc.html +0 -302
- package/html/private/user-management-tooling.html +0 -601
- package/html/prompts/Screenshot 2025-08-02 at 08.49.55.png +0 -0
- package/html/prompts/beautiful-documentation-design.html +0 -784
- package/html/prompts/markdown-document-standards.html +0 -422
- package/html/prompts/project-rename-strategy-sasha-publish.html +0 -530
- package/html/robots.txt +0 -9
- package/html/sitemap.xml +0 -357
- package/html/test-questions/how-does-it-work%3F.html +0 -294
- package/html/test-questions/step-1%3A%20getting-started.html +0 -289
- package/html/test-questions/what-is-the-purpose.html +0 -293
- package/html/test-status.html +0 -281
- package/html/vercel-cli-setup-guide.html +0 -495
- package/html/vercel-first-time-setup-guide.html +0 -454
- package/html/vercel.json +0 -29
- package/html-static/11.png +0 -0
- package/html-static/404.html +0 -115
- package/html-static/README.html +0 -609
- package/html-static/Screenshot 2025-08-12 at 21.35.07.png +0 -0
- package/html-static/about-doc-builder.html +0 -578
- package/html-static/css/notion-style.css +0 -2502
- package/html-static/documentation-index.html +0 -558
- package/html-static/guides/authentication-default-change.html +0 -457
- package/html-static/guides/authentication-guide.html +0 -596
- package/html-static/guides/claude-workflow-guide.html +0 -1161
- package/html-static/guides/configuration-guide.html +0 -559
- package/html-static/guides/documentation-standards.html +0 -781
- package/html-static/guides/html-embedding-guide.html +0 -548
- package/html-static/guides/image-modal-guide.html +0 -602
- package/html-static/guides/phosphor-icons-guide.html +0 -671
- package/html-static/guides/private-directory-authentication-troubleshooting.html +0 -642
- package/html-static/guides/private-directory-authentication.html +0 -628
- package/html-static/guides/public-site-deployment.html +0 -518
- package/html-static/guides/search-engine-verification-guide.html +0 -629
- package/html-static/guides/seo-guide.html +0 -748
- package/html-static/guides/seo-optimization-guide.html +0 -974
- package/html-static/guides/supabase-authentication-complete-guide.html +0 -953
- package/html-static/guides/troubleshooting-guide.html +0 -720
- package/html-static/guides/windows-setup-guide.html +0 -946
- package/html-static/image-modal-test.html +0 -405
- package/html-static/index.html +0 -609
- package/html-static/js/main.js +0 -1754
- package/html-static/prompts/Screenshot 2025-08-02 at 08.49.55.png +0 -0
- package/html-static/prompts/beautiful-documentation-design.html +0 -871
- package/html-static/prompts/markdown-document-standards.html +0 -509
- package/html-static/prompts/project-rename-strategy-sasha-publish.html +0 -617
- package/html-static/robots.txt +0 -5
- package/html-static/sitemap.xml +0 -195
- package/html-static/test-questions/how-does-it-work%3F.html +0 -381
- package/html-static/test-questions/step-1%3A%20getting-started.html +0 -376
- package/html-static/test-questions/what-is-the-purpose.html +0 -380
- package/html-static/vercel-cli-setup-guide.html +0 -582
- package/html-static/vercel-first-time-setup-guide.html +0 -541
- package/manage-users.sql +0 -191
- package/migrate-to-domain-auth.sql +0 -47
- package/package/CACHE-BUSTING-GUIDE.md +0 -82
- package/package/CHANGELOG.md +0 -902
- package/package/README.md +0 -248
- package/package/assets/css/notion-style.css +0 -2211
- package/package/assets/js/auth.js +0 -67
- package/package/assets/js/main.js +0 -1565
- package/package/cli.js +0 -764
- package/package/index.js +0 -38
- package/package/knowcode-doc-builder-1.3.15.tgz +0 -0
- package/package/lib/builder.js +0 -32
- package/package/lib/config.js +0 -278
- package/package/lib/core-builder.js +0 -957
- package/package/lib/deploy.js +0 -497
- package/package/lib/dev-server.js +0 -96
- package/package/package.json +0 -34
- package/package/scripts/npx-runner.js +0 -27
- package/package/scripts/setup.js +0 -56
- package/package/test-cache-bust.sh +0 -43
- package/public-config.js +0 -22
- package/public-html/404.html +0 -115
- package/public-html/README.html +0 -149
- package/public-html/css/notion-style.css +0 -2036
- package/public-html/index.html +0 -149
- package/public-html/js/auth.js +0 -67
- package/public-html/js/main.js +0 -1485
- package/quick-test-commands.md +0 -40
- package/recordings/Screenshot 2025-07-24 at 18.22.01.png +0 -0
- package/recordings/mh-ls-22jul.txt +0 -2305
- package/screenshot.png +0 -0
- package/scripts/Screenshot 2025-07-23 at 15.39.41.png +0 -0
- package/setup-database-v2.sql +0 -53
- package/setup-database.sql +0 -41
- package/test-auth-config.js +0 -17
- package/test-cache-bust.sh +0 -43
- package/test-docs/README.md +0 -39
- package/test-html/404.html +0 -115
- package/test-html/README.html +0 -172
- package/test-html/auth.js +0 -97
- package/test-html/css/notion-style.css +0 -2036
- package/test-html/index.html +0 -172
- package/test-html/js/auth.js +0 -97
- package/test-html/js/main.js +0 -1485
- package/test-html/login.html +0 -102
- package/test-html/logout.html +0 -18
- package/update-domain.sql +0 -9
- package/user-access-view.sql +0 -49
- package/user-management/README.md +0 -301
- package/user-management/add-users.sh +0 -776
- package/user-management/create-user.js +0 -65
- package/user-management/users.txt +0 -15
- package/view-all-users.sql +0 -40
- package/wru-auth-config.js +0 -17
|
@@ -1,601 +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="This document provides comprehensive documentation for the Supabase user management system created for doc-builder authenticated sites.">
|
|
7
|
-
<title>User Management Tooling | @knowcode/doc-builder</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, user, supabase">
|
|
12
|
-
<meta name="robots" content="index, follow">
|
|
13
|
-
<link rel="canonical" href="https://doc-builder-delta.vercel.app/private/user-management-tooling.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/private/user-management-tooling.html">
|
|
18
|
-
<meta property="og:title" content="User Management Tooling | @knowcode/doc-builder">
|
|
19
|
-
<meta property="og:description" content="This document provides comprehensive documentation for the Supabase user management system created for doc-builder authenticated sites.">
|
|
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="User Management Tooling | @knowcode/doc-builder">
|
|
29
|
-
<meta name="twitter:description" content="This document provides comprehensive documentation for the Supabase user management system created for doc-builder authenticated sites.">
|
|
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": "User Management Tooling",
|
|
94
|
-
"description": "This document provides comprehensive documentation for the Supabase user management system created for doc-builder authenticated sites.",
|
|
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.440Z",
|
|
105
|
-
"dateModified": "2025-08-12T21:40:09.440Z",
|
|
106
|
-
"mainEntityOfPage": {
|
|
107
|
-
"@type": "WebPage",
|
|
108
|
-
"@id": "https://doc-builder-delta.vercel.app/private/user-management-tooling.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": "Private",
|
|
123
|
-
"item": "https://doc-builder-delta.vercel.app/private/"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"@type": "ListItem",
|
|
127
|
-
"position": 3,
|
|
128
|
-
"name": "User Management Tooling",
|
|
129
|
-
"item": "https://doc-builder-delta.vercel.app/private/user-management-tooling.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" 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 collapsed" 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" 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 expanded" 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" 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've implemented Supabase authentication, let'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 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="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 & 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 "sasha-publish", 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>User Management Tooling</h1>
|
|
266
|
-
<p>This document provides comprehensive documentation for the Supabase user management system created for doc-builder authenticated sites.</p>
|
|
267
|
-
<h2>Overview</h2>
|
|
268
|
-
<p>The user management system is a set of tools designed to manage user access to Supabase-authenticated documentation sites built with <code>@knowcode/doc-builder</code>. It provides a command-line interface for adding users, managing site access, and handling bulk operations.</p>
|
|
269
|
-
<h2>System Architecture</h2>
|
|
270
|
-
<h3>Components</h3>
|
|
271
|
-
<ol>
|
|
272
|
-
<li><p><strong>Main Script</strong> (<code>user-management/add-users.sh</code>)</p>
|
|
273
|
-
<ul>
|
|
274
|
-
<li>Bash script providing the primary CLI interface</li>
|
|
275
|
-
<li>Handles all user management operations</li>
|
|
276
|
-
<li>Beautiful colored output with comprehensive help system</li>
|
|
277
|
-
</ul>
|
|
278
|
-
</li>
|
|
279
|
-
<li><p><strong>Node.js Helper</strong> (<code>user-management/create-user.js</code>)</p>
|
|
280
|
-
<ul>
|
|
281
|
-
<li>Programmatic user creation using Supabase Admin API</li>
|
|
282
|
-
<li>Uses service role key for admin privileges</li>
|
|
283
|
-
<li>Handles password reset email sending</li>
|
|
284
|
-
</ul>
|
|
285
|
-
</li>
|
|
286
|
-
<li><p><strong>Configuration Files</strong></p>
|
|
287
|
-
<ul>
|
|
288
|
-
<li><code>.env.example</code> - Template for environment variables</li>
|
|
289
|
-
<li><code>.supabase-config</code> - Stores project ID after setup</li>
|
|
290
|
-
<li><code>users.txt</code> - Example bulk user file</li>
|
|
291
|
-
</ul>
|
|
292
|
-
</li>
|
|
293
|
-
</ol>
|
|
294
|
-
<h3>Database Schema</h3>
|
|
295
|
-
<p>The system now uses a simplified single-table design:</p>
|
|
296
|
-
<p><strong>docbuilder_access</strong></p>
|
|
297
|
-
<ul>
|
|
298
|
-
<li><code>user_id</code> (UUID) - References auth.users</li>
|
|
299
|
-
<li><code>domain</code> (TEXT) - Site domain (e.g., docs.example.com)</li>
|
|
300
|
-
<li><code>created_at</code> (TIMESTAMP)</li>
|
|
301
|
-
<li>Primary key on (user_id, domain)</li>
|
|
302
|
-
</ul>
|
|
303
|
-
<p>No more site registration needed! The system automatically uses the current domain.</p>
|
|
304
|
-
<h2>Implementation Details</h2>
|
|
305
|
-
<h3>User Creation Methods</h3>
|
|
306
|
-
<p>Due to Supabase CLI limitations (no direct user creation commands), the system offers three methods:</p>
|
|
307
|
-
<ol>
|
|
308
|
-
<li><p><strong>Manual Dashboard Creation</strong> (Recommended)</p>
|
|
309
|
-
<ul>
|
|
310
|
-
<li>Opens Supabase dashboard</li>
|
|
311
|
-
<li>User creates account via invitation</li>
|
|
312
|
-
<li>Most reliable method</li>
|
|
313
|
-
</ul>
|
|
314
|
-
</li>
|
|
315
|
-
<li><p><strong>Programmatic Creation</strong> (Advanced)</p>
|
|
316
|
-
<ul>
|
|
317
|
-
<li>Requires service role key</li>
|
|
318
|
-
<li>Uses Supabase Admin API</li>
|
|
319
|
-
<li>Automatically sends password reset email</li>
|
|
320
|
-
<li>Implementation:<pre><code class="language-javascript">const { data, error } = await supabase.auth.admin.createUser({
|
|
321
|
-
email: email,
|
|
322
|
-
email_confirm: true,
|
|
323
|
-
password: Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2).toUpperCase()
|
|
324
|
-
});
|
|
325
|
-
</code></pre>
|
|
326
|
-
</li>
|
|
327
|
-
</ul>
|
|
328
|
-
</li>
|
|
329
|
-
<li><p><strong>Skip Creation</strong></p>
|
|
330
|
-
<ul>
|
|
331
|
-
<li>For users that already exist in the system</li>
|
|
332
|
-
<li>Proceeds directly to access granting</li>
|
|
333
|
-
</ul>
|
|
334
|
-
</li>
|
|
335
|
-
</ol>
|
|
336
|
-
<h3>SQL Execution Fallback Strategy</h3>
|
|
337
|
-
<p>The script implements multiple fallback methods for SQL execution to handle different Supabase CLI versions:</p>
|
|
338
|
-
<ol>
|
|
339
|
-
<li><p><strong>psql with DATABASE_URL</strong></p>
|
|
340
|
-
<ul>
|
|
341
|
-
<li>First attempt if DATABASE_URL is set</li>
|
|
342
|
-
<li>Direct PostgreSQL connection</li>
|
|
343
|
-
</ul>
|
|
344
|
-
</li>
|
|
345
|
-
<li><p><strong>Supabase db execute</strong></p>
|
|
346
|
-
<ul>
|
|
347
|
-
<li>For newer CLI versions (2.7+)</li>
|
|
348
|
-
<li>Pipes SQL through stdin</li>
|
|
349
|
-
</ul>
|
|
350
|
-
</li>
|
|
351
|
-
<li><p><strong>Manual execution</strong></p>
|
|
352
|
-
<ul>
|
|
353
|
-
<li>Shows SQL in terminal</li>
|
|
354
|
-
<li>Provides dashboard link</li>
|
|
355
|
-
<li>Waits for user confirmation</li>
|
|
356
|
-
</ul>
|
|
357
|
-
</li>
|
|
358
|
-
</ol>
|
|
359
|
-
<h3>Key Functions</h3>
|
|
360
|
-
<p><strong>execute_sql()</strong></p>
|
|
361
|
-
<ul>
|
|
362
|
-
<li>Attempts multiple SQL execution methods</li>
|
|
363
|
-
<li>Provides graceful degradation</li>
|
|
364
|
-
<li>Always ensures operation completion</li>
|
|
365
|
-
</ul>
|
|
366
|
-
<p><strong>create_user()</strong></p>
|
|
367
|
-
<ul>
|
|
368
|
-
<li>Checks if user exists</li>
|
|
369
|
-
<li>Offers creation options</li>
|
|
370
|
-
<li>Handles all three creation methods</li>
|
|
371
|
-
</ul>
|
|
372
|
-
<p><strong>grant_access()</strong></p>
|
|
373
|
-
<ul>
|
|
374
|
-
<li>Uses PL/pgSQL for atomic operations</li>
|
|
375
|
-
<li>Validates site and user existence</li>
|
|
376
|
-
<li>Handles duplicate access gracefully</li>
|
|
377
|
-
</ul>
|
|
378
|
-
<h2>Usage Guide</h2>
|
|
379
|
-
<h3>Initial Setup</h3>
|
|
380
|
-
<pre><code class="language-bash"># First time setup
|
|
381
|
-
cd user-management
|
|
382
|
-
./add-users.sh setup
|
|
383
|
-
|
|
384
|
-
# Enter your Supabase project ID when prompted
|
|
385
|
-
# This links the project and saves configuration
|
|
386
|
-
</code></pre>
|
|
387
|
-
<h3>Common Operations</h3>
|
|
388
|
-
<p><strong>Add a single user:</strong></p>
|
|
389
|
-
<pre><code class="language-bash">./add-users.sh add wru-bid-analysis.vercel.app user@email.com
|
|
390
|
-
</code></pre>
|
|
391
|
-
<p><strong>Bulk add from file:</strong></p>
|
|
392
|
-
<pre><code class="language-bash">./add-users.sh bulk wru-bid-analysis.vercel.app users.txt
|
|
393
|
-
</code></pre>
|
|
394
|
-
<p><strong>List users for a site:</strong></p>
|
|
395
|
-
<pre><code class="language-bash">./add-users.sh list wru-bid-analysis.vercel.app
|
|
396
|
-
</code></pre>
|
|
397
|
-
<p><strong>Check user status:</strong></p>
|
|
398
|
-
<pre><code class="language-bash">./add-users.sh check user@email.com
|
|
399
|
-
</code></pre>
|
|
400
|
-
<p><strong>Remove access:</strong></p>
|
|
401
|
-
<pre><code class="language-bash">./add-users.sh remove wru-bid-analysis.vercel.app user@email.com
|
|
402
|
-
</code></pre>
|
|
403
|
-
<h3>File Formats</h3>
|
|
404
|
-
<p><strong>users.txt format:</strong></p>
|
|
405
|
-
<pre><code># Comments start with #
|
|
406
|
-
# One email per line
|
|
407
|
-
john@example.com
|
|
408
|
-
jane@example.com
|
|
409
|
-
admin@company.com
|
|
410
|
-
</code></pre>
|
|
411
|
-
<p><strong>.env format:</strong></p>
|
|
412
|
-
<pre><code class="language-bash"># Your Supabase project ID
|
|
413
|
-
SUPABASE_PROJECT_ID=your-project-id-here
|
|
414
|
-
|
|
415
|
-
# Optional: Service role key for programmatic creation
|
|
416
|
-
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here
|
|
417
|
-
|
|
418
|
-
# Optional: Direct database URL
|
|
419
|
-
DATABASE_URL=postgresql://postgres:[password]@db.[project-id].supabase.co:5432/postgres
|
|
420
|
-
</code></pre>
|
|
421
|
-
<h2>Security Considerations</h2>
|
|
422
|
-
<ol>
|
|
423
|
-
<li><p><strong>Service Role Key</strong></p>
|
|
424
|
-
<ul>
|
|
425
|
-
<li>Never commit to version control</li>
|
|
426
|
-
<li>Only stored temporarily in memory</li>
|
|
427
|
-
<li>Used only for user creation</li>
|
|
428
|
-
</ul>
|
|
429
|
-
</li>
|
|
430
|
-
<li><p><strong>Password Management</strong></p>
|
|
431
|
-
<ul>
|
|
432
|
-
<li>System never handles user passwords</li>
|
|
433
|
-
<li>Random temporary passwords generated</li>
|
|
434
|
-
<li>Users must reset password via email</li>
|
|
435
|
-
</ul>
|
|
436
|
-
</li>
|
|
437
|
-
<li><p><strong>Access Control</strong></p>
|
|
438
|
-
<ul>
|
|
439
|
-
<li>Users only see sites they have access to</li>
|
|
440
|
-
<li>All operations are logged with timestamps</li>
|
|
441
|
-
<li>Destructive operations require confirmation</li>
|
|
442
|
-
</ul>
|
|
443
|
-
</li>
|
|
444
|
-
</ol>
|
|
445
|
-
<h2>Troubleshooting</h2>
|
|
446
|
-
<h3>Common Issues</h3>
|
|
447
|
-
<p><strong>"unknown command 'users' for 'supabase'"</strong></p>
|
|
448
|
-
<ul>
|
|
449
|
-
<li>Expected behavior - Supabase CLI doesn't have user commands</li>
|
|
450
|
-
<li>Use the manual dashboard method or service role key</li>
|
|
451
|
-
</ul>
|
|
452
|
-
<p><strong>"unknown shorthand flag: 'f' in -f"</strong></p>
|
|
453
|
-
<ul>
|
|
454
|
-
<li>Old Supabase CLI version</li>
|
|
455
|
-
<li>Script automatically falls back to piping method</li>
|
|
456
|
-
</ul>
|
|
457
|
-
<p><strong>"command not found: supabase db execute"</strong></p>
|
|
458
|
-
<ul>
|
|
459
|
-
<li>CLI version 2.6.8 or older</li>
|
|
460
|
-
<li>Script provides SQL for manual execution</li>
|
|
461
|
-
</ul>
|
|
462
|
-
<h3>Recommended Solutions</h3>
|
|
463
|
-
<ol>
|
|
464
|
-
<li><p><strong>Update Supabase CLI</strong></p>
|
|
465
|
-
<pre><code class="language-bash">npm update -g supabase
|
|
466
|
-
</code></pre>
|
|
467
|
-
</li>
|
|
468
|
-
<li><p><strong>Set DATABASE_URL</strong></p>
|
|
469
|
-
<ul>
|
|
470
|
-
<li>Get from Supabase dashboard</li>
|
|
471
|
-
<li>Add to .env file</li>
|
|
472
|
-
<li>Enables direct psql execution</li>
|
|
473
|
-
</ul>
|
|
474
|
-
</li>
|
|
475
|
-
<li><p><strong>Use Service Role Key</strong></p>
|
|
476
|
-
<ul>
|
|
477
|
-
<li>For automated user creation</li>
|
|
478
|
-
<li>Find in project API settings</li>
|
|
479
|
-
</ul>
|
|
480
|
-
</li>
|
|
481
|
-
</ol>
|
|
482
|
-
<h2>Limitations</h2>
|
|
483
|
-
<ol>
|
|
484
|
-
<li><p><strong>User Deletion</strong></p>
|
|
485
|
-
<ul>
|
|
486
|
-
<li>CLI cannot delete users from auth.users</li>
|
|
487
|
-
<li>Only removes access records</li>
|
|
488
|
-
<li>Full deletion requires dashboard</li>
|
|
489
|
-
</ul>
|
|
490
|
-
</li>
|
|
491
|
-
<li><p><strong>Batch Operations</strong></p>
|
|
492
|
-
<ul>
|
|
493
|
-
<li>No transaction support across user creation</li>
|
|
494
|
-
<li>Failures are reported but don't roll back</li>
|
|
495
|
-
</ul>
|
|
496
|
-
</li>
|
|
497
|
-
<li><p><strong>CLI Version Dependencies</strong></p>
|
|
498
|
-
<ul>
|
|
499
|
-
<li>Features vary by Supabase CLI version</li>
|
|
500
|
-
<li>Script handles gracefully but manual steps may be needed</li>
|
|
501
|
-
</ul>
|
|
502
|
-
</li>
|
|
503
|
-
</ol>
|
|
504
|
-
<h2>Best Practices</h2>
|
|
505
|
-
<ol>
|
|
506
|
-
<li><p><strong>User Onboarding</strong></p>
|
|
507
|
-
<ul>
|
|
508
|
-
<li>Create users.txt file for teams</li>
|
|
509
|
-
<li>Use bulk add for efficiency</li>
|
|
510
|
-
<li>Verify with list command</li>
|
|
511
|
-
</ul>
|
|
512
|
-
</li>
|
|
513
|
-
<li><p><strong>Access Management</strong></p>
|
|
514
|
-
<ul>
|
|
515
|
-
<li>Regularly audit with list/check commands</li>
|
|
516
|
-
<li>Remove access promptly when needed</li>
|
|
517
|
-
<li>Document site ownership</li>
|
|
518
|
-
</ul>
|
|
519
|
-
</li>
|
|
520
|
-
<li><p><strong>Security</strong></p>
|
|
521
|
-
<ul>
|
|
522
|
-
<li>Keep service role key secure</li>
|
|
523
|
-
<li>Use .gitignore for sensitive files</li>
|
|
524
|
-
<li>Rotate keys periodically</li>
|
|
525
|
-
</ul>
|
|
526
|
-
</li>
|
|
527
|
-
</ol>
|
|
528
|
-
<h2>Integration with doc-builder</h2>
|
|
529
|
-
<p>The user management system integrates seamlessly with <code>@knowcode/doc-builder</code>:</p>
|
|
530
|
-
<ol>
|
|
531
|
-
<li><p><strong>Authentication Flow</strong></p>
|
|
532
|
-
<ul>
|
|
533
|
-
<li>Users receive password reset email</li>
|
|
534
|
-
<li>Set password and login</li>
|
|
535
|
-
<li>Access controlled by docbuilder_access table</li>
|
|
536
|
-
</ul>
|
|
537
|
-
</li>
|
|
538
|
-
<li><p><strong>Site Management</strong></p>
|
|
539
|
-
<ul>
|
|
540
|
-
<li>Each deployed doc site has entry in docbuilder_sites</li>
|
|
541
|
-
<li>Access is per-site, not global</li>
|
|
542
|
-
<li>Multiple sites can share users</li>
|
|
543
|
-
</ul>
|
|
544
|
-
</li>
|
|
545
|
-
<li><p><strong>Deployment Workflow</strong></p>
|
|
546
|
-
<ul>
|
|
547
|
-
<li>Deploy site with doc-builder</li>
|
|
548
|
-
<li>Add site to docbuilder_sites table</li>
|
|
549
|
-
<li>Use this tool to grant user access</li>
|
|
550
|
-
</ul>
|
|
551
|
-
</li>
|
|
552
|
-
</ol>
|
|
553
|
-
<h2>Future Enhancements</h2>
|
|
554
|
-
<p>Potential improvements identified:</p>
|
|
555
|
-
<ol>
|
|
556
|
-
<li><p><strong>API Integration</strong></p>
|
|
557
|
-
<ul>
|
|
558
|
-
<li>REST API for user management</li>
|
|
559
|
-
<li>Web interface for non-technical users</li>
|
|
560
|
-
<li>Webhook notifications</li>
|
|
561
|
-
</ul>
|
|
562
|
-
</li>
|
|
563
|
-
<li><p><strong>Enhanced Features</strong></p>
|
|
564
|
-
<ul>
|
|
565
|
-
<li>Role-based access control</li>
|
|
566
|
-
<li>Temporary access grants</li>
|
|
567
|
-
<li>Access expiration dates</li>
|
|
568
|
-
</ul>
|
|
569
|
-
</li>
|
|
570
|
-
<li><p><strong>Better CLI Integration</strong></p>
|
|
571
|
-
<ul>
|
|
572
|
-
<li>Direct integration with doc-builder CLI</li>
|
|
573
|
-
<li>Automated site creation on deployment</li>
|
|
574
|
-
<li>User sync from external systems</li>
|
|
575
|
-
</ul>
|
|
576
|
-
</li>
|
|
577
|
-
</ol>
|
|
578
|
-
<h2>Conclusion</h2>
|
|
579
|
-
<p>This user management system provides a robust solution for managing access to Supabase-authenticated documentation sites. Despite Supabase CLI limitations, it offers multiple workarounds and maintains a user-friendly interface with comprehensive error handling and beautiful terminal output.</p>
|
|
580
|
-
<p>The system successfully demonstrates how to work around platform limitations while providing a professional tool that handles real-world authentication and authorization requirements.</p>
|
|
581
|
-
|
|
582
|
-
</div>
|
|
583
|
-
</main>
|
|
584
|
-
</div>
|
|
585
|
-
|
|
586
|
-
<!-- Scripts -->
|
|
587
|
-
<script>
|
|
588
|
-
// Pass configuration to frontend
|
|
589
|
-
window.docBuilderConfig = {
|
|
590
|
-
features: {
|
|
591
|
-
showPdfDownload: true,
|
|
592
|
-
menuDefaultOpen: false,
|
|
593
|
-
mermaidEnhanced: true
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
|
-
</script>
|
|
597
|
-
<script src="/js/main.js"></script>
|
|
598
|
-
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
|
|
599
|
-
<script src="/js/auth.js"></script>
|
|
600
|
-
</body>
|
|
601
|
-
</html>
|
|
Binary file
|