@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.
- package/.claude/settings.local.json +5 -1
- package/CHANGELOG.md +39 -3
- package/README.md +4 -4
- package/assets/css/notion-style.css +26 -0
- package/cli.js +9 -40
- package/debug-login.sql +30 -0
- package/html/README.html +27 -3
- package/html/auth.js +2 -2
- package/html/css/notion-style.css +26 -0
- package/html/documentation-index.html +27 -3
- package/html/guides/authentication-default-change.html +27 -3
- package/html/guides/authentication-guide.html +58 -45
- package/html/guides/claude-workflow-guide.html +27 -3
- package/html/guides/documentation-standards.html +27 -3
- package/html/guides/phosphor-icons-guide.html +27 -3
- package/html/guides/private-directory-authentication.html +59 -17
- package/html/guides/public-site-deployment.html +32 -9
- package/html/guides/search-engine-verification-guide.html +27 -3
- package/html/guides/seo-guide.html +27 -3
- package/html/guides/seo-optimization-guide.html +27 -3
- package/html/guides/troubleshooting-guide.html +27 -3
- package/html/guides/windows-setup-guide.html +27 -3
- package/html/index.html +27 -3
- package/html/js/auth.js +2 -2
- package/html/login.html +2 -2
- package/html/private/cache-control-anti-pattern.html +5 -5
- package/html/private/launch/README.html +5 -5
- package/html/private/launch/auth-cleanup-summary.html +5 -5
- package/html/private/launch/bubble-plugin-specification.html +5 -5
- package/html/private/launch/go-to-market-strategy.html +5 -5
- package/html/private/launch/launch-announcements.html +5 -5
- package/html/private/launch/vercel-deployment-auth-setup.html +27 -21
- package/html/private/next-steps-walkthrough.html +18 -45
- package/html/private/supabase-auth-implementation-completed.html +8 -8
- package/html/private/supabase-auth-implementation-plan.html +16 -33
- package/html/private/supabase-auth-integration-plan.html +34 -69
- package/html/private/supabase-auth-setup-guide.html +73 -84
- package/html/private/test-private-doc.html +5 -5
- package/html/private/user-management-tooling.html +9 -15
- package/html/sitemap.xml +44 -44
- package/html/vercel-cli-setup-guide.html +27 -3
- package/html/vercel-first-time-setup-guide.html +27 -3
- package/lib/config.js +3 -11
- package/lib/core-builder.js +7 -12
- package/lib/shared-auth-config.js +2 -10
- package/lib/supabase-auth.js +5 -11
- package/migrate-to-domain-auth.sql +47 -0
- package/package.json +1 -1
- package/setup-database-v2.sql +53 -0
- package/user-access-view.sql +49 -0
- package/user-management/README.md +9 -18
- package/user-management/add-users.sh +31 -11
|
@@ -39,7 +39,11 @@
|
|
|
39
39
|
"Bash(python3:*)",
|
|
40
40
|
"Bash(chmod:*)",
|
|
41
41
|
"Bash(supabase auth:*)",
|
|
42
|
-
"Bash(supabase:*)"
|
|
42
|
+
"Bash(supabase:*)",
|
|
43
|
+
"Bash(DEBUG=1 ./user-management/add-users.sh add wru-bid-analysis.vercel.app lindsay@knowcode.tech)",
|
|
44
|
+
"Bash(./user-management/add-users.sh:*)",
|
|
45
|
+
"Bash(DEBUG=1 ./add-users.sh add wru-bid-analysis.vercel.app lindsay@knowcode.tech)",
|
|
46
|
+
"Bash(brew upgrade:*)"
|
|
43
47
|
],
|
|
44
48
|
"deny": []
|
|
45
49
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -5,22 +5,58 @@ All notable changes to @knowcode/doc-builder will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.8.4] - 2025-07-26
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Private navigation sections now visible to authenticated users on all pages
|
|
12
|
+
- CSS-based dynamic navigation - private sections show/hide based on authentication state
|
|
13
|
+
- Lock icon (🔒) indicator on private navigation sections
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Navigation now includes all files (public and private) in HTML
|
|
17
|
+
- Private sections hidden by default with CSS, shown when body has 'authenticated' class
|
|
18
|
+
- Better UX - authenticated users can discover all available content
|
|
19
|
+
|
|
20
|
+
### Security
|
|
21
|
+
- Private content URLs still require authentication to access
|
|
22
|
+
- Only navigation visibility changed - content protection unchanged
|
|
23
|
+
|
|
24
|
+
## [1.8.3] - 2025-07-26
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Complete overhaul of authentication system to use domain-based access instead of site IDs
|
|
28
|
+
- **BREAKING**: Removed site ID system entirely - authentication now uses `window.location.host`
|
|
29
|
+
- Simplified database schema to single `docbuilder_access` table with (user_id, domain) primary key
|
|
30
|
+
- No more site registration required - just grant users access to domains
|
|
31
|
+
|
|
32
|
+
### Updated
|
|
33
|
+
- All documentation updated to reflect domain-based authentication
|
|
34
|
+
- CLI commands simplified - no more site ID parameters needed
|
|
35
|
+
- User management tools now work with domains directly
|
|
36
|
+
|
|
37
|
+
### Developer Experience
|
|
38
|
+
- Much simpler setup - no site registration step
|
|
39
|
+
- Automatic domain detection from browser location
|
|
40
|
+
- Easier multi-site management - just use different domains
|
|
41
|
+
|
|
8
42
|
## [1.8.2] - 2025-07-26
|
|
9
43
|
|
|
10
44
|
### Added
|
|
11
45
|
- **Automatic Supabase Credentials**: No more placeholder errors! Credentials are now built into the package
|
|
12
|
-
- **
|
|
46
|
+
- **Domain-based Authentication**: No more site IDs! Authentication now uses the current domain automatically
|
|
13
47
|
- Shared authentication database across all doc-builder sites for easier management
|
|
14
48
|
|
|
15
49
|
### Changed
|
|
16
50
|
- Supabase URL and anonymous key are now provided by default via `shared-auth-config.js`
|
|
17
|
-
-
|
|
51
|
+
- **BREAKING**: Removed site ID system in favor of domain-based authentication
|
|
52
|
+
- Authentication now uses `window.location.host` for access control
|
|
53
|
+
- Simplified database schema to single `docbuilder_access` table
|
|
18
54
|
- Updated documentation to reflect zero-configuration authentication
|
|
19
55
|
|
|
20
56
|
### Developer Experience
|
|
21
57
|
- No need to configure Supabase credentials manually anymore
|
|
22
58
|
- Just create a `private` directory and authentication works immediately
|
|
23
|
-
- Site administrators only need to
|
|
59
|
+
- Site administrators only need to grant users access to domains, no site registration needed
|
|
24
60
|
|
|
25
61
|
## [1.8.1] - 2025-07-26
|
|
26
62
|
|
package/README.md
CHANGED
|
@@ -218,11 +218,11 @@ module.exports = {
|
|
|
218
218
|
attachments: true // Copy PDFs, Excel files, etc. (default: true)
|
|
219
219
|
},
|
|
220
220
|
|
|
221
|
-
// Supabase Authentication
|
|
221
|
+
// Supabase Authentication (v1.8.2+ has built-in defaults)
|
|
222
222
|
auth: {
|
|
223
|
-
supabaseUrl: process.env.SUPABASE_URL,
|
|
224
|
-
supabaseAnonKey: process.env.SUPABASE_ANON_KEY
|
|
225
|
-
siteId
|
|
223
|
+
supabaseUrl: process.env.SUPABASE_URL, // Optional
|
|
224
|
+
supabaseAnonKey: process.env.SUPABASE_ANON_KEY // Optional
|
|
225
|
+
// Domain-based auth - no siteId needed!
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
228
|
```
|
|
@@ -2041,4 +2041,30 @@ code .ph {
|
|
|
2041
2041
|
/* Additional fine-tuning for specific contexts */
|
|
2042
2042
|
.content-inner .ph {
|
|
2043
2043
|
/* Remove the transform as we're now using consistent vertical-align: middle */
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
/* ============================================================================
|
|
2047
|
+
Private Navigation Visibility
|
|
2048
|
+
============================================================================ */
|
|
2049
|
+
|
|
2050
|
+
/* Hide private navigation sections by default */
|
|
2051
|
+
.private-nav {
|
|
2052
|
+
display: none;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
/* Show private navigation when user is authenticated */
|
|
2056
|
+
body.authenticated .private-nav {
|
|
2057
|
+
display: block;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
/* Smooth transition for authentication state changes */
|
|
2061
|
+
.nav-section {
|
|
2062
|
+
transition: opacity 0.2s ease-in-out;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/* Optional: Add a lock icon to private sections */
|
|
2066
|
+
.private-nav .nav-title::after {
|
|
2067
|
+
content: ' 🔒';
|
|
2068
|
+
font-size: 0.8em;
|
|
2069
|
+
opacity: 0.6;
|
|
2044
2070
|
}
|
package/cli.js
CHANGED
|
@@ -1506,7 +1506,6 @@ program
|
|
|
1506
1506
|
console.log(chalk.yellow('\n🔐 Supabase Authentication:'));
|
|
1507
1507
|
console.log(` • Supabase URL: ${config.auth?.supabaseUrl ? chalk.green('Configured') : chalk.red('Missing')}`);
|
|
1508
1508
|
console.log(` • Anonymous Key: ${config.auth?.supabaseAnonKey ? chalk.green('Configured') : chalk.red('Missing')}`);
|
|
1509
|
-
console.log(` • Site ID: ${config.auth?.siteId ? chalk.green('Configured') : chalk.red('Missing')}`);
|
|
1510
1509
|
}
|
|
1511
1510
|
|
|
1512
1511
|
if (config.seo?.enabled) {
|
|
@@ -1568,8 +1567,7 @@ program
|
|
|
1568
1567
|
|
|
1569
1568
|
auth: {
|
|
1570
1569
|
supabaseUrl: '${answers.supabaseUrl}',
|
|
1571
|
-
supabaseAnonKey: '${answers.supabaseAnonKey}'
|
|
1572
|
-
siteId: '' // Will be set after creating site in database
|
|
1570
|
+
supabaseAnonKey: '${answers.supabaseAnonKey}'
|
|
1573
1571
|
}
|
|
1574
1572
|
};`;
|
|
1575
1573
|
|
|
@@ -1577,51 +1575,22 @@ program
|
|
|
1577
1575
|
console.log(chalk.green(`✓ Configuration saved to ${configPath}`));
|
|
1578
1576
|
|
|
1579
1577
|
console.log(chalk.yellow('\n📋 Next steps:'));
|
|
1580
|
-
console.log('1. Create the database tables in your Supabase project (see
|
|
1581
|
-
console.log('2.
|
|
1582
|
-
console.log('3. Update the siteId in your config file');
|
|
1578
|
+
console.log('1. Create the database tables in your Supabase project (see setup-database-v2.sql)');
|
|
1579
|
+
console.log('2. Grant users access by adding their domain to docbuilder_access table');
|
|
1583
1580
|
|
|
1584
1581
|
} catch (error) {
|
|
1585
1582
|
console.error(chalk.red('Error initializing auth:'), error.message);
|
|
1586
1583
|
}
|
|
1587
1584
|
});
|
|
1588
1585
|
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
.description('Add a documentation site to Supabase database')
|
|
1592
|
-
.requiredOption('--domain <domain>', 'site domain (e.g., docs.example.com)')
|
|
1593
|
-
.requiredOption('--name <name>', 'site display name')
|
|
1594
|
-
.option('-c, --config <path>', 'path to config file (default: doc-builder.config.js)')
|
|
1595
|
-
.action(async (options) => {
|
|
1596
|
-
console.log(chalk.cyan('\n🌐 Add Documentation Site\n'));
|
|
1597
|
-
|
|
1598
|
-
try {
|
|
1599
|
-
const config = await loadConfig(options.config || 'doc-builder.config.js', {});
|
|
1600
|
-
|
|
1601
|
-
if (config.features?.authentication !== 'supabase') {
|
|
1602
|
-
console.error(chalk.red('Error: Supabase authentication is not configured. Run "doc-builder auth:init" first.'));
|
|
1603
|
-
return;
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
// This would connect to Supabase and create the site record
|
|
1607
|
-
console.log(chalk.yellow('🚧 This command requires Supabase admin integration.'));
|
|
1608
|
-
console.log('For now, manually add to your Supabase database:');
|
|
1609
|
-
console.log('');
|
|
1610
|
-
console.log(chalk.gray('INSERT INTO docbuilder_sites (domain, name)'));
|
|
1611
|
-
console.log(chalk.gray(`VALUES ('${options.domain}', '${options.name}');`));
|
|
1612
|
-
console.log('');
|
|
1613
|
-
console.log('Then update your config file with the returned site ID.');
|
|
1614
|
-
|
|
1615
|
-
} catch (error) {
|
|
1616
|
-
console.error(chalk.red('Error adding site:'), error.message);
|
|
1617
|
-
}
|
|
1618
|
-
});
|
|
1586
|
+
// Note: auth:add-site command is no longer needed with domain-based authentication
|
|
1587
|
+
// Sites don't need to be registered - just grant users access to domains directly
|
|
1619
1588
|
|
|
1620
1589
|
program
|
|
1621
1590
|
.command('auth:grant')
|
|
1622
1591
|
.description('Grant user access to documentation site')
|
|
1623
1592
|
.requiredOption('--email <email>', 'user email address')
|
|
1624
|
-
.requiredOption('--
|
|
1593
|
+
.requiredOption('--domain <domain>', 'site domain (e.g., docs.example.com)')
|
|
1625
1594
|
.option('-c, --config <path>', 'path to config file (default: doc-builder.config.js)')
|
|
1626
1595
|
.action(async (options) => {
|
|
1627
1596
|
console.log(chalk.cyan('\n👥 Grant User Access\n'));
|
|
@@ -1637,9 +1606,9 @@ program
|
|
|
1637
1606
|
console.log(chalk.yellow('🚧 This command requires Supabase admin integration.'));
|
|
1638
1607
|
console.log('For now, manually add to your Supabase database:');
|
|
1639
1608
|
console.log('');
|
|
1640
|
-
console.log(chalk.gray(
|
|
1641
|
-
console.log(chalk.gray('INSERT INTO docbuilder_access (user_id,
|
|
1642
|
-
console.log(chalk.gray(`VALUES ('user-uuid-here', '${options.
|
|
1609
|
+
console.log(chalk.gray(`-- First, get the user ID from auth.users where email = '${options.email}'`));
|
|
1610
|
+
console.log(chalk.gray('INSERT INTO docbuilder_access (user_id, domain)'));
|
|
1611
|
+
console.log(chalk.gray(`VALUES ('user-uuid-here', '${options.domain}');`));
|
|
1643
1612
|
|
|
1644
1613
|
} catch (error) {
|
|
1645
1614
|
console.error(chalk.red('Error granting access:'), error.message);
|
package/debug-login.sql
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- Debug Login Issues
|
|
2
|
+
-- Run these queries in Supabase SQL Editor to diagnose login problems
|
|
3
|
+
|
|
4
|
+
-- 1. Check if your user exists
|
|
5
|
+
SELECT id, email, created_at, last_sign_in_at
|
|
6
|
+
FROM auth.users
|
|
7
|
+
WHERE email = 'YOUR_EMAIL_HERE'; -- Replace with your email
|
|
8
|
+
|
|
9
|
+
-- 2. Check what domains you have access to
|
|
10
|
+
SELECT da.domain, da.created_at as access_granted
|
|
11
|
+
FROM docbuilder_access da
|
|
12
|
+
JOIN auth.users u ON da.user_id = u.id
|
|
13
|
+
WHERE u.email = 'YOUR_EMAIL_HERE'; -- Replace with your email
|
|
14
|
+
|
|
15
|
+
-- 3. Check all users and their domains (admin view)
|
|
16
|
+
SELECT u.email, da.domain, da.created_at
|
|
17
|
+
FROM docbuilder_access da
|
|
18
|
+
JOIN auth.users u ON da.user_id = u.id
|
|
19
|
+
ORDER BY u.email, da.domain;
|
|
20
|
+
|
|
21
|
+
-- 4. If you need to grant yourself access to a domain
|
|
22
|
+
-- First get your user ID from query #1, then:
|
|
23
|
+
INSERT INTO docbuilder_access (user_id, domain)
|
|
24
|
+
VALUES ('YOUR_USER_ID', 'YOUR_DOMAIN_HERE');
|
|
25
|
+
-- Example domains: 'localhost:3000', 'doc-builder-delta.vercel.app', etc.
|
|
26
|
+
|
|
27
|
+
-- 5. Common domains to check/add:
|
|
28
|
+
-- For local development: 'localhost:3000' or 'localhost:8080'
|
|
29
|
+
-- For Vercel preview: 'your-app-name.vercel.app'
|
|
30
|
+
-- For production: 'docs.yourcompany.com'
|
package/html/README.html
CHANGED
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"name": "Knowcode Ltd",
|
|
99
99
|
"url": "https://knowcode.tech"
|
|
100
100
|
},
|
|
101
|
-
"datePublished": "2025-07-
|
|
102
|
-
"dateModified": "2025-07-
|
|
101
|
+
"datePublished": "2025-07-26T11:44:31.465Z",
|
|
102
|
+
"dateModified": "2025-07-26T11:44:31.465Z",
|
|
103
103
|
"mainEntityOfPage": {
|
|
104
104
|
"@type": "WebPage",
|
|
105
105
|
"@id": "https://doc-builder-delta.vercel.app/README.html"
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
|
|
133
133
|
<div class="header-actions">
|
|
134
134
|
<div class="deployment-info">
|
|
135
|
-
<span class="deployment-date" title="Built with doc-builder v1.8.
|
|
135
|
+
<span class="deployment-date" title="Built with doc-builder v1.8.3">Last updated: Jul 26, 2025, 11:44 AM UTC</span>
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
138
|
|
|
@@ -206,6 +206,30 @@
|
|
|
206
206
|
<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>
|
|
207
207
|
<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>
|
|
208
208
|
<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>
|
|
209
|
+
<div class="nav-section private-nav" data-level="1">
|
|
210
|
+
<a class="nav-title collapsible expanded" href="#" data-target="nav-private-1" >
|
|
211
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
|
|
212
|
+
</a>
|
|
213
|
+
<div class="nav-content" id="nav-private-1">
|
|
214
|
+
<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="fas fa-file-alt"></i> Cache Control Anti Pattern</a>
|
|
215
|
+
<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="fas fa-file-alt"></i> Next Steps Walkthrough</a>
|
|
216
|
+
<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="fas fa-file-alt"></i> Supabase Auth Implementation Completed</a>
|
|
217
|
+
<a href="/private/supabase-auth-implementation-plan.html" class="nav-item" data-tooltip="Supabase Auth Implementation Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Implementation Plan</a>
|
|
218
|
+
<a href="/private/supabase-auth-integration-plan.html" class="nav-item" data-tooltip="Supabase Authentication Integration Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Integration Plan</a>
|
|
219
|
+
<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>
|
|
220
|
+
<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>
|
|
221
|
+
<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>
|
|
222
|
+
<div class="nav-section private-nav" data-level="2">
|
|
223
|
+
<a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
|
|
224
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
|
|
225
|
+
</a>
|
|
226
|
+
<div class="nav-content collapsed" id="nav-private-launch-2">
|
|
227
|
+
<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="fas fa-file-alt"></i> Launch Overview</a>
|
|
228
|
+
<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="fas fa-file-alt"></i> Auth Cleanup Summary</a>
|
|
229
|
+
<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="fas fa-file-alt"></i> Bubble Plugin Specification</a>
|
|
230
|
+
<a href="/private/launch/go-to-market-strategy.html" class="nav-item" data-tooltip="Go-to-Market Strategy & Product Launch Plan."><i class="fas fa-file-alt"></i> Go To Market Strategy</a>
|
|
231
|
+
<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="fas fa-file-alt"></i> Launch Announcements</a>
|
|
232
|
+
<a href="/private/launch/vercel-deployment-auth-setup.html" class="nav-item" data-tooltip="Vercel Deployment Authentication Setup Guide."><i class="fas fa-file-alt"></i> Vercel Deployment Auth Setup</a></div></div>
|
|
209
233
|
</nav>
|
|
210
234
|
<div class="resize-handle"></div>
|
|
211
235
|
</aside>
|
package/html/auth.js
CHANGED
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// Check if user has access to this site
|
|
49
|
+
// Check if user has access to this site (using domain)
|
|
50
50
|
const { data: access, error: accessError } = await supabaseClient
|
|
51
51
|
.from('docbuilder_access')
|
|
52
52
|
.select('*')
|
|
53
53
|
.eq('user_id', user.id)
|
|
54
|
-
.eq('
|
|
54
|
+
.eq('domain', window.location.host)
|
|
55
55
|
.single();
|
|
56
56
|
|
|
57
57
|
if (accessError || !access) {
|
|
@@ -2041,4 +2041,30 @@ code .ph {
|
|
|
2041
2041
|
/* Additional fine-tuning for specific contexts */
|
|
2042
2042
|
.content-inner .ph {
|
|
2043
2043
|
/* Remove the transform as we're now using consistent vertical-align: middle */
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
/* ============================================================================
|
|
2047
|
+
Private Navigation Visibility
|
|
2048
|
+
============================================================================ */
|
|
2049
|
+
|
|
2050
|
+
/* Hide private navigation sections by default */
|
|
2051
|
+
.private-nav {
|
|
2052
|
+
display: none;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
/* Show private navigation when user is authenticated */
|
|
2056
|
+
body.authenticated .private-nav {
|
|
2057
|
+
display: block;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
/* Smooth transition for authentication state changes */
|
|
2061
|
+
.nav-section {
|
|
2062
|
+
transition: opacity 0.2s ease-in-out;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
/* Optional: Add a lock icon to private sections */
|
|
2066
|
+
.private-nav .nav-title::after {
|
|
2067
|
+
content: ' 🔒';
|
|
2068
|
+
font-size: 0.8em;
|
|
2069
|
+
opacity: 0.6;
|
|
2044
2070
|
}
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"name": "Knowcode Ltd",
|
|
99
99
|
"url": "https://knowcode.tech"
|
|
100
100
|
},
|
|
101
|
-
"datePublished": "2025-07-
|
|
102
|
-
"dateModified": "2025-07-
|
|
101
|
+
"datePublished": "2025-07-26T11:44:31.475Z",
|
|
102
|
+
"dateModified": "2025-07-26T11:44:31.475Z",
|
|
103
103
|
"mainEntityOfPage": {
|
|
104
104
|
"@type": "WebPage",
|
|
105
105
|
"@id": "https://doc-builder-delta.vercel.app/documentation-index.html"
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
|
|
133
133
|
<div class="header-actions">
|
|
134
134
|
<div class="deployment-info">
|
|
135
|
-
<span class="deployment-date" title="Built with doc-builder v1.8.
|
|
135
|
+
<span class="deployment-date" title="Built with doc-builder v1.8.3">Last updated: Jul 26, 2025, 11:44 AM UTC</span>
|
|
136
136
|
</div>
|
|
137
137
|
|
|
138
138
|
|
|
@@ -206,6 +206,30 @@
|
|
|
206
206
|
<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>
|
|
207
207
|
<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>
|
|
208
208
|
<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>
|
|
209
|
+
<div class="nav-section private-nav" data-level="1">
|
|
210
|
+
<a class="nav-title collapsible" href="#" data-target="nav-private-1" >
|
|
211
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
|
|
212
|
+
</a>
|
|
213
|
+
<div class="nav-content collapsed" id="nav-private-1">
|
|
214
|
+
<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="fas fa-file-alt"></i> Cache Control Anti Pattern</a>
|
|
215
|
+
<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="fas fa-file-alt"></i> Next Steps Walkthrough</a>
|
|
216
|
+
<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="fas fa-file-alt"></i> Supabase Auth Implementation Completed</a>
|
|
217
|
+
<a href="/private/supabase-auth-implementation-plan.html" class="nav-item" data-tooltip="Supabase Auth Implementation Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Implementation Plan</a>
|
|
218
|
+
<a href="/private/supabase-auth-integration-plan.html" class="nav-item" data-tooltip="Supabase Authentication Integration Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Integration Plan</a>
|
|
219
|
+
<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>
|
|
220
|
+
<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>
|
|
221
|
+
<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>
|
|
222
|
+
<div class="nav-section private-nav" data-level="2">
|
|
223
|
+
<a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
|
|
224
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
|
|
225
|
+
</a>
|
|
226
|
+
<div class="nav-content collapsed" id="nav-private-launch-2">
|
|
227
|
+
<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="fas fa-file-alt"></i> Launch Overview</a>
|
|
228
|
+
<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="fas fa-file-alt"></i> Auth Cleanup Summary</a>
|
|
229
|
+
<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="fas fa-file-alt"></i> Bubble Plugin Specification</a>
|
|
230
|
+
<a href="/private/launch/go-to-market-strategy.html" class="nav-item" data-tooltip="Go-to-Market Strategy & Product Launch Plan."><i class="fas fa-file-alt"></i> Go To Market Strategy</a>
|
|
231
|
+
<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="fas fa-file-alt"></i> Launch Announcements</a>
|
|
232
|
+
<a href="/private/launch/vercel-deployment-auth-setup.html" class="nav-item" data-tooltip="Vercel Deployment Authentication Setup Guide."><i class="fas fa-file-alt"></i> Vercel Deployment Auth Setup</a></div></div>
|
|
209
233
|
</nav>
|
|
210
234
|
<div class="resize-handle"></div>
|
|
211
235
|
</aside>
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"name": "Knowcode Ltd",
|
|
99
99
|
"url": "https://knowcode.tech"
|
|
100
100
|
},
|
|
101
|
-
"datePublished": "2025-07-
|
|
102
|
-
"dateModified": "2025-07-
|
|
101
|
+
"datePublished": "2025-07-26T11:44:31.478Z",
|
|
102
|
+
"dateModified": "2025-07-26T11:44:31.478Z",
|
|
103
103
|
"mainEntityOfPage": {
|
|
104
104
|
"@type": "WebPage",
|
|
105
105
|
"@id": "https://doc-builder-delta.vercel.app/guides/authentication-default-change.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.
|
|
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,6 +212,30 @@
|
|
|
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 private-nav" data-level="1">
|
|
216
|
+
<a class="nav-title collapsible" href="#" data-target="nav-private-1" >
|
|
217
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
|
|
218
|
+
</a>
|
|
219
|
+
<div class="nav-content collapsed" id="nav-private-1">
|
|
220
|
+
<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="fas fa-file-alt"></i> Cache Control Anti Pattern</a>
|
|
221
|
+
<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="fas fa-file-alt"></i> Next Steps Walkthrough</a>
|
|
222
|
+
<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="fas fa-file-alt"></i> Supabase Auth Implementation Completed</a>
|
|
223
|
+
<a href="/private/supabase-auth-implementation-plan.html" class="nav-item" data-tooltip="Supabase Auth Implementation Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Implementation Plan</a>
|
|
224
|
+
<a href="/private/supabase-auth-integration-plan.html" class="nav-item" data-tooltip="Supabase Authentication Integration Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Integration Plan</a>
|
|
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
|
+
<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
|
+
<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 private-nav" data-level="2">
|
|
229
|
+
<a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
|
|
230
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
|
|
231
|
+
</a>
|
|
232
|
+
<div class="nav-content collapsed" id="nav-private-launch-2">
|
|
233
|
+
<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="fas fa-file-alt"></i> Launch Overview</a>
|
|
234
|
+
<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="fas fa-file-alt"></i> Auth Cleanup Summary</a>
|
|
235
|
+
<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="fas fa-file-alt"></i> Bubble Plugin Specification</a>
|
|
236
|
+
<a href="/private/launch/go-to-market-strategy.html" class="nav-item" data-tooltip="Go-to-Market Strategy & Product Launch Plan."><i class="fas fa-file-alt"></i> Go To Market Strategy</a>
|
|
237
|
+
<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="fas fa-file-alt"></i> Launch Announcements</a>
|
|
238
|
+
<a href="/private/launch/vercel-deployment-auth-setup.html" class="nav-item" data-tooltip="Vercel Deployment Authentication Setup Guide."><i class="fas fa-file-alt"></i> Vercel Deployment Auth Setup</a></div></div>
|
|
215
239
|
</nav>
|
|
216
240
|
<div class="resize-handle"></div>
|
|
217
241
|
</aside>
|