<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ivanrochacardoso on Medium]]></title>
        <description><![CDATA[Stories by Ivanrochacardoso on Medium]]></description>
        <link>https://medium.com/@ivanrochacardoso?source=rss-26a598881fc0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xSW_8MQnmzwSMhd7UOHL7w.png</url>
            <title>Stories by Ivanrochacardoso on Medium</title>
            <link>https://medium.com/@ivanrochacardoso?source=rss-26a598881fc0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 05:50:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ivanrochacardoso/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building Progressive Web Apps with Quasar Framework: A Complete Guide to Offline-First Development]]></title>
            <link>https://medium.com/@ivanrochacardoso/building-progressive-web-apps-with-quasar-framework-a-complete-guide-to-offline-first-development-92f8d7f75572?source=rss-26a598881fc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/92f8d7f75572</guid>
            <category><![CDATA[quasarframework]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ivanrochacardoso]]></dc:creator>
            <pubDate>Wed, 10 Sep 2025 14:39:53 GMT</pubDate>
            <atom:updated>2025-09-10T14:39:53.693Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s mobile-first world, users expect applications to work seamlessly regardless of network conditions. Progressive Web Apps (PWAs) bridge the gap between web and native applications, offering app-like experiences with the reach of the web.<br> The Challenge<br>How can we create web applications that:</p><p>Work offline without losing functionality<br>Can be installed like native apps<br>Provide fast, responsive user experiences<br>Cache resources intelligently</p><p>The Solution: Quasar Framework + PWA<br>I’ve created a demonstration project that showcases these capabilities using Quasar Framework (Vue.js) in PWA mode. The application consumes the REST Countries API to display country information including names, populations, regions, and flags.</p><p>Network-Independent Functionality</p><p>Full application functionality without internet connection<br>Previously loaded data remains accessible<br>Smooth user experience regardless of connectivity</p><p>Technical Stack</p><p>Vue.js 3 + Quasar Framework for the frontend<br>Axios for API consumption<br>Workbox for service worker and offline caching<br>REST Countries API as the data source</p><p>Why This Matters for Business<br>User Experience Benefits:</p><p>Increased Engagement: Users can access content even offline<br>Better Performance: Cached resources load instantly<br>Mobile-First: Installable apps increase user retention<br>Reliability: No more “No Internet” error pages</p><p>Development Benefits:</p><p>Framework Flexibility: Quasar provides unified codebase for web, mobile, and desktop<br>Proven Technologies: Built on Vue.js ecosystem<br>Production Ready: Easy deployment and maintenance</p><p>Try It Yourself<br>The complete source code is available on GitHub, including:</p><p>Full implementation details<br>Setup and deployment instructions<br>Testing strategies for offline functionality</p><p>Repository: <a href="https://github.com/ivanrochacardoso/quasar-pwa-countries">https://github.com/ivanrochacardoso/quasar-pwa-countries</a><br>Live Demo: <a href="https://siglobal.com.br/paises/">https://siglobal.com.br/paises/</a></p><p>Key Takeaway<br>PWAs represent the future of web development, combining the best aspects of web and native applications. With frameworks like Quasar, implementing offline-first functionality has never been more accessible.<br>The investment in PWA technology pays dividends in user satisfaction, engagement metrics, and overall application reliability. As network conditions continue to vary globally, offline-capable applications become not just nice-to-have features, but essential requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AM3tmQ0chEOojU9KdbIy2Q.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92f8d7f75572" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Como a IA Pode Acelerar Sua Produtividade em Qualquer Aplicação]]></title>
            <link>https://medium.com/@ivanrochacardoso/como-a-ia-pode-acelerar-sua-produtividade-em-qualquer-aplica%C3%A7%C3%A3o-eb64641de63e?source=rss-26a598881fc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb64641de63e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Ivanrochacardoso]]></dc:creator>
            <pubDate>Mon, 11 Aug 2025 20:12:07 GMT</pubDate>
            <atom:updated>2025-08-11T20:12:07.752Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine poder ter um assistente de IA disponível **em qualquer lugar** do seu computador — seja no WhatsApp, Gmail, Word, Slack, ou qualquer outra aplicação. Não como uma extensão específica, mas como uma ferramenta universal que funciona **em todo o sistema**.</p><p>Foi exatamente isso que criei: o **Kai (Tecla AI)** — uma solução que democratiza o acesso à inteligência artificial no dia a dia de trabalho.</p><p>## 💡 Como Surgiu a Ideia</p><p>Como desenvolvedor e profissional que trabalha intensivamente com texto, sempre me incomodei com a fragmentação das ferramentas de IA. ChatGPT em uma aba, Claude em outra, copiar e colar constantemente… Não muito produtivo.</p><p>A pergunta era simples: **”E se eu pudesse acessar a IA diretamente onde estou escrevendo?”**</p><p>## A Solução: Simplicidade Extrema</p><p>O Kai funciona de forma incrivelmente simples:</p><p>1. **Você está escrevendo** em qualquer aplicação<br>2. **Digite**: `:pergunta sua dúvida aqui/` <br>3. **Instantaneamente** o texto é inserido com a resposta da IA</p><p>**Exemplos reais de uso:**</p><p>**No email corporativo:**<br>```<br>:pergunta escreva um email profissional agradecendo o cliente pelo feedback/<br>```</p><p>**No WhatsApp:**<br>```<br>:pergunta como explicar machine learning para uma criança/<br>```</p><p>**No Excel:**<br>```<br>:pergunta fórmula para calcular crescimento percentual entre duas células/<br>```</p><p>**No Word:**<br>```<br>:pergunta melhore este parágrafo mantendo o tom profissional/<br>```</p><p>## Por Que Isso Importa?</p><p>### **Elimina Friction**<br>Sem trocas de abas, sem copy-paste, sem quebrar o fluxo de trabalho. A IA está **onde você precisa**, **quando você precisa**.</p><p>### **Universal**<br>Funciona em **qualquer aplicação** — não importa se é browser, desktop, mobile emulator, terminal. Se você consegue digitar, consegue usar IA.</p><p>### **Produtividade Real**<br>Transformei tarefas de minutos em segundos. Respostas de email, correções de texto, explicações técnicas, traduções — tudo instantâneo.</p><p>## A Tecnologia Por Trás (Sem Complicação)</p><p>Construído em **Rust** — uma linguagem moderna e segura — o Kai é:</p><p>- **Leve**: Usa pouquíssimos recursos do sistema<br>- **Rápido**: Respostas em segundos<br>- **Seguro**: Roda localmente, só envia suas perguntas para a IA<br>- **Multiplataforma**: Windows, Mac, Linux</p><p>Usei a API do OpenRouter, que oferece acesso a múltiplos modelos de IA (GPT, Claude, Llama, etc.) com preços acessíveis. Porém pode ser facilmente adaptada para outras APIs de outras plataformas.</p><p>## Impacto no Orçamento com API</p><p>Diferente de assinaturas mensais caras, você paga apenas pelo que usa:<br>- **Consulta simples**: ~R$ 0,01<br>- **Texto longo**: ~R$ 0,05<br>- **Uso médio mensal**: R$ 10–70</p><p>Muito mais econômico que múltiplas assinaturas de IA.</p><p>## Casos de sugestão de uso</p><p>**Para Professores:**<br>- Preparação de questões para provas e atividades<br>- Feedback construtivo para pais sobre desempenho dos alunos<br>- Adaptação de conteúdo para diferentes níveis de aprendizado<br>- Ideias criativas para explicar conceitos complexos<br>- Comunicados para pais sobre eventos e projetos</p><p>**Para Coordenadores Pedagógicos:**<br>- Planos de formação continuada para professores<br>- Projetos interdisciplinares e cronogramas de atividades<br>- Estratégias para melhorar engajamento dos alunos<br>- Adaptações curriculares para necessidades especiais<br>- Orientações para professores com dificuldades</p><p>**Para Gerentes:**<br>- Rascunhos de atas de reunião<br>- Emails de feedback para equipe<br>- Resumos de documentos longos</p><p>**Para Vendedores:**<br>- Propostas personalizadas instantâneas<br>- Respostas para objeções comuns<br>- Follow-ups automatizados</p><p>**Para Criadores de Conteúdo:**<br>- Ideias para posts<br>- Correção de textos<br>- Adaptação de tom e linguagem</p><p>**Para Estudantes/Pesquisadores:**<br>- Explicações de conceitos complexos<br>- Resumos de artigos<br>- Ajuda com redação</p><p>## O Futuro é Assistido por IA</p><p>Acredito que estamos no início de uma revolução onde a IA não será um “produto separado”, mas uma **camada invisível** que melhora tudo que fazemos.</p><p>O Kai é minha contribuição para esse futuro — onde ter um assistente inteligente seja tão natural quanto usar corretor ortográfico.</p><p>## Disponível Gratuitamente</p><p>Como acredito no poder da comunidade open-source, disponibilizei o Kai no GitHub para que qualquer pessoa possa usar, modificar e contribuir.</p><p>** GitHub**: <a href="https://github.com/ivanrochacardoso/kai">https://github.com/ivanrochacardoso/kai</a></p><p>É meu presente para a comunidade tech brasileira. Use, modifique, melhore!</p><p>## Reflexão Final</p><p>Vivemos na era da IA, mas ainda estamos presos em interfaces de décadas passadas. Ferramentas como o Kai são apenas o começo de como podemos **integrar inteligência artificial de forma natural** no nosso fluxo de trabalho.</p><p>A pergunta não é “se” a IA vai transformar como trabalhamos, mas **”como”** e **”quando”**.</p><p>Com o Kai, esse “quando” é **agora**.</p><p>— -</p><p>**E você, como imagina a IA integrada ao seu dia a dia? Que tarefas repetitivas gostaria de automatizar?**</p><p>*Compartilhe suas ideias nos comentários! 👇*</p><p>#InteligenciaArtificial #Produtividade #OpenSource #Inovacao #TecnologiaBrasil #Rust #Automacao</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb64641de63e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IP Map Dashboard — Monitor and Block Server Connections in Real Time]]></title>
            <link>https://medium.com/@ivanrochacardoso/ip-map-dashboard-monitor-and-block-server-connections-in-real-time-731cdf803f04?source=rss-26a598881fc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/731cdf803f04</guid>
            <category><![CDATA[geoip]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[sqlite]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[leaflet]]></category>
            <dc:creator><![CDATA[Ivanrochacardoso]]></dc:creator>
            <pubDate>Sat, 26 Jul 2025 11:43:40 GMT</pubDate>
            <atom:updated>2025-07-26T11:43:40.722Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>IP Map Dashboard — Monitor and Block Server Connections in Real Time</strong></h3><p>If you manage a server, you’ve probably asked yourself:</p><p><strong>**“Who’s connected to my server right now?”**</strong></p><p>I built a lightweight and effective tool that answers that question — and gives you full control.</p><p><strong>## What it does</strong></p><p>This project provides a real-time <strong>**dashboard**</strong> that allows you to:</p><p>* List all <strong>**active connections**</strong> (IP, port, protocol)</p><p>* Fetch the <strong>**geolocation**</strong> of each IP</p><p>* Show everything on an <strong>**interactive map**</strong> using [Leaflet](https://leafletjs.com/)</p><p>* <strong>**Block or unblock**</strong> IPs instantly via `iptables`</p><p>* Keep geolocation results <strong>**cached locally**</strong> with SQLite</p><p>Everything runs securely and smoothly, without exposing your backend to the public.</p><p><strong>## Architecture Overview</strong></p><p><strong>**Backend (Node.js + Express):**</strong></p><p>* Runs locally on `127.0.0.1:3033`</p><p>* Uses `netstat` or `ss` to scan active connections</p><p>* Fetches IP info via `ip-api.com`</p><p>* Saves results to a local SQLite cache (`ip_cache.sqlite`)</p><p>* Executes IP block/unblock using `iptables`</p><p><strong>**Frontend (PHP + JS):**</strong></p><p>* Serves the UI (`index.php` and `mapa.php`)</p><p>* Works as a <strong>**secure proxy**</strong> using `cURL` to avoid CORS and protect backend</p><p>* Displays IPs and markers on the map using Leaflet</p><p><strong>## ️ Requirements</strong></p><p>* Node.js 16+</p><p>* PHP with `curl` extension</p><p>* SQLite</p><p>* Tools: `netstat` or `ss`, `iptables`</p><p>* Web server (Apache, Nginx, etc.)</p><p><strong>## How to Run</strong></p><p>1. <strong>**Install dependencies:**</strong></p><p>```bash</p><p>npm install</p><p>```</p><p>2. <strong>**Start the backend:**</strong></p><p>```bash</p><p>node index.js</p><p>```</p><p>It will run on `http://127.0.0.1:3033`.</p><p>3. <strong>**Set up your web server:**</strong></p><p>Point the document root to the `public/` directory.</p><p>4. <strong>**Access the dashboard:**</strong></p><p>```</p><p><a href="http://localhost/">http://localhost/</a></p><p>```</p><p><strong>## Interface Preview</strong></p><p>You’ll see:</p><p>* A list of active IP connections</p><p>* A map with real-time markers</p><p>* Flags and location info (city, country)</p><p>* Action buttons to block/unblock each IP</p><p><strong>## 🔐 Secure by Design</strong></p><p>The Node.js service is <strong>**never exposed to the internet**</strong>. PHP acts as a secure proxy, forwarding all communication through `localhost`. That means no CORS issues and no direct access to your service.</p><p>— -</p><p>If you’re managing Linux servers and want a simple way to gain network visibility and control in real time — without installing complex monitoring tools — this project might be just what you need.</p><p>🔗 GitHub repo: <a href="https://github.com/ivanrochacardoso/ip-map-dashboard">https://github.com/ivanrochacardoso/ip-map-dashboard</a></p><p>Open to feedback and contributions!</p><p>#opensource #networksecurity #dashboard #nodejs #leaflet #sysadmin #vps #firewall #linux</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=731cdf803f04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generate PDF & Excel Files Directly in Browser with Quasar — No Backend Needed!]]></title>
            <link>https://medium.com/@ivanrochacardoso/generate-pdf-excel-files-directly-in-browser-with-quasar-no-backend-needed-b1708a7458a7?source=rss-26a598881fc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1708a7458a7</guid>
            <category><![CDATA[quasarframework]]></category>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Ivanrochacardoso]]></dc:creator>
            <pubDate>Fri, 27 Jun 2025 17:57:50 GMT</pubDate>
            <atom:updated>2025-06-27T17:57:50.754Z</atom:updated>
            <content:encoded><![CDATA[<h3>Generate PDF &amp; Excel Files Directly in Browser with Quasar — No Backend Needed!</h3><p>*By Ivan Rocha Cardoso — Full-Stack Developer at SiGlobal*</p><p>Have you ever needed to generate a PDF report or Excel spreadsheet directly from your app without depending on a backend? Today I’ll show you how to do this using only Vue.js + Quasar.</p><p>Works 100% in the browser, exports tables, reports, and dashboards in a simple and professional way.</p><p>— -</p><p>## Introduction: Why generate PDF/Excel on the frontend?</p><p>### Common use cases:<br>- **Sales reports** that need to be printed or emailed<br>- **Dashboards** with data that users want to save locally<br>- **Data tables** that need to be exported for analysis<br>- **Offline applications** that can’t depend on server to generate files<br>- **Cost reduction** of infrastructure (no need for server-side libraries)</p><p>### Frontend approach advantages:<br>✅ **Performance**: Distributed processing on users’ devices <br>✅ **Simplicity**: No additional APIs to maintain <br>✅ **Offline**: Works even without internet connection <br>✅ **Cost**: Reduces server load</p><p>— -</p><p>## ⚙️ Setup: Starting the project</p><p>### 1. Creating the Quasar project</p><p>```bash<br># Install Quasar CLI (if you don’t have it yet)<br>npm install -g <a href="http://twitter.com/quasar/cli">@quasar/cli</a></p><p># Create new project<br>quasar create pdf-excel-project</p><p># or<br>npm init quasar@latest</p><p># Navigate to directory<br>cd pdf-excel-project<br>```</p><p>### 2. Installing required dependencies</p><p>```bash<br># For PDF generation<br>npm install pdfmake</p><p># For Excel generation<br>npm install xlsx</p><p># Auxiliary dependencies for types (optional)<br>npm install — save-dev <a href="http://twitter.com/types/pdfmake">@types/pdfmake</a><br>```</p><p>### 3. Project structure</p><p>```<br>src/<br>├── components/<br>│ ├── ExportPDF.vue<br>│ └── ExportExcel.vue<br>├── pages/<br>│ └── ExportDemo.vue<br>└── utils/<br> ├── pdfGenerator.js<br> └── excelGenerator.js<br>```</p><p>— -</p><p>## Practical Example 1: Export QTable to Excel</p><p>### ExportExcel.vue Component</p><p>```vue<br>&lt;template&gt;<br> &lt;div class=”q-pa-md”&gt;<br> &lt;q-table<br> title=”Monthly Sales”<br> :rows=”salesData”<br> :columns=”columns”<br> row-key=”id”<br> class=”q-mb-md”<br> /&gt;<br> <br> &lt;q-btn <br> color=”green” <br> icon=”download” <br> label=”Export Excel”<br> <a href="http://twitter.com/click">@click</a>=”exportToExcel”<br> /&gt;<br> &lt;/div&gt;<br>&lt;/template&gt;</p><p>&lt;script&gt;<br>import * as XLSX from ‘xlsx’</p><p>export default {<br> name: ‘ExportExcel’,<br> data() {<br> return {<br> columns: [<br> { name: ‘id’, label: ‘ID’, field: ‘id’, align: ‘left’ },<br> { name: ‘product’, label: ‘Product’, field: ‘product’, align: ‘left’ },<br> { name: ‘salesperson’, label: ‘Salesperson’, field: ‘salesperson’, align: ‘left’ },<br> { name: ‘amount’, label: ‘Amount’, field: ‘amount’, format: val =&gt; `$${val}` },<br> { name: ‘date’, label: ‘Date’, field: ‘date’ }<br> ],<br> salesData: [<br> { id: 1, product: ‘Dell Laptop’, salesperson: ‘John Smith’, amount: 2500.00, date: ‘2024–01–15’ },<br> { id: 2, product: ‘Logitech Mouse’, salesperson: ‘Mary Johnson’, amount: 85.50, date: ‘2024–01–16’ },<br> { id: 3, product: ‘Mechanical Keyboard’, salesperson: ‘Peter Wilson’, amount: 350.00, date: ‘2024–01–17’ },<br> { id: 4, product: ‘24&quot; Monitor’, salesperson: ‘Anna Davis’, amount: 800.00, date: ‘2024–01–18’ }<br> ]<br> }<br> },<br> methods: {<br> exportToExcel() {<br> // Prepare data for Excel<br> const worksheetData = [<br> // Header<br> [‘ID’, ‘Product’, ‘Salesperson’, ‘Amount’, ‘Date’],<br> // Data<br> …this.salesData.map(row =&gt; [<br> row.id,<br> row.product,<br> row.salesperson,<br> row.amount,<br> row.date<br> ])<br> ]</p><p>// Create worksheet<br> const worksheet = XLSX.utils.aoa_to_sheet(worksheetData)<br> <br> // Create workbook<br> const workbook = XLSX.utils.book_new()<br> XLSX.utils.book_append_sheet(workbook, worksheet, ‘Sales’)</p><p>// Export file<br> XLSX.writeFile(workbook, `sales_${new Date().toISOString().split(‘T’)[0]}.xlsx`)<br> <br> this.$q.notify({<br> color: ‘green-4’,<br> textColor: ‘white’,<br> icon: ‘cloud_download’,<br> message: ‘Excel exported successfully!’<br> })<br> }<br> }<br>}<br>&lt;/script&gt;<br>```</p><p>— -</p><p>## 📄 Practical Example 2: Generate PDF with Logo and Formatting</p><p>### ExportPDF.vue Component</p><p>```vue<br>&lt;template&gt;<br> &lt;div class=”q-pa-md”&gt;<br> &lt;q-card class=”q-mb-md”&gt;<br> &lt;q-card-section&gt;<br> &lt;div class=”text-h6&quot;&gt;Sales Report&lt;/div&gt;<br> &lt;div class=”text-subtitle2&quot;&gt;Data visualization&lt;/div&gt;<br> &lt;/q-card-section&gt;<br> <br> &lt;q-card-section&gt;<br> &lt;q-table<br> :rows=”salesData”<br> :columns=”columns”<br> row-key=”id”<br> hide-pagination<br> :rows-per-page-options=”[0]”<br> /&gt;<br> &lt;/q-card-section&gt;<br> &lt;/q-card&gt;<br> <br> &lt;q-btn <br> color=”red” <br> icon=”picture_as_pdf” <br> label=”Generate PDF”<br> <a href="http://twitter.com/click">@click</a>=”generatePDF”<br> /&gt;<br> &lt;/div&gt;<br>&lt;/template&gt;</p><p>&lt;script&gt;<br>import pdfMake from ‘pdfmake/build/pdfmake’<br>import pdfFonts from ‘pdfmake/build/vfs_fonts’</p><p>// Configure fonts<br>pdfMake.vfs = pdfFonts</p><p>export default {<br> name: ‘ExportPDF’,<br> data() {<br> return {<br> columns: [<br> { name: ‘id’, label: ‘ID’, field: ‘id’, align: ‘left’ },<br> { name: ‘product’, label: ‘Product’, field: ‘product’, align: ‘left’ },<br> { name: ‘salesperson’, label: ‘Salesperson’, field: ‘salesperson’, align: ‘left’ },<br> { name: ‘amount’, label: ‘Amount’, field: ‘amount’, format: val =&gt; `$${val}` },<br> { name: ‘date’, label: ‘Date’, field: ‘date’ }<br> ],<br> salesData: [<br> { id: 1, product: ‘Dell Laptop’, salesperson: ‘John Smith’, amount: 2500.00, date: ‘2025–01–15’ },<br> { id: 2, product: ‘Logitech Mouse’, salesperson: ‘Mary Johnson’, amount: 85.50, date: ‘2025–01–16’ },<br> { id: 3, product: ‘Mechanical Keyboard’, salesperson: ‘Peter Wilson’, amount: 350.00, date: ‘2025–01–17’ },<br> { id: 4, product: ‘24&quot; Monitor’, salesperson: ‘Anna Davis’, amount: 800.00, date: ‘2025–01–18’ }<br> ]<br> }<br> },<br> methods: {<br> generatePDF() {<br> // Prepare table data for PDF<br> const tableBody = [<br> // Table header<br> [<br> { text: ‘ID’, style: ‘tableHeader’ },<br> { text: ‘Product’, style: ‘tableHeader’ },<br> { text: ‘Salesperson’, style: ‘tableHeader’ },<br> { text: ‘Amount’, style: ‘tableHeader’ },<br> { text: ‘Date’, style: ‘tableHeader’ }<br> ],<br> // Table data<br> …this.salesData.map(row =&gt; [<br> row.id.toString(),<br> row.product,<br> row.salesperson,<br> `$${row.amount.toFixed(2)}`,<br> row.date<br> ])<br> ]</p><p>// Calculate total<br> const total = this.salesData.reduce((sum, item) =&gt; sum + item.amount, 0)</p><p>// Define PDF structure<br> const docDefinition = {<br> content: [<br> // Header<br> {<br> columns: [<br> {<br> text: ‘SALES REPORT’,<br> style: ‘header’<br> },<br> {<br> text: `Date: ${new Date().toLocaleDateString(‘en-US’)}`,<br> style: ‘subheader’,<br> alignment: ‘right’<br> }<br> ]<br> },<br> <br> // Divider line<br> { text: ‘’, margin: [0, 10, 0, 10] },<br> <br> // Table<br> {<br> table: {<br> headerRows: 1,<br> widths: [‘auto’, ‘*’, ‘*’, ‘auto’, ‘auto’],<br> body: tableBody<br> },<br> layout: {<br> fillColor: function (rowIndex) {<br> return (rowIndex % 2 === 0) ? ‘#f3f3f3’ : null<br> }<br> }<br> },<br> <br> // Total<br> {<br> text: `Grand Total: $${total.toFixed(2)}`,<br> style: ‘total’,<br> margin: [0, 20, 0, 0]<br> },<br> <br> // Footer<br> {<br> text: ‘Report automatically generated by the system’,<br> style: ‘footer’,<br> margin: [0, 30, 0, 0]<br> }<br> ],<br> <br> // Styles<br> styles: {<br> header: {<br> fontSize: 18,<br> bold: true,<br> color: ‘#2c3e50’<br> },<br> subheader: {<br> fontSize: 12,<br> color: ‘#7f8c8d’<br> },<br> tableHeader: {<br> bold: true,<br> fontSize: 12,<br> color: ‘white’,<br> fillColor: ‘#3498db’<br> },<br> total: {<br> fontSize: 14,<br> bold: true,<br> alignment: ‘right’,<br> color: ‘#27ae60’<br> },<br> footer: {<br> fontSize: 10,<br> italics: true,<br> alignment: ‘center’,<br> color: ‘#95a5a6’<br> }<br> }<br> }</p><p>// Generate and download PDF<br> pdfMake.createPdf(docDefinition).download(`sales_report_${new Date().toISOString().split(‘T’)[0]}.pdf`)<br> <br> this.$q.notify({<br> color: ‘red-4’,<br> textColor: ‘white’,<br> icon: ‘picture_as_pdf’,<br> message: ‘PDF generated successfully!’<br> })<br> }<br> }<br>}<br>&lt;/script&gt;<br>```</p><p>— -</p><p>## Advanced Improvements</p><p>### 1. Excel with custom formatting</p><p>```javascript<br>// utils/excelGenerator.js<br>import * as XLSX from ‘xlsx’</p><p>export function exportAdvancedExcel(data, filename) {<br> const worksheet = XLSX.utils.aoa_to_sheet(data)<br> <br> // Apply styles (limited in XLSX)<br> const range = XLSX.utils.decode_range(worksheet[‘!ref’])<br> <br> // Cell formatting<br> for (let row = range.s.r; row &lt;= range.e.r; row++) {<br> for (let col = range.s.c; col &lt;= range.e.c; col++) {<br> const cellAddress = XLSX.utils.encode_cell({ r: row, c: col })<br> <br> if (row === 0) {<br> // Bold header<br> if (!worksheet[cellAddress]) continue<br> worksheet[cellAddress].s = {<br> font: { bold: true },<br> fill: { fgColor: { rgb: “3498db” } }<br> }<br> }<br> }<br> }<br> <br> // Adjust column widths<br> worksheet[‘!cols’] = [<br> { width: 10 }, // ID<br> { width: 30 }, // Product<br> { width: 20 }, // Salesperson<br> { width: 15 }, // Amount<br> { width: 12 } // Date<br> ]<br> <br> const workbook = XLSX.utils.book_new()<br> XLSX.utils.book_append_sheet(workbook, worksheet, ‘Data’)<br> XLSX.writeFile(workbook, filename)<br>}<br>```</p><p>### 2. PDF with custom logo</p><p>```javascript<br>// utils/pdfGenerator.js<br>import pdfMake from ‘pdfmake/build/pdfmake’</p><p>export function generatePDFWithLogo(data, logoBase64) {<br> const docDefinition = {<br> content: [<br> // Logo and header<br> {<br> columns: [<br> {<br> image: logoBase64, // Base64 image<br> width: 100,<br> height: 50<br> },<br> {<br> text: ‘COMPANY XYZ\nManagement Report’,<br> style: ‘headerWithLogo’,<br> alignment: ‘right’<br> }<br> ]<br> },<br> <br> // Rest of content…<br> ],<br> <br> styles: {<br> headerWithLogo: {<br> fontSize: 14,<br> bold: true,<br> color: ‘#2c3e50’<br> }<br> }<br> }<br> <br> return pdfMake.createPdf(docDefinition)<br>}<br>```</p><p>— -</p><p>## Main page integrating everything</p><p>### indexPage.vue<br>Replace the contents of the `src/pages/indexPage.vue` file, use the contents;</p><p>```vue<br>&lt;template&gt;<br> &lt;q-page class=”q-pa-md”&gt;<br> &lt;div class=”text-h4 q-mb-lg text-center”&gt;<br> 📊 Demo: PDF &amp; Excel on Frontend<br> &lt;/div&gt;<br> <br> &lt;div class=”row q-gutter-md”&gt;<br> &lt;div class=”col-12 col-md-5&quot;&gt;<br> &lt;ExportExcel /&gt;<br> &lt;/div&gt;<br> <br> &lt;div class=”col-12 col-md-5&quot;&gt;<br> &lt;ExportPDF /&gt;<br> &lt;/div&gt;<br> &lt;/div&gt;<br> <br> &lt;q-separator class=”q-my-lg” /&gt;<br> <br> &lt;div class=”text-center”&gt;<br> &lt;p class=”text-body1&quot;&gt;<br> ✨ No backend, no complications! ✨<br> &lt;/p&gt;<br> &lt;p class=”text-caption text-grey-7&quot;&gt;<br> 100% browser file generation using Vue.js + Quasar<br> &lt;/p&gt;<br> &lt;/div&gt;<br> &lt;/q-page&gt;<br>&lt;/template&gt;</p><p>&lt;script&gt;<br>import ExportExcel from ‘components/ExportExcel.vue’<br>import ExportPDF from ‘components/ExportPDF.vue’</p><p>export default {<br> name: ‘ExportDemo’,<br> components: {<br> ExportExcel,<br> ExportPDF<br> }<br>}<br>&lt;/script&gt;<br>```</p><p>— -</p><p>## Conclusion</p><p>With these implementations, you have a complete export system that:</p><p>- ✅ **Works offline** — Doesn’t depend on server<br>- ✅ **High performance** — Client-side processing<br>- ✅ **Flexible** — Easy to customize styles and layouts<br>- ✅ **Professional** — Good-looking PDFs and Excel files<br>- ✅ **Scalable** — Can be integrated into any Quasar project</p><p>### Next steps:<br>- Implement **charts in PDF** using Chart.js<br>- Add **multiple sheets** in Excel<br>- Create **reusable templates**<br>- Integrate with **upload components** for logos</p><p>— -</p><p>## 🔗 Useful links</p><p>- [pdfmake Documentation](<a href="http://pdfmake.org/">http://pdfmake.org/</a>)<br>- [SheetJS (xlsx) Documentation](<a href="https://sheetjs.com/">https://sheetjs.com/</a>)<br>- [Quasar Framework](<a href="https://quasar.dev/">https://quasar.dev/</a>)<br>- [GitHub project files](<a href="https://github.com/ivanrochacardoso/pdf_excel_quasar">https://github.com/ivanrochacardoso/pdf_excel_quasar</a>)<br> — -</p><p>**💡 Tip**: Save this tutorial and try out the code! The best way to learn is by practicing.</p><p>**🚀 Enjoyed the content?** Share with other developers and leave your feedback in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1708a7458a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How AI Helped Me Build a CRM Integration 60% Faster: A Real Vue.js + CouchDB Case Study]]></title>
            <link>https://medium.com/@ivanrochacardoso/how-ai-helped-me-build-a-crm-integration-60-faster-a-real-vue-js-couchdb-case-study-0317e2d82bcc?source=rss-26a598881fc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/0317e2d82bcc</guid>
            <category><![CDATA[cursor]]></category>
            <category><![CDATA[couchdb]]></category>
            <category><![CDATA[quasarframework]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ivanrochacardoso]]></dc:creator>
            <pubDate>Fri, 27 Jun 2025 11:33:10 GMT</pubDate>
            <atom:updated>2025-06-27T11:33:10.429Z</atom:updated>
            <content:encoded><![CDATA[<p>*By Ivan Rocha Cardoso — Full-Stack Developer at SiGlobal*</p><p>## The Challenge Every Developer Has Faced</p><p>Last week I got that request that makes any developer sigh deeply:</p><p>*”Ivan, we need customers to register themselves in our CRM, but the data needs to be validated and automatically integrated with SIADM.”*</p><p>For context about our systems at SiGlobal:<br>- **SIADM**: Our main CRM built with Quasar Framework + CouchDB<br>- **PreencheFácil**: System that allows customer/member self-registration</p><p>Traditionally, this integration would take **at least 2 weeks**:<br>- Integrate Vue.js/Quasar frontend with CouchDB<br>- Implement complex validations (Tax ID, email, phone)<br>- Configure CouchDB authentication<br>- Error handling and data synchronization</p><p>**Spoiler**: I finished in 4 days. And no, I didn’t become a coding machine. I used Cursor AI.</p><p>— -</p><p>## My First “Serious” Experience with AI Coding</p><p>I’d heard about Cursor before, but always thought: *”Oh, just another fancy autocomplete”.*</p><p>Cursor isn’t just code suggestions. It’s like having a senior dev beside you who:<br>- Understands your entire project context<br>- Suggests architectures<br>- Generates functional code (not just snippets)<br>- Explains what it’s doing</p><p>### My Initial Setup</p><p>```bash<br># Quasar + CouchDB integration project<br>npm install -g <a href="http://twitter.com/quasar/cli">@quasar/cli</a><br>quasar create preenchefacil-integration</p><p># Integration dependencies<br>npm install nano joi pouchdb-adapter-http</p><p># Cursor AI understood the stack just by seeing:<br># — quasar.config.js<br># — CouchDB connection configs<br>```</p><p>— -</p><p>## Where Cursor AI Really Shined</p><p>### 1. **API Structure Generation**</p><p>**My prompt:**<br>```<br>I need to integrate a Quasar app (PreencheFácil) with CouchDB (SIADM):<br>- Vue component that collects registration data<br>- Tax ID, email and phone validation on frontend<br>- CouchDB sync using native authentication<br>- Document conflict handling<br>- Responsive interface with Quasar components<br>```</p><p>**What Cursor generated in 2 minutes:**</p><p>```vue<br>&lt;template&gt;<br> &lt;q-page class=”flex flex-center”&gt;<br> &lt;q-card class=”q-pa-lg” style=”width: 100%; max-width: 500px;”&gt;<br> &lt;q-card-section&gt;<br> &lt;div class=”text-h6 text-center”&gt;Customer Registration&lt;/div&gt;<br> &lt;/q-card-section&gt;</p><p>&lt;q-card-section&gt;<br> &lt;q-form <a href="http://twitter.com/submit">@submit</a>=”onSubmit” class=”q-gutter-md”&gt;<br> &lt;q-input<br> v-model=”form.name”<br> label=”Full Name”<br> :rules=”[val =&gt; !!val || ‘Name is required’]”<br> outlined<br> /&gt;</p><p>&lt;q-input<br> v-model=”form.email”<br> label=”Email”<br> type=”email”<br> :rules=”emailRules”<br> outlined<br> /&gt;</p><p>&lt;q-input<br> v-model=”form.tax_id”<br> label=”Tax ID”<br> mask=”###.###.###-##”<br> :rules=”taxIdRules”<br> outlined<br> /&gt;</p><p>&lt;q-input<br> v-model=”form.phone”<br> label=”Phone”<br> mask=”(##) #####-####”<br> :rules=”[val =&gt; !!val || ‘Phone is required’]”<br> outlined<br> /&gt;</p><p>&lt;q-btn<br> label=”Register”<br> type=”submit”<br> color=”primary”<br> class=”full-width”<br> :loading=”loading”<br> /&gt;<br> &lt;/q-form&gt;<br> &lt;/q-card-section&gt;<br> &lt;/q-card&gt;<br> &lt;/q-page&gt;<br>&lt;/template&gt;</p><p>&lt;script&gt;<br>import { ref } from ‘vue’<br>import { useQuasar } from ‘quasar’<br>import PouchDB from ‘pouchdb’</p><p>export default {<br> name: ‘CustomerRegistration’,<br> setup() {<br> const $q = useQuasar()<br> const loading = ref(false)<br> <br> // CouchDB connection<br> const db = new PouchDB(‘<a href="http://admin:password@localhost:5984/siadm&#39;">http://admin:password@localhost:5984/siadm&#39;</a>)<br> <br> const form = ref({<br> name: ‘’,<br> email: ‘’,<br> tax_id: ‘’,<br> phone: ‘’<br> })</p><p>// Validations<br> const emailRules = [<br> val =&gt; !!val || ‘Email is required’,<br> val =&gt; /.+@.+\..+/.test(val) || ‘Email must be valid’<br> ]</p><p>const taxIdRules = [<br> val =&gt; !!val || ‘Tax ID is required’,<br> val =&gt; validateTaxId(val) || ‘Invalid Tax ID’<br> ]</p><p>// Tax ID validation (Brazilian CPF/CNPJ)<br> function validateTaxId(value) {<br> const cleanValue = value.replace(/\D/g, ‘’)<br> if (cleanValue.length === 11) {<br> return validateCPF(cleanValue)<br> } else if (cleanValue.length === 14) {<br> return validateCNPJ(cleanValue)<br> }<br> return false<br> }</p><p>function validateCPF(cpf) {<br> if (cpf.length !== 11 || /^(\d)\1+$/.test(cpf)) return false<br> <br> let sum = 0<br> for (let i = 0; i &lt; 9; i++) {<br> sum += parseInt(cpf[i]) * (10 — i)<br> }<br> let remainder = sum % 11<br> let digit1 = remainder &lt; 2 ? 0 : 11 — remainder<br> <br> if (parseInt(cpf[9]) !== digit1) return false<br> <br> sum = 0<br> for (let i = 0; i &lt; 10; i++) {<br> sum += parseInt(cpf[i]) * (11 — i)<br> }<br> remainder = sum % 11<br> let digit2 = remainder &lt; 2 ? 0 : 11 — remainder<br> <br> return parseInt(cpf[10]) === digit2<br> }</p><p>async function onSubmit() {<br> loading.value = true<br> <br> try {<br> // Check if customer already exists<br> const existingDocs = await db.find({<br> selector: {<br> $or: [<br> { email: form.value.email },<br> { tax_id: form.value.tax_id }<br> ]<br> }<br> })</p><p>if (existingDocs.docs.length &gt; 0) {<br> $q.notify({<br> type: ‘negative’,<br> message: ‘Customer already registered!’<br> })<br> return<br> }</p><p>// Create document in CouchDB<br> const customerDoc = {<br> _id: new Date().toISOString() + ‘_’ + Math.random().toString(36).substr(2, 9),<br> type: ‘customer’,<br> name: form.value.name,<br> email: form.value.email,<br> tax_id: form.value.tax_id.replace(/\D/g, ‘’),<br> phone: form.value.phone,<br> created_at: new Date().toISOString(),<br> status: ‘active’<br> }</p><p>await db.put(customerDoc)</p><p>$q.notify({<br> type: ‘positive’,<br> message: ‘Customer registered successfully!’<br> })</p><p>// Reset form<br> form.value = {<br> name: ‘’,<br> email: ‘’,<br> tax_id: ‘’,<br> phone: ‘’<br> }</p><p>} catch (error) {<br> console.error(‘Registration error:’, error)<br> $q.notify({<br> type: ‘negative’,<br> message: ‘Registration failed. Please try again.’<br> })<br> } finally {<br> loading.value = false<br> }<br> }</p><p>return {<br> form,<br> loading,<br> emailRules,<br> taxIdRules,<br> onSubmit<br> }<br> }<br>}<br>&lt;/script&gt;<br>```</p><p>** My reaction:** “Dude, this has validation, masks, CouchDB integration and it’s responsive!”</p><p>### 2. **CouchDB Configuration That Would Take Me Hours**</p><p>I asked: *”How to configure authentication and synchronization with CouchDB for this use case?”*</p><p>Cursor generated a complete Vue composable:</p><p>```javascript<br>// composables/useCouchDB.js<br>import { ref } from ‘vue’<br>import PouchDB from ‘pouchdb’</p><p>export function useCouchDB() {<br> const loading = ref(false)<br> const error = ref(null)</p><p>// Connection configuration<br> const dbConfig = {<br> remote: ‘<a href="http://localhost:5984/siadm&#39;">http://localhost:5984/siadm&#39;</a>,<br> options: {<br> auth: {<br> username: process.env.COUCHDB_USER,<br> password: process.env.COUCHDB_PASSWORD<br> },<br> timeout: 10000,<br> retry: {<br> retries: 3,<br> minTimeout: 1000<br> }<br> }<br> }</p><p>// Local instance for synchronization<br> const localDB = new PouchDB(‘siadm_local’)<br> const remoteDB = new PouchDB(dbConfig.remote, dbConfig.options)</p><p>// Bidirectional synchronization<br> async function syncDatabase() {<br> try {<br> loading.value = true<br> <br> const sync = localDB.sync(remoteDB, {<br> live: true,<br> retry: true,<br> filter: ‘customers/by_status’,<br> query_params: { status: ‘active’ }<br> })</p><p>sync.on(‘change’, (info) =&gt; {<br> console.log(‘Sync change:’, info)<br> })</p><p>sync.on(‘error’, (err) =&gt; {<br> console.error(‘Sync error:’, err)<br> error.value = err<br> })</p><p>return sync</p><p>} catch (err) {<br> error.value = err<br> throw err<br> } finally {<br> loading.value = false<br> }<br> }</p><p>// Create document with conflict handling<br> async function createDocument(doc) {<br> try {<br> loading.value = true<br> <br> // Try local insert first<br> const result = await localDB.put(doc)<br> <br> // Sync to remote<br> await localDB.replicate.to(remoteDB)<br> <br> return result<br> <br> } catch (err) {<br> if (err.status === 409) {<br> // Conflict — document already exists<br> console.log(‘Conflict detected, resolving…’)<br> return await resolveConflict(doc)<br> }<br> throw err<br> } finally {<br> loading.value = false<br> }<br> }</p><p>// Automatic conflict resolution<br> async function resolveConflict(doc) {<br> const existing = await localDB.get(doc._id)<br> <br> // Strategy: keep the most recent<br> if (new Date(doc.created_at) &gt; new Date(existing.created_at)) {<br> doc._rev = existing._rev<br> return await localDB.put(doc)<br> }<br> <br> return existing<br> }</p><p>return {<br> localDB,<br> remoteDB,<br> loading,<br> error,<br> syncDatabase,<br> createDocument<br> }<br>}<br>```</p><p>** What impressed me:** Offline sync, conflict handling, automatic retry… stuff that would take me DAYS to research!</p><p>### 3. **Testing with Quasar Testing Framework**</p><p>I said: *”I need tests for this Vue + CouchDB component”*</p><p>```javascript<br>// test/jest/__tests__/CustomerRegistration.spec.js<br>import { mount } from ‘<a href="http://twitter.com/vue/test-utils">@vue/test-utils</a>’<br>import { describe, it, expect, vi, beforeEach } from ‘vitest’<br>import { Quasar } from ‘quasar’<br>import CustomerRegistration from ‘src/pages/CustomerRegistration.vue’</p><p>// Mock PouchDB<br>vi.mock(‘pouchdb’, () =&gt; ({<br> default: vi.fn(() =&gt; ({<br> find: vi.fn(),<br> put: vi.fn(),<br> sync: vi.fn()<br> }))<br>}))</p><p>describe(‘CustomerRegistration’, () =&gt; {<br> let wrapper</p><p>beforeEach(() =&gt; {<br> wrapper = mount(CustomerRegistration, {<br> global: {<br> plugins: [Quasar]<br> }<br> })<br> })</p><p>it(‘should render form correctly’, () =&gt; {<br> expect(wrapper.find(‘[data-test=”name-input”]’).exists()).toBe(true)<br> expect(wrapper.find(‘[data-test=”email-input”]’).exists()).toBe(true)<br> expect(wrapper.find(‘[data-test=”tax-id-input”]’).exists()).toBe(true)<br> expect(wrapper.find(‘[data-test=”phone-input”]’).exists()).toBe(true)<br> })</p><p>it(‘should validate tax ID correctly’, async () =&gt; {<br> const taxIdInput = wrapper.find(‘[data-test=”tax-id-input”]’)<br> <br> await taxIdInput.setValue(‘111.111.111–11’) // Invalid tax ID<br> await wrapper.find(‘form’).trigger(‘submit’)<br> <br> expect(wrapper.text()).toContain(‘Invalid Tax ID’)<br> })</p><p>it(‘should register valid customer’, async () =&gt; {<br> const mockPut = vi.fn().mockResolvedValue({ ok: true, id: ‘test-id’ })<br> wrapper.vm.db.put = mockPut</p><p>await wrapper.find(‘[data-test=”name-input”]’).setValue(‘John Doe’)<br> await wrapper.find(‘[data-test=”email-input”]’).setValue(‘<a href="/service/mailto:john@email.com">john@email.com</a>’)<br> await wrapper.find(‘[data-test=”tax-id-input”]’).setValue(‘123.456.789–09’)<br> await wrapper.find(‘[data-test=”phone-input”]’).setValue(‘(11) 99999–9999’)</p><p>await wrapper.find(‘form’).trigger(‘submit’)<br> await wrapper.vm.$nextTick()</p><p>expect(mockPut).toHaveBeenCalledWith(<br> expect.objectContaining({<br> name: ‘John Doe’,<br> email: ‘<a href="/service/mailto:john@email.com">john@email.com</a>’,<br> type: ‘customer’<br> })<br> )<br> })</p><p>it(‘should handle duplicate customer error’, async () =&gt; {<br> const mockFind = vi.fn().mockResolvedValue({<br> docs: [{ _id: ‘existing-customer’ }]<br> })<br> wrapper.vm.db.find = mockFind</p><p>await wrapper.find(‘[data-test=”email-input”]’).setValue(‘<a href="/service/mailto:john@email.com">john@email.com</a>’)<br> await wrapper.find(‘form’).trigger(‘submit’)<br> await wrapper.vm.$nextTick()</p><p>expect(wrapper.text()).toContain(‘Customer already registered’)<br> })<br>})<br>```</p><p>— -</p><p>## Before vs After: The Real Numbers</p><p>### **Development Time**<br>- **Traditional method**: 2 weeks (80 hours)<br>- **With Cursor AI**: 4 days (32 hours)<br>- **Time saved**: 60%</p><p>### **Code Quality**<br>- **Initial bugs**: 70% fewer<br>- **Test coverage**: Generated automatically<br>- **Validations**: Edge cases I wouldn’t think of</p><p>### **Lines of Code**<br>- **Total project**: ~1200 lines<br>- **AI-generated**: ~480 lines (40%)<br>- **My work**: Business logic, SIADM-specific configurations</p><p>— -</p><p>## What I Learned (Valuable Lessons)</p><p>### **Where AI Excelled:**<br>1. **Vue Components**: Forms, validations, masks<br>2. **CouchDB Integration**: Authentication, sync, conflicts<br>3. **Quasar Components**: Responsive layout, notifications<br>4. **Composables**: Reusable and reactive logic</p><p>### **Where I Still Need the Human:**<br>1. **Business Rules**: How SIADM data relationships work<br>2. **Design System**: SiGlobal visual standards<br>3. **Performance**: CouchDB-specific optimizations<br>4. **Deployment**: Quasar production configurations</p><p>### **Best Practices I Discovered:**</p><p>**1. Be specific about your stack:**<br>```<br>❌ “Create a form”<br>✅ “Create a Quasar component with validation that saves to CouchDB”<br>```</p><p>**2. Mention Vue 3 patterns:**<br>```<br>“Use Composition API, reactive refs, and async/await”<br>```</p><p>**3. Ask for CouchDB explanations:**<br>```<br>“Why use local PouchDB + synchronization?”<br>```</p><p>— -</p><p>## Next Steps: What’s Coming</p><p>Now that I’ve seen the potential, I’m already planning to use AI for:</p><p>1. **SiEscola**: Automate grade and attendance reports<br>2. **SIADM**: Intelligent dashboard with insights<br>3. **PreencheFácil**: Real-time frontend validations</p><p>— -</p><p>## Final Thoughts: Did AI Replace the Developer?</p><p>**Short answer**: No.</p><p>**Long answer**: AI became my most efficient pair programming partner. It doesn’t make architectural decisions, doesn’t understand complex business rules, and doesn’t solve unique problems.</p><p>But for:<br>- Repetitive code ✅<br>- Standard validations ✅<br>- Basic tests ✅<br>- Documentation ✅</p><p>It’s **unbeatable**.</p><p>Today’s developer needs to learn to **collaborate with AI**, not compete against it.</p><p>— -</p><p>## Final Result</p><p>PreencheFácil now integrates seamlessly with SIADM. Customers register through a responsive Quasar interface, data is validated in real-time, and everything syncs automatically with our CouchDB.</p><p>**Total time**: 4 days<br>**Lines of code**: 1200+ (40% AI-generated)<br>**Bugs found**: Less than 3 (sync worked on first try!)<br>**Happy client**: ✅</p><p>— -</p><p>*I work at SiGlobal developing solutions like SIADM, PreencheFácil and SiEscola. I share real development experiences to help other developers.*</p><p>*Need consulting on automation and system integration? Reach out: **<a href="/service/mailto:ivanrochacardoso@gmail.com">ivanrochacardoso@gmail.com</a>***</p><p>— -</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0317e2d82bcc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# Dashboard em Tempo Real com Vue.js + Quasar + MQTT (Usando HiveMQ)]]></title>
            <link>https://medium.com/@ivanrochacardoso/dashboard-em-tempo-real-com-vue-js-quasar-mqtt-usando-hivemq-60ccea9807ed?source=rss-26a598881fc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/60ccea9807ed</guid>
            <category><![CDATA[hivemq]]></category>
            <category><![CDATA[quasarframework]]></category>
            <category><![CDATA[mqtt]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Ivanrochacardoso]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 19:08:50 GMT</pubDate>
            <atom:updated>2025-06-20T19:08:50.242Z</atom:updated>
            <content:encoded><![CDATA[<p># Dashboard em Tempo Real com Vue.js + Quasar + MQTT (Usando HiveMQ)</p><p>Vamos configurar um painel bonito, responsivo para monitoramento de sensores, dispositivos IoT ou até servidores, recebendo dados em tempo real via MQTT, usando apenas Vue.js + Quasar Framework no frontend.</p><p>Se você trabalha com automação, IoT, ou gosta de acompanhar dados dos seus dispositivos, sensores, ou servidores, provavelmente já pensou em ter um dashboard bonito, funcional e em tempo real.</p><p>Com Vue.js + Quasar e um broker MQTT como o HiveMQ, você cria isso rapidamente, usando só frontend. Perfeito para:</p><p>Monitoramento de sensores (temperatura, energia, ambiente…)</p><p>Automação residencial</p><p>Status de servidores</p><p>Qualquer aplicação que envie dados via MQTT</p><p>* Tecnologias Usadas</p><p>Vue.js 3 (Composition API)</p><p>Quasar Framework (UI bonita, responsiva e poderosa)</p><p>MQTT.js (Cliente MQTT via WebSocket)</p><p>HiveMQ Cloud (Broker MQTT gratuito)</p><p>* Broker Gratuito Usado</p><p>Vamos usar o broker gratuito da HiveMQ:<br>🔗 <a href="https://www.hivemq.com/demos/websocket-client/">https://www.hivemq.com/demos/websocket-client/</a></p><p>Configurações para WebSocket:</p><p>Broker: broker.hivemq.com</p><p>Porta: 8000 (WebSocket sem SSL)<br> ou 8884 (WebSocket com SSL) (pode testar ambos)</p><p>URL WebSocket: ws://broker.hivemq.com:8000/mqtt<br> ou com SSL: wss://broker.hivemq.com:8884/mqtt</p><p>Utilizando ambiente DEV em linux Debian com `<a href="http://twitter.com/quasar/cli">@quasar/cli</a> v2.5.0`</p><p>Setup do Projeto<br>1️ Crie um novo projeto Quasar:</p><p>```bash<br>npm install -g <a href="http://twitter.com/quasar/cli">@quasar/cli</a><br>npm init quasar<br>#App with quasar-&gt;ProjectFolder-&gt;mqtt-dashboard<br># utilizando Pinia como state Management e Axios<br>cd mqtt-dashboard<br>#testar o ambiente dev com<br>quasar dev<br>```<br>Com isso o servidor dev local acessivel em `<a href="http://localhost:9000/#/%60">http://localhost:9000/#/`</a></p><p>Estrutura do projeto</p><p>```<br>.<br>├── index.html<br>├── jsconfig.json<br>├── node_modules<br>├── package.json<br>├── package-lock.json<br>├── postcss.config.cjs<br>├── public<br>├── quasar.config.js<br>├── README.md<br>└── src</p><p>4 directories, 7 files<br>```<br> Instale o MQTT.js:</p><p>```bash<br>npm install mqtt<br>```</p><p>🔌 Conectando ao MQTT<br> Crie um composable useMqtt.js:</p><p>```bash<br>mkdir src/composables<br>#cria arquivo vazio, abaixo adicionamos conteúdo…<br>touch src/composables/useMqtt.js<br>```</p><p>Adicione esse conteúdo</p><p>```javascript<br>import { ref, onMounted, onBeforeUnmount } from ‘vue’<br>import mqtt from ‘mqtt’</p><p>export function useMqtt() {<br> const temperatura = ref(0)<br> const status = ref(‘Desconectado’)<br> const client = ref(null)</p><p>const connect = () =&gt; {<br> const url = ‘ws://broker.hivemq.com:8000/mqtt’<br> client.value = mqtt.connect(url)</p><p>client.value.on(‘connect’, () =&gt; {<br> status.value = ‘Conectado’<br> client.value.subscribe(‘teste/sensor/temperatura’)<br> })</p><p>client.value.on(‘message’, (topic, payload) =&gt; {<br> if (topic === ‘teste/sensor/temperatura’) {<br> temperatura.value = parseFloat(payload.toString())<br> }<br> })</p><p>client.value.on(‘error’, (err) =&gt; {<br> status.value = ‘Erro’<br> console.error(‘Erro MQTT:’, err)<br> })</p><p>client.value.on(‘close’, () =&gt; {<br> status.value = ‘Desconectado’<br> })<br> }</p><p>const disconnect = () =&gt; {<br> client.value?.end()<br> status.value = ‘Desconectado’<br> }</p><p>onMounted(connect)<br> onBeforeUnmount(disconnect)</p><p>return {<br> temperatura,<br> status<br> }<br>}<br>```</p><p>Interface Simples<br> No seu IndexPage.vue, substitua o conteudo por:<br>```html<br>&lt;template&gt;<br> &lt;q-page padding&gt;<br> &lt;div class=”q-pa-md”&gt;<br> &lt;q-card&gt;<br> &lt;q-card-section&gt;<br> &lt;div class=”text-h6&quot;&gt;Dashboard IoT — MQTT&lt;/div&gt;<br> &lt;div&gt;Status: &lt;q-badge :color=”status === ‘Conectado’ ? ‘green’ : ‘red’”&gt;{{ status }}&lt;/q-badge&gt;&lt;/div&gt;<br> &lt;/q-card-section&gt;</p><p>&lt;q-separator /&gt;</p><p>&lt;q-card-section&gt;<br> &lt;div class=”text-subtitle1&quot;&gt;<br> 🌡️ Temperatura: &lt;b&gt;{{ temperatura }} ºC&lt;/b&gt;<br> &lt;/div&gt;<br> &lt;/q-card-section&gt;<br> &lt;/q-card&gt;<br> &lt;/div&gt;<br> &lt;/q-page&gt;<br>&lt;/template&gt;</p><p>&lt;script setup&gt;<br>import { useMqtt } from ‘src/composables/useMqtt’</p><p>const { temperatura, status } = useMqtt()<br>&lt;/script&gt;<br>```</p><p>Testando</p><p>👉 Envie dados de teste usando o próprio Web Client da HiveMQ:<br>1. Na guia ‘Connection’ clique connect<br>2. Abaixo em ‘Publish’ coloque o tópico abaixo e o valor ‘25’ no campo mensagem.</p><p>🔗 <a href="https://www.hivemq.com/demos/websocket-client/">https://www.hivemq.com/demos/websocket-client/</a></p><p>Tópico: teste/sensor/temperatura</p><p>Mensagem: 25 (ou qualquer valor de teste)</p><p>3. Clique em Publish.</p><p>Seu dashboard atualizará em tempo real!<br> Expandindo</p><p>🔌 Adicione mais tópicos (ex.: umidade, energia, presença).</p><p>📈 Inclua gráficos com apexcharts ou chart.js.</p><p>📲 Pode hospedar isso no seu próprio domínio.</p><p>Conclusão</p><p>É simples montar um dashboard em tempo real usando apenas frontend, com Vue.js, Quasar e MQTT. Isso é perfeito para automação residencial, IoT, monitoramento de energia (como eu uso nos meus projetos) e muito mais.<br>Se quiser, pode expandir adicionando banco de dados, notificações, alertas ou integração com ferramentas como n8n ou Node-RED.</p><p>Arquivos do projeto;<br><a href="https://github.com/ivanrochacardoso/mqtt_quasar_dashboard">https://github.com/ivanrochacardoso/mqtt_quasar_dashboard</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60ccea9807ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Examples of file comparison commands, useful for the SVN version control system — Apache Subversion]]></title>
            <link>https://medium.com/@ivanrochacardoso/examples-of-file-comparison-commands-useful-for-the-svn-version-control-system-apache-subversion-196a96e15d6a?source=rss-26a598881fc0------2</link>
            <guid isPermaLink="false">https://medium.com/p/196a96e15d6a</guid>
            <dc:creator><![CDATA[Ivanrochacardoso]]></dc:creator>
            <pubDate>Fri, 17 May 2024 13:34:48 GMT</pubDate>
            <atom:updated>2024-05-17T13:34:48.491Z</atom:updated>
            <content:encoded><![CDATA[<h3>Examples of file comparison commands, useful for the SVN version control system — Apache Subversion</h3><p>In this tutorial, we will compare differences between two SVN revisions</p><h4>To open and check changes for a particular revision</h4><p>First you need to have “MELD” installed,is a tool for making manual merges and editor, which compares files side by side, showing the differences between them, lines added, removed and containing differences.<br>To install MELD from terminal:</p><pre>sudo apt install meld</pre><p>Here is the command to compare the last changes of a file with meld;</p><pre>svn diff --diff-cmd=&#39;meld&#39; -r1012 src/stores/crude_pouchdb.js</pre><p>In this example above, the revision 1012 file will be compared with the current working copy file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vjLE6anu8K_u9lGRU-rLVw.png" /></figure><ul><li>Apache foundation Subversion —<a href="https://subversion.apache.org/"> https://subversion.apache.org/</a></li><li>Meld Visual diff and merge tool <a href="https://meldmerge.org/">https://meldmerge.org/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=196a96e15d6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>