Add 3 files
Browse files- README.md +7 -5
- index.html +333 -19
- prompts.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: wireframe
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: pink
|
5 |
+
colorTo: red
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,333 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>SAML DocGen Wireframe</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.sidebar {
|
11 |
+
scrollbar-width: thin;
|
12 |
+
scrollbar-color: #4b5563 #1f2937;
|
13 |
+
}
|
14 |
+
.sidebar::-webkit-scrollbar {
|
15 |
+
width: 6px;
|
16 |
+
}
|
17 |
+
.sidebar::-webkit-scrollbar-track {
|
18 |
+
background: #1f2937;
|
19 |
+
}
|
20 |
+
.sidebar::-webkit-scrollbar-thumb {
|
21 |
+
background-color: #4b5563;
|
22 |
+
border-radius: 3px;
|
23 |
+
}
|
24 |
+
.code-block {
|
25 |
+
font-family: 'Courier New', monospace;
|
26 |
+
background-color: #1e293b;
|
27 |
+
color: #f8fafc;
|
28 |
+
}
|
29 |
+
.tab-active {
|
30 |
+
border-bottom: 2px solid #3b82f6;
|
31 |
+
}
|
32 |
+
</style>
|
33 |
+
</head>
|
34 |
+
<body class="bg-gray-100 text-gray-800">
|
35 |
+
<div class="flex h-screen overflow-hidden">
|
36 |
+
<!-- Sidebar -->
|
37 |
+
<div class="sidebar w-64 bg-gray-800 text-gray-200 flex flex-col h-full overflow-y-auto">
|
38 |
+
<div class="p-4 border-b border-gray-700">
|
39 |
+
<div class="flex items-center space-x-2">
|
40 |
+
<div class="w-8 h-8 bg-blue-500 rounded-md flex items-center justify-center">
|
41 |
+
<i class="fas fa-lock text-white"></i>
|
42 |
+
</div>
|
43 |
+
<h1 class="text-xl font-bold">SAML DocGen</h1>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<div class="p-4">
|
48 |
+
<div class="relative">
|
49 |
+
<input type="text" placeholder="Search components..." class="w-full bg-gray-700 text-gray-200 px-4 py-2 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500">
|
50 |
+
<i class="fas fa-search absolute right-3 top-3 text-gray-400"></i>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<div class="flex-1 overflow-y-auto">
|
55 |
+
<div class="px-4 py-2">
|
56 |
+
<h3 class="text-xs uppercase tracking-wider text-gray-400 mb-2">Components</h3>
|
57 |
+
<ul>
|
58 |
+
<li class="mb-1">
|
59 |
+
<a href="#" class="block px-3 py-2 rounded-md hover:bg-gray-700 text-blue-400 bg-gray-700">
|
60 |
+
<i class="fas fa-key mr-2"></i> Authentication
|
61 |
+
</a>
|
62 |
+
</li>
|
63 |
+
<li class="mb-1">
|
64 |
+
<a href="#" class="block px-3 py-2 rounded-md hover:bg-gray-700">
|
65 |
+
<i class="fas fa-user-shield mr-2"></i> Authorization
|
66 |
+
</a>
|
67 |
+
</li>
|
68 |
+
<li class="mb-1">
|
69 |
+
<a href="#" class="block px-3 py-2 rounded-md hover:bg-gray-700">
|
70 |
+
<i class="fas fa-exchange-alt mr-2"></i> Token Exchange
|
71 |
+
</a>
|
72 |
+
</li>
|
73 |
+
<li class="mb-1">
|
74 |
+
<a href="#" class="block px-3 py-2 rounded-md hover:bg-gray-700">
|
75 |
+
<i class="fas fa-users mr-2"></i> User Management
|
76 |
+
</a>
|
77 |
+
</li>
|
78 |
+
</ul>
|
79 |
+
</div>
|
80 |
+
|
81 |
+
<div class="px-4 py-2 mt-4">
|
82 |
+
<h3 class="text-xs uppercase tracking-wider text-gray-400 mb-2">Configuration</h3>
|
83 |
+
<ul>
|
84 |
+
<li class="mb-1">
|
85 |
+
<a href="#" class="block px-3 py-2 rounded-md hover:bg-gray-700">
|
86 |
+
<i class="fas fa-cog mr-2"></i> Settings
|
87 |
+
</a>
|
88 |
+
</li>
|
89 |
+
<li class="mb-1">
|
90 |
+
<a href="#" class="block px-3 py-2 rounded-md hover:bg-gray-700">
|
91 |
+
<i class="fas fa-plug mr-2"></i> Integrations
|
92 |
+
</a>
|
93 |
+
</li>
|
94 |
+
<li class="mb-1">
|
95 |
+
<a href="#" class="block px-3 py-2 rounded-md hover:bg-gray-700">
|
96 |
+
<i class="fas fa-shield-alt mr-2"></i> Security
|
97 |
+
</a>
|
98 |
+
</li>
|
99 |
+
</ul>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
|
103 |
+
<div class="p-4 border-t border-gray-700">
|
104 |
+
<div class="flex items-center">
|
105 |
+
<div class="w-8 h-8 rounded-full bg-gray-600 flex items-center justify-center mr-2">
|
106 |
+
<i class="fas fa-user"></i>
|
107 |
+
</div>
|
108 |
+
<div>
|
109 |
+
<p class="text-sm font-medium">Admin User</p>
|
110 |
+
<p class="text-xs text-gray-400">admin@saml.co.za</p>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
+
|
116 |
+
<!-- Main Content -->
|
117 |
+
<div class="flex-1 flex flex-col overflow-hidden">
|
118 |
+
<!-- Header -->
|
119 |
+
<header class="bg-white border-b border-gray-200 p-4 flex items-center justify-between">
|
120 |
+
<div>
|
121 |
+
<h2 class="text-xl font-semibold">Authentication Component</h2>
|
122 |
+
<p class="text-sm text-gray-500">SAML 2.0 implementation guide</p>
|
123 |
+
</div>
|
124 |
+
<div class="flex space-x-3">
|
125 |
+
<button class="px-4 py-2 bg-gray-100 rounded-md hover:bg-gray-200 flex items-center">
|
126 |
+
<i class="fas fa-code-branch mr-2 text-gray-600"></i>
|
127 |
+
<span>Version 2.4.1</span>
|
128 |
+
</button>
|
129 |
+
<button class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 flex items-center">
|
130 |
+
<i class="fas fa-download mr-2"></i>
|
131 |
+
<span>Export</span>
|
132 |
+
</button>
|
133 |
+
</div>
|
134 |
+
</header>
|
135 |
+
|
136 |
+
<!-- Content Area -->
|
137 |
+
<div class="flex-1 overflow-y-auto p-6">
|
138 |
+
<div class="max-w-5xl mx-auto">
|
139 |
+
<!-- Tabs -->
|
140 |
+
<div class="border-b border-gray-200 mb-6">
|
141 |
+
<nav class="flex space-x-8">
|
142 |
+
<button class="tab-active py-4 px-1 font-medium text-blue-600">Documentation</button>
|
143 |
+
<button class="py-4 px-1 font-medium text-gray-500 hover:text-gray-700">Examples</button>
|
144 |
+
<button class="py-4 px-1 font-medium text-gray-500 hover:text-gray-700">Configuration</button>
|
145 |
+
<button class="py-4 px-1 font-medium text-gray-500 hover:text-gray-700">Troubleshooting</button>
|
146 |
+
</nav>
|
147 |
+
</div>
|
148 |
+
|
149 |
+
<!-- Content -->
|
150 |
+
<div class="bg-white rounded-lg shadow-sm p-6 mb-6">
|
151 |
+
<h3 class="text-lg font-semibold mb-4">SAML Authentication Flow</h3>
|
152 |
+
<p class="text-gray-600 mb-6">
|
153 |
+
The SAML authentication flow allows users to authenticate using their identity provider (IdP) credentials.
|
154 |
+
This component implements the standard SAML 2.0 Web Browser SSO Profile.
|
155 |
+
</p>
|
156 |
+
|
157 |
+
<div class="mb-8">
|
158 |
+
<h4 class="font-medium mb-3">Sequence Diagram</h4>
|
159 |
+
<div class="bg-gray-50 p-4 rounded-md border border-gray-200">
|
160 |
+
<div class="flex justify-center items-center h-40">
|
161 |
+
<div class="text-center">
|
162 |
+
<i class="fas fa-project-diagram text-4xl text-gray-300 mb-2"></i>
|
163 |
+
<p class="text-gray-400">SAML authentication sequence diagram</p>
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
|
169 |
+
<div class="mb-8">
|
170 |
+
<h4 class="font-medium mb-3">Configuration Parameters</h4>
|
171 |
+
<div class="overflow-x-auto">
|
172 |
+
<table class="min-w-full divide-y divide-gray-200">
|
173 |
+
<thead class="bg-gray-50">
|
174 |
+
<tr>
|
175 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Parameter</th>
|
176 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
177 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Required</th>
|
178 |
+
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th>
|
179 |
+
</tr>
|
180 |
+
</thead>
|
181 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
182 |
+
<tr>
|
183 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">idpMetadataUrl</td>
|
184 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">string</td>
|
185 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Yes</td>
|
186 |
+
<td class="px-6 py-4 text-sm text-gray-500">URL to the IdP metadata XML</td>
|
187 |
+
</tr>
|
188 |
+
<tr>
|
189 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">spEntityId</td>
|
190 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">string</td>
|
191 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Yes</td>
|
192 |
+
<td class="px-6 py-4 text-sm text-gray-500">Service Provider entity ID</td>
|
193 |
+
</tr>
|
194 |
+
<tr>
|
195 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">assertEndpoint</td>
|
196 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">string</td>
|
197 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Yes</td>
|
198 |
+
<td class="px-6 py-4 text-sm text-gray-500">Assertion consumer service URL</td>
|
199 |
+
</tr>
|
200 |
+
</tbody>
|
201 |
+
</table>
|
202 |
+
</div>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
<div class="mb-8">
|
206 |
+
<h4 class="font-medium mb-3">Example Implementation</h4>
|
207 |
+
<div class="mb-4">
|
208 |
+
<div class="flex justify-between items-center bg-gray-800 text-gray-200 px-4 py-2 rounded-t-md">
|
209 |
+
<span>JavaScript</span>
|
210 |
+
<button class="text-gray-400 hover:text-white">
|
211 |
+
<i class="far fa-copy"></i>
|
212 |
+
</button>
|
213 |
+
</div>
|
214 |
+
<pre class="code-block p-4 rounded-b-md overflow-x-auto"><code>const samlAuth = new SAMLAuthentication({
|
215 |
+
idpMetadataUrl: 'https://idp.example.com/metadata.xml',
|
216 |
+
spEntityId: 'urn:example:sp',
|
217 |
+
assertEndpoint: 'https://your-app.com/saml/acs',
|
218 |
+
nameIdFormat: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
|
219 |
+
authnContext: 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport'
|
220 |
+
});
|
221 |
+
|
222 |
+
// Initiate login
|
223 |
+
app.get('/login', (req, res) => {
|
224 |
+
samlAuth.login(req, res);
|
225 |
+
});
|
226 |
+
|
227 |
+
// Handle assertion
|
228 |
+
app.post('/saml/acs', (req, res) => {
|
229 |
+
samlAuth.handleAssertion(req, res)
|
230 |
+
.then(user => {
|
231 |
+
// User authenticated
|
232 |
+
req.session.user = user;
|
233 |
+
res.redirect('/dashboard');
|
234 |
+
})
|
235 |
+
.catch(err => {
|
236 |
+
// Handle error
|
237 |
+
res.status(401).send('Authentication failed');
|
238 |
+
});
|
239 |
+
});</code></pre>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
|
243 |
+
<div>
|
244 |
+
<h4 class="font-medium mb-3">Related Components</h4>
|
245 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
246 |
+
<div class="border border-gray-200 rounded-md p-4 hover:border-blue-200 hover:bg-blue-50 transition-colors">
|
247 |
+
<div class="flex items-center mb-2">
|
248 |
+
<div class="w-8 h-8 bg-blue-100 rounded-md flex items-center justify-center mr-2">
|
249 |
+
<i class="fas fa-user-shield text-blue-600"></i>
|
250 |
+
</div>
|
251 |
+
<h5 class="font-medium">Authorization</h5>
|
252 |
+
</div>
|
253 |
+
<p class="text-sm text-gray-600">Role-based access control for authenticated users</p>
|
254 |
+
</div>
|
255 |
+
<div class="border border-gray-200 rounded-md p-4 hover:border-blue-200 hover:bg-blue-50 transition-colors">
|
256 |
+
<div class="flex items-center mb-2">
|
257 |
+
<div class="w-8 h-8 bg-purple-100 rounded-md flex items-center justify-center mr-2">
|
258 |
+
<i class="fas fa-exchange-alt text-purple-600"></i>
|
259 |
+
</div>
|
260 |
+
<h5 class="font-medium">Token Exchange</h5>
|
261 |
+
</div>
|
262 |
+
<p class="text-sm text-gray-600">Exchange SAML assertions for OAuth tokens</p>
|
263 |
+
</div>
|
264 |
+
<div class="border border-gray-200 rounded-md p-4 hover:border-blue-200 hover:bg-blue-50 transition-colors">
|
265 |
+
<div class="flex items-center mb-2">
|
266 |
+
<div class="w-8 h-8 bg-green-100 rounded-md flex items-center justify-center mr-2">
|
267 |
+
<i class="fas fa-users text-green-600"></i>
|
268 |
+
</div>
|
269 |
+
<h5 class="font-medium">User Provisioning</h5>
|
270 |
+
</div>
|
271 |
+
<p class="text-sm text-gray-600">Sync user data from IdP to your application</p>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
</div>
|
275 |
+
</div>
|
276 |
+
|
277 |
+
<div class="bg-white rounded-lg shadow-sm p-6">
|
278 |
+
<div class="flex items-center justify-between mb-4">
|
279 |
+
<h3 class="text-lg font-semibold">Feedback</h3>
|
280 |
+
<div class="flex space-x-2">
|
281 |
+
<button class="px-3 py-1 bg-gray-100 rounded-md text-sm hover:bg-gray-200">
|
282 |
+
<i class="far fa-thumbs-up mr-1"></i> Helpful
|
283 |
+
</button>
|
284 |
+
<button class="px-3 py-1 bg-gray-100 rounded-md text-sm hover:bg-gray-200">
|
285 |
+
<i class="far fa-thumbs-down mr-1"></i> Needs improvement
|
286 |
+
</button>
|
287 |
+
</div>
|
288 |
+
</div>
|
289 |
+
<textarea class="w-full border border-gray-300 rounded-md p-3 focus:outline-none focus:ring-2 focus:ring-blue-500" rows="3" placeholder="Have feedback about this component? Let us know..."></textarea>
|
290 |
+
<div class="flex justify-end mt-3">
|
291 |
+
<button class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
|
292 |
+
Submit Feedback
|
293 |
+
</button>
|
294 |
+
</div>
|
295 |
+
</div>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
</div>
|
300 |
+
|
301 |
+
<script>
|
302 |
+
// Tab switching functionality
|
303 |
+
const tabs = document.querySelectorAll('nav button');
|
304 |
+
tabs.forEach(tab => {
|
305 |
+
tab.addEventListener('click', () => {
|
306 |
+
tabs.forEach(t => t.classList.remove('tab-active', 'text-blue-600'));
|
307 |
+
tabs.forEach(t => t.classList.add('text-gray-500', 'hover:text-gray-700'));
|
308 |
+
|
309 |
+
tab.classList.add('tab-active', 'text-blue-600');
|
310 |
+
tab.classList.remove('text-gray-500', 'hover:text-gray-700');
|
311 |
+
});
|
312 |
+
});
|
313 |
+
|
314 |
+
// Copy code functionality
|
315 |
+
const copyButtons = document.querySelectorAll('.fa-copy');
|
316 |
+
copyButtons.forEach(button => {
|
317 |
+
button.addEventListener('click', () => {
|
318 |
+
const codeBlock = button.closest('.code-block');
|
319 |
+
const code = codeBlock.querySelector('code').textContent;
|
320 |
+
|
321 |
+
navigator.clipboard.writeText(code).then(() => {
|
322 |
+
const originalIcon = button.className;
|
323 |
+
button.className = 'fas fa-check text-green-400';
|
324 |
+
|
325 |
+
setTimeout(() => {
|
326 |
+
button.className = originalIcon;
|
327 |
+
}, 2000);
|
328 |
+
});
|
329 |
+
});
|
330 |
+
});
|
331 |
+
</script>
|
332 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=sudzdpn/wireframe" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
333 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Build the docgen wireframe for saml -Here's a concise DeepSite prompt to implement your design system sync: ```markdown # DeepSite Design System Sync Prompt **Objective:** Create real-time Figma → Netlify design system sync for SAML.co.za **Figma File:** [Iza5b2JrBtSPhxGRCJACBB](https://www.figma.com/file/Iza5b2JrBtSPhxGRCJACBB) **Live Preview:** [saml-wireframe.netlify.app](https://saml-wireframe.netlify.app) ## Requirements 1. Auto-sync Figma components → React/Tailwind 2. Password-protected design system viewer 3. GitHub Actions CI/CD pipeline 4. Netlify hosting with atomic deploys ## Code Snippets Needed ### 1. Figma Webhook Handler ```javascript // api/figma-webhook.js export default async (req) => { const { event, file_key } = await req.json(); if(event === 'FILE_UPDATE') { await buildDesignSystem(file_key); return new Response('Design system updated', { status: 200 }); } }; ``` ### 2. Design System Viewer Component ```jsx // components/DesignSystemViewer.jsx const DSViewer = ({ components }) => ( <div className="grid gap-8 p-8"> {Object.entries(components).map(([name, Component]) => ( <div key={name} className="border p-4"> <h3 className="text-lg font-mono">{name}</h3> <Component /> </div> ))} </div> ); ``` ### 3. Netlify Configuration ```toml # netlify.toml [build.environment] FIGMA_FILE = "Iza5b2JrBtSPhxGRCJACBB" PASSWORD = "SAML2024!" [[redirects]] from = "/*" to = "/design-system" status = 200 ``` ## Environment Variables ```env FIGMA_TOKEN=figd_abc123 NETLIFY_SITE_ID=xyz789 GITHUB_SECRET=supersecret ``` ## CLI Command ```bash deepsite build --template design-system-sync \ --figma $FIGMA_TOKEN \ --netlify $NETLIFY_SITE_ID \ --password $DS_PASSWORD ``` ## Success Criteria - [ ] Figma changes deploy <2min - [ ] Components match 1:1 with Figma - [ ] Viewer updates without refresh - [ ] 256-bit encryption for password **Timeframe:** Implement in <4 hours **Budget:** Allocate $42 in AI credits ``` This prompt gives DeepSite clear instructions to: 1. Set up Figma webhooks 2. Generate React components from Figma 3. Configure password protection 4. Establish CI/CD pipeline 5. Deploy to Netlify with atomic updates Would you like me to add any specific component requirements or adjust the security parameters?
|