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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Documentação | PixelPulse</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            darkMode: 'class',
            theme: {
                extend: {
                    colors: {
                        primary: '#6366f1',
                        secondary: '#f59e0b'
                    }
                }
            }
        }
    </script>
    <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.waves.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <style>
        .gradient-text {
            background: linear-gradient(90deg, #6366f1, #f59e0b);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        #vanta-bg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }
        .doc-section {
            scroll-margin-top: 120px;
        }
        pre {
            background-color: #f8fafc;
            border-radius: 0.5rem;
            padding: 1rem;
            overflow-x: auto;
        }
        .dark pre {
            background-color: #1e293b;
        }
    </style>
</head>
<body class="bg-gray-50 dark:bg-gray-900 transition-colors duration-300">
    <div id="vanta-bg"></div>
    
    <header class="fixed w-full z-50">
        <nav class="bg-white/80 dark:bg-gray-800/80 backdrop-blur-md shadow-sm">
            <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
                <div class="flex justify-between h-16 items-center">
                    <div class="flex items-center">
                        <span class="text-xl font-bold gradient-text">PixelPulse</span>
                    </div>
                    <div class="flex items-center space-x-4">
                        <a href="index.html" class="text-gray-700 dark:text-gray-200 hover:text-primary dark:hover:text-secondary px-3 py-2 text-sm font-medium">Home</a>
                        <a href="automation.html" class="text-gray-700 dark:text-gray-200 hover:text-primary dark:hover:text-secondary px-3 py-2 text-sm font-medium">Automação</a>
                        <a href="documentation.html" class="text-primary dark:text-secondary px-3 py-2 text-sm font-medium">Documentação</a>
                        <button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700">
                            <i data-feather="moon" class="hidden dark:block text-yellow-300"></i>
                            <i data-feather="sun" class="block dark:hidden text-gray-700"></i>
                        </button>
                    </div>
                </div>
            </div>
        </nav>
    </header>

    <main class="pt-24 pb-12 px-4 sm:px-6 lg:px-8">
        <div class="max-w-7xl mx-auto flex flex-col md:flex-row gap-8">
            <aside class="md:w-1/4 lg:w-1/5">
                <div class="sticky top-28">
                    <h2 class="text-xl font-bold mb-4 gradient-text">Índice</h2>
                    <nav class="space-y-2">
                        <a href="#getting-started" class="block px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Introdução</a>
                        <a href="#api-reference" class="block px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Referência API</a>
                        <a href="#examples" class="block px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Exemplos</a>
                        <a href="#troubleshooting" class="block px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">Solução de Problemas</a>
                        <a href="#faq" class="block px-3 py-2 rounded hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300">FAQ</a>
                    </nav>
                </div>
            </aside>

            <div class="md:w-3/4 lg:w-4/5">
                <section id="getting-started" class="doc-section mb-16">
                    <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8">
                        <h2 class="text-3xl font-bold mb-6 gradient-text">Introdução</h2>
                        <p class="text-gray-600 dark:text-gray-300 mb-6">
                            Bem-vindo à documentação da plataforma de automação PixelPulse. Este guia irá ajudá-lo a configurar e utilizar todos os recursos disponíveis.
                        </p>
                        
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 dark:text-white">Pré-requisitos</h3>
                        <ul class="list-disc pl-5 mb-6 text-gray-600 dark:text-gray-300 space-y-2">
                            <li>Acesso à internet</li>
                            <li>Conta ativa no PixelPulse</li>
                            <li>Conhecimento básico de APIs (para integrações avançadas)</li>
                        </ul>

                        <h3 class="text-xl font-semibold mb-4 text-gray-800 dark:text-white">Primeiros Passos</h3>
                        <div class="space-y-6">
                            <div class="flex items-start space-x-4">
                                <div class="flex-shrink-0 bg-primary/10 dark:bg-primary/20 rounded-full w-10 h-10 flex items-center justify-center">
                                    <i data-feather="user" class="text-primary dark:text-secondary"></i>
                                </div>
                                <div>
                                    <h4 class="font-semibold text-lg">1. Crie sua Conta</h4>
                                    <p class="text-gray-600 dark:text-gray-300">Registre-se em nossa plataforma para obter suas credenciais de acesso.</p>
                                </div>
                            </div>
                            <div class="flex items-start space-x-4">
                                <div class="flex-shrink-0 bg-primary/10 dark:bg-primary/20 rounded-full w-10 h-10 flex items-center justify-center">
                                    <i data-feather="key" class="text-primary dark:text-secondary"></i>
                                </div>
                                <div>
                                    <h4 class="font-semibold text-lg">2. Obtenha sua API Key</h4>
                                    <p class="text-gray-600 dark:text-gray-300">Na área de configurações, gere sua chave de API para começar as integrações.</p>
                                </div>
                            </div>
                            <div class="flex items-start space-x-4">
                                <div class="flex-shrink-0 bg-primary/10 dark:bg-primary/20 rounded-full w-10 h-10 flex items-center justify-center">
                                    <i data-feather="terminal" class="text-primary dark:text-secondary"></i>
                                </div>
                                <div>
                                    <h4 class="font-semibold text-lg">3. Configure seu Primeiro Fluxo</h4>
                                    <p class="text-gray-600 dark:text-gray-300">Utilize nossa interface ou API para criar seu primeiro processo automatizado.</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="api-reference" class="doc-section mb-16">
                    <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8">
                        <h2 class="text-3xl font-bold mb-6 gradient-text">Referência API</h2>
                        <p class="text-gray-600 dark:text-gray-300 mb-6">
                            Nossa API RESTful permite que você integre a plataforma PixelPulse com seus sistemas existentes.
                        </p>

                        <h3 class="text-xl font-semibold mb-4 text-gray-800 dark:text-white">Autenticação</h3>
                        <div class="mb-8">
                            <p class="text-gray-600 dark:text-gray-300 mb-4">Todas as requisições devem incluir seu API Key no header:</p>
                            <pre class="mb-4"><code>Authorization: Bearer YOUR_API_KEY</code></pre>
                        </div>

                        <h3 class="text-xl font-semibold mb-4 text-gray-800 dark:text-white">Endpoints Principais</h3>
                        <div class="space-y-8">
                            <div>
                                <h4 class="font-semibold text-lg mb-2">GET /api/v1/flows</h4>
                                <p class="text-gray-600 dark:text-gray-300 mb-3">Lista todos os fluxos de automação disponíveis.</p>
                                <p class="text-sm text-gray-500 dark:text-gray-400 mb-2">Exemplo de resposta:</p>
                                <pre><code>{
    "data": [
        {
            "id": "flow_123",
            "name": "Importação de Dados",
            "status": "active",
            "last_run": "2023-07-15T10:32:45Z"
        }
    ]
}</code></pre>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-2">POST /api/v1/flows/{id}/execute</h4>
                                <p class="text-gray-600 dark:text-gray-300 mb-3">Executa um fluxo específico.</p>
                                <p class="text-sm text-gray-500 dark:text-gray-400 mb-2">Exemplo de requisição:</p>
                                <pre><code>{
    "parameters": {
        "source": "csv_import",
        "file_url": "https://example.com/data.csv"
    }
}</code></pre>
                            </div>
                            <div>
                                <h4 class="font-semibold text-lg mb-2">GET /api/v1/logs</h4>
                                <p class="text-gray-600 dark:text-gray-300 mb-3">Recupera os logs de execução.</p>
                                <p class="text-sm text-gray-500 dark:text-gray-400 mb-2">Parâmetros opcionais:</p>
                                <pre><code>{
    "flow_id": "flow_123",
    "status": "success",
    "limit": 50
}</code></pre>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="examples" class="doc-section mb-16">
                    <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8">
                        <h2 class="text-3xl font-bold mb-6 gradient-text">Exemplos</h2>
                        
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 dark:text-white">Node.js</h3>
                        <div class="mb-8">
                            <pre><code class="language-javascript">const axios = require('axios');

const api = axios.create({
    baseURL: 'https://api.pixelpulse.com/v1',
    headers: {
        'Authorization': `Bearer ${process.env.API_KEY}`
    }
});

async function runFlow(flowId, params) {
    try {
        const response = await api.post(`/flows/${flowId}/execute`, params);
        console.log('Execução iniciada:', response.data);
    } catch (error) {
        console.error('Erro:', error.response.data);
    }
}

runFlow('flow_123', {
    source: 'google_sheets',
    sheet_id: '1xqH3YwW6zYD...'
});</code></pre>
                        </div>

                        <h3 class="text-xl font-semibold mb-4 text-gray-800 dark:text-white">Python</h3>
                        <div class="mb-8">
                            <pre><code class="language-python">import requests

api_url = "https://api.pixelpulse.com/v1"
headers = {"Authorization": f"Bearer {API_KEY}"}

def get_flows():
    response = requests.get(f"{api_url}/flows", headers=headers)
    return response.json()

flows = get_flows()
print("Fluxos disponíveis:", flows)</code></pre>
                        </div>

                        <h3 class="text-xl font-semibold mb-4 text-gray-800 dark:text-white">cURL</h3>
                        <div>
                            <pre><code class="language-bash">curl -X POST \
  https://api.pixelpulse.com/v1/flows/flow_123/execute \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "parameters": {
        "source": "shopify",
        "start_date": "2023-07-01"
    }
}'</code></pre>
                        </div>
                    </div>
                </section>

                <section id="troubleshooting" class="doc-section mb-16">
                    <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8">
                        <h2 class="text-3xl font-bold mb-6 gradient-text">Solução de Problemas</h2>
                        
                        <div class="space-y-6">
                            <div>
                                <h3 class="text-xl font-semibold mb-2 text-gray-800 dark:text-white">Erro 401 - Não autorizado</h3>
                                <p class="text-gray-600 dark:text-gray-300">Verifique se sua API Key está correta e incluída no header de autorização.</p>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2 text-gray-800 dark:text-white">Erro 429 - Muitas requisições</h3>
                                <p class="text-gray-600 dark:text-gray-300">Você excedeu o limite de requisições por minuto. Aguarde alguns instantes antes de tentar novamente.</p>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2 text-gray-800 dark:text-white">Processos travados</h3>
                                <p class="text-gray-600 dark:text-gray-300">Verifique o status do serviço em nosso status page. Se o problema persistir, reinicie o fluxo.</p>
                            </div>
                        </div>
                    </div>
                </section>

                <section id="faq" class="doc-section">
                    <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8">
                        <h2 class="text-3xl font-bold mb-6 gradient-text">Perguntas Frequentes</h2>
                        
                        <div class="space-y-6">
                            <div>
                                <h3 class="text-xl font-semibold mb-2 text-gray-800 dark:text-white">Posso agendar execuções automáticas?</h3>
                                <p class="text-gray-600 dark:text-gray-300">Sim, nossa plataforma permite agendamento recorrente ou baseado em eventos para todos os fluxos.</p>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2 text-gray-800 dark:text-white">Quais formatos de arquivo são suportados?</h3>
                                <p class="text-gray-600 dark:text-gray-300">CSV, JSON, XML, Excel e Google Sheets são totalmente suportados para importação/exportação.</p>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2 text-gray-800 dark:text-white">Como monitoro o consumo da minha conta?</h3>
                                <p class="text-gray-600 dark:text-gray-300">Na área de configurações você encontra um painel detalhado com seu consumo e limites.</p>
                            </div>
                            <div>
                                <h3 class="text-xl font-semibold mb-2 text-gray-800 dark:text-white">Posso integrar com webhooks?</h3>
                                <p class="text-gray-600 dark:text-gray-300">Sim, temos suporte completo para webhooks tanto para entrada quanto para saída de dados.</p>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </main>

    <footer class="bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 py-8">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <span class="text-xl font-bold gradient-text">PixelPulse</span>
                    <p class="text-gray-600 dark:text-gray-300 mt-2">© 2023 Digital Paradox. All rights reserved.</p>
                </div>
                <div class="flex space-x-6">
                    <a href="https://twitter.com" class="text-gray-500 hover:text-primary dark:hover:text-secondary">
                        <i data-feather="twitter"></i>
                    </a>
                    <a href="https://github.com" class="text-gray-500 hover:text-primary dark:hover:text-secondary">
                        <i data-feather="github"></i>
                    </a>
                    <a href="https://linkedin.com" class="text-gray-500 hover:text-primary dark:hover:text-secondary">
                        <i data-feather="linkedin"></i>
                    </a>
                    <a href="https://instagram.com" class="text-gray-500 hover:text-primary dark:hover:text-secondary">
                        <i data-feather="instagram"></i>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // Initialize Vanta.js background
        VANTA.WAVES({
            el: "#vanta-bg",
            mouseControls: true,
            touchControls: true,
            gyroControls: false,
            minHeight: 200.00,
            minWidth: 200.00,
            scale: 1.00,
            scaleMobile: 1.00,
            color: 0x6366f1,
            shininess: 50.00,
            waveHeight: 15.00,
            waveSpeed: 0.80,
            zoom: 0.75
        });

        // Theme toggle functionality
        const themeToggle = document.getElementById('theme-toggle');
        const html = document.documentElement;

        // Check for saved theme preference or use preferred color scheme
        if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
            html.classList.add('dark');
            VANTA.WAVES({
                el: "#vanta-bg",
                color: 0xf59e0b,
                backgroundColor: 0x111827,
                shininess: 50.00,
                waveHeight: 15.00,
                waveSpeed: 0.80,
                zoom: 0.75
            });
        } else {
            html.classList.remove('dark');
        }

        // Toggle theme on button click
        themeToggle.addEventListener('click', () => {
            html.classList.toggle('dark');
            localStorage.setItem('theme', html.classList.contains('dark') ? 'dark' : 'light');
            
            if (html.classList.contains('dark')) {
                VANTA.WAVES({
                    el: "#vanta-bg",
                    color: 0xf59e0b,
                    backgroundColor: 0x111827,
                    shininess: 50.00,
                    waveHeight: 15.00,
                    waveSpeed: 0.80,
                    zoom: 0.75
                });
            } else {
                VANTA.WAVES({
                    el: "#vanta-bg",
                    color: 0x6366f1,
                    backgroundColor: 0xf8fafc,
                    shininess: 50.00,
                    waveHeight: 15.00,
                    waveSpeed: 0.80,
                    zoom: 0.75
                });
            }
        });

        // Smooth scrolling for documentation links
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });

        // Initialize feather icons
        feather.replace();
    </script>
</body>
</html>