@knowcode/doc-builder 1.7.4 → 1.7.5
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 +6 -1
- package/CHANGELOG.md +18 -0
- package/README.md +23 -6
- package/RELEASE-NOTES-1.7.5.md +64 -0
- package/cli.js +214 -7
- package/grant-access.sql +15 -0
- package/html/README.html +14 -4
- package/html/auth.js +97 -0
- package/html/documentation-index.html +14 -4
- package/html/guides/authentication-default-change.html +302 -0
- package/html/guides/authentication-guide.html +32 -14
- package/html/guides/cache-control-anti-pattern.html +361 -0
- package/html/guides/claude-workflow-guide.html +14 -4
- package/html/guides/documentation-standards.html +14 -4
- package/html/guides/next-steps-walkthrough.html +638 -0
- package/html/guides/phosphor-icons-guide.html +14 -4
- package/html/guides/public-site-deployment.html +363 -0
- package/html/guides/search-engine-verification-guide.html +14 -4
- package/html/guides/seo-guide.html +14 -4
- package/html/guides/seo-optimization-guide.html +14 -4
- package/html/guides/supabase-auth-implementation-plan.html +543 -0
- package/html/guides/supabase-auth-integration-plan.html +671 -0
- package/html/guides/supabase-auth-setup-guide.html +498 -0
- package/html/guides/troubleshooting-guide.html +14 -4
- package/html/guides/vercel-deployment-auth-setup.html +337 -0
- package/html/guides/windows-setup-guide.html +14 -4
- package/html/index.html +14 -4
- package/html/launch/README.html +14 -4
- package/html/launch/bubble-plugin-specification.html +14 -4
- package/html/launch/go-to-market-strategy.html +14 -4
- package/html/launch/launch-announcements.html +14 -4
- package/html/login.html +102 -0
- package/html/logout.html +18 -0
- package/html/sitemap.xml +69 -21
- package/html/vercel-cli-setup-guide.html +14 -4
- package/html/vercel-first-time-setup-guide.html +14 -4
- package/lib/config.js +11 -26
- package/lib/core-builder.js +51 -87
- package/lib/supabase-auth.js +295 -0
- package/package.json +2 -1
- package/public-config.js +22 -0
- package/public-html/404.html +115 -0
- package/public-html/README.html +149 -0
- package/public-html/css/notion-style.css +2036 -0
- package/public-html/index.html +149 -0
- package/public-html/js/auth.js +67 -0
- package/public-html/js/main.js +1485 -0
- package/quick-test-commands.md +40 -0
- package/recordings/Screenshot 2025-07-24 at 18.22.01.png +0 -0
- package/setup-database.sql +41 -0
- package/test-auth-config.js +17 -0
- package/test-docs/README.md +39 -0
- package/test-html/404.html +115 -0
- package/test-html/README.html +172 -0
- package/test-html/auth.js +97 -0
- package/test-html/css/notion-style.css +2036 -0
- package/test-html/index.html +172 -0
- package/test-html/js/auth.js +97 -0
- package/test-html/js/main.js +1485 -0
- package/test-html/login.html +102 -0
- package/test-html/logout.html +18 -0
- package/update-domain.sql +9 -0
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
<title>Login - Test Documentation</title>
|
|
7
|
+
<link rel="stylesheet" href="css/notion-style.css">
|
|
8
|
+
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
|
|
9
|
+
</head>
|
|
10
|
+
<body class="auth-page">
|
|
11
|
+
<div class="auth-container">
|
|
12
|
+
<div class="auth-box">
|
|
13
|
+
<h1>Login to Test Documentation</h1>
|
|
14
|
+
<form id="login-form">
|
|
15
|
+
<div class="form-group">
|
|
16
|
+
<label for="email">Email</label>
|
|
17
|
+
<input type="email" id="email" name="email" required>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="form-group">
|
|
20
|
+
<label for="password">Password</label>
|
|
21
|
+
<input type="password" id="password" name="password" required>
|
|
22
|
+
</div>
|
|
23
|
+
<button type="submit" class="auth-button">Login</button>
|
|
24
|
+
</form>
|
|
25
|
+
<div id="error-message" class="error-message"></div>
|
|
26
|
+
<div class="auth-links">
|
|
27
|
+
<a href="#" id="forgot-password">Forgot Password?</a>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
// Initialize Supabase
|
|
34
|
+
const { createClient } = supabase;
|
|
35
|
+
const supabaseClient = createClient('https://xcihhnfcitjrwbynxmka.supabase.co', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InhjaWhobmZjaXRqcndieW54bWthIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTM0Mzc2MzcsImV4cCI6MjA2OTAxMzYzN30.zvWp3JFIR8fBIiwuFF5gqOR_Kxb42baZS5fsBz60XOY');
|
|
36
|
+
|
|
37
|
+
// Handle login form
|
|
38
|
+
document.getElementById('login-form').addEventListener('submit', async function(e) {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
|
|
41
|
+
const email = document.getElementById('email').value;
|
|
42
|
+
const password = document.getElementById('password').value;
|
|
43
|
+
const errorDiv = document.getElementById('error-message');
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
// Sign in with Supabase
|
|
47
|
+
const { data, error } = await supabaseClient.auth.signInWithPassword({
|
|
48
|
+
email: email,
|
|
49
|
+
password: password
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
if (error) throw error;
|
|
53
|
+
|
|
54
|
+
// Check if user has access to this site
|
|
55
|
+
const { data: access, error: accessError } = await supabaseClient
|
|
56
|
+
.from('docbuilder_access')
|
|
57
|
+
.select('*')
|
|
58
|
+
.eq('user_id', data.user.id)
|
|
59
|
+
.eq('site_id', '4d8a53bf-dcdd-48c0-98e0-cd1451518735')
|
|
60
|
+
.single();
|
|
61
|
+
|
|
62
|
+
if (accessError || !access) {
|
|
63
|
+
await supabaseClient.auth.signOut();
|
|
64
|
+
throw new Error('You do not have access to this documentation site');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Redirect to requested page
|
|
68
|
+
const params = new URLSearchParams(window.location.search);
|
|
69
|
+
const redirect = params.get('redirect') || '/';
|
|
70
|
+
window.location.href = redirect;
|
|
71
|
+
|
|
72
|
+
} catch (error) {
|
|
73
|
+
errorDiv.textContent = error.message;
|
|
74
|
+
errorDiv.style.display = 'block';
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// Handle forgot password
|
|
79
|
+
document.getElementById('forgot-password').addEventListener('click', async function(e) {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
|
|
82
|
+
const email = document.getElementById('email').value;
|
|
83
|
+
if (!email) {
|
|
84
|
+
alert('Please enter your email address first');
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
const { error } = await supabaseClient.auth.resetPasswordForEmail(email, {
|
|
90
|
+
redirectTo: window.location.origin + '/login.html'
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
if (error) throw error;
|
|
94
|
+
|
|
95
|
+
alert('Password reset email sent! Check your inbox.');
|
|
96
|
+
} catch (error) {
|
|
97
|
+
alert('Error sending reset email: ' + error.message);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
101
|
+
</body>
|
|
102
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
<title>Logged Out - Test Documentation</title>
|
|
7
|
+
<link rel="stylesheet" href="css/notion-style.css">
|
|
8
|
+
</head>
|
|
9
|
+
<body class="auth-page">
|
|
10
|
+
<div class="auth-container">
|
|
11
|
+
<div class="auth-box">
|
|
12
|
+
<h1>You have been logged out</h1>
|
|
13
|
+
<p>Thank you for using Test Documentation.</p>
|
|
14
|
+
<a href="login.html" class="auth-button">Login Again</a>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Update domain for Vercel deployment
|
|
2
|
+
UPDATE docbuilder_sites
|
|
3
|
+
SET domain = 'doc-builder-2znroyb5z-lindsay-1340s-projects.vercel.app'
|
|
4
|
+
WHERE id = '4d8a53bf-dcdd-48c0-98e0-cd1451518735';
|
|
5
|
+
|
|
6
|
+
-- Verify the update
|
|
7
|
+
SELECT id, domain, name
|
|
8
|
+
FROM docbuilder_sites
|
|
9
|
+
WHERE id = '4d8a53bf-dcdd-48c0-98e0-cd1451518735';
|