<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: depa panjie purnama</title>
    <description>The latest articles on DEV Community by depa panjie purnama (@depapp).</description>
    <link>https://dev.to/depapp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F116076%2F844c0912-e894-4a73-9f9d-41c7adbe4e97.jpeg</url>
      <title>DEV Community: depa panjie purnama</title>
      <link>https://dev.to/depapp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/depapp"/>
    <language>en</language>
    <item>
      <title>I Hid My Portfolio in Pitch Darkness. Google Gemini Helped Me Build the Torch.</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sun, 01 Mar 2026 12:15:45 +0000</pubDate>
      <link>https://dev.to/depapp/i-hid-my-portfolio-in-pitch-darkness-google-gemini-helped-me-build-the-torch-521o</link>
      <guid>https://dev.to/depapp/i-hid-my-portfolio-in-pitch-darkness-google-gemini-helped-me-build-the-torch-521o</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/mlh-built-with-google-gemini-02-25-26"&gt;Built with Google Gemini: Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4erzsqnssdyrysis9e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4erzsqnssdyrysis9e6.png" alt="depapp portfolio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built with Google Gemini
&lt;/h2&gt;

&lt;p&gt;Portfolios are supposed to showcase who you are as an engineer. Yet, somewhere along the line, we all started building the exact same thing: a clean header, a bouncy CSS grid of project cards, and a massive "Contact Me" button. I realized that the best part of discovering an engineer's work isn't just reading it, it's the &lt;em&gt;act of discovery&lt;/em&gt; itself. &lt;/p&gt;

&lt;p&gt;So, I decided to plunge my entire CV into pitch darkness. &lt;/p&gt;

&lt;p&gt;I built the &lt;strong&gt;Interactive Torch Portfolio&lt;/strong&gt;. It is an experimental, mobile-first single-page application (SPA) where the screen is completely black. The only way to read my bio, my skills, or see my projects is by physically dragging a virtual, flickering "torch" around the screen to carve a hole of light into the darkness. &lt;/p&gt;

&lt;p&gt;I chose not to use React, Next.js, or any massive libraries. I wanted to build this purely with HTML, CSS, and vanilla DOM manipulation. But I knew that calculating the physics of a moving torch and handling complex HTML5 Canvas blend modes would be a massive headache. &lt;/p&gt;

&lt;p&gt;That's where &lt;strong&gt;Google Gemini&lt;/strong&gt; stepped in, not just as an autocomplete tool, but as my mathematical pair programmer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;If you want to experience the thrill of exploring the portfolio yourself, you don't even need to leave this page. You can try the live Google Cloud Run deployment right here:&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://depapp-torch-726779073670.asia-southeast2.run.app/"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;




&lt;p&gt;The entire codebase is containerized using a lightweight &lt;code&gt;nginx:alpine&lt;/code&gt; image and deployed seamlessly to Cloud Run.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;URL: &lt;a href="https://depapp-torch-726779073670.asia-southeast2.run.app" rel="noopener noreferrer"&gt;https://depapp-torch-726779073670.asia-southeast2.run.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub Repository: &lt;a href="https://github.com/depapp/senter" rel="noopener noreferrer"&gt;https://github.com/depapp/senter&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;Building this pushed my boundaries on how creative front-end web development can be when you strip away the frameworks and return to first principles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Advanced Canvas Blend Modes (Technical Depth)&lt;/strong&gt;&lt;br&gt;
I leveled up my understanding of the HTML5 &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; API, specifically working with &lt;code&gt;globalCompositeOperation&lt;/code&gt;. I needed to render total darkness, but physically "cut out" a transparent hole where the mouse moved. Gemini helped me implement this precise logic without destroying the browser's framerate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Fill the screen with darkness&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fillStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#050505&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;globalCompositeOperation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;source-over&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fillRect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// "Cut out" the darkness using the glowing gradient&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;globalCompositeOperation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;destination-out&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fillStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gradient&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// radial gradient for soft edges&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;beginPath&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;arc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;startX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;startY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;maxRadius&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mastering how to stack &lt;code&gt;destination-out&lt;/code&gt; for the flashlight beam and &lt;code&gt;screen&lt;/code&gt;/&lt;code&gt;lighter&lt;/code&gt; for the ambient fire glow on top of a single &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; element was incredibly rewarding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Translating Physical Mechanics&lt;/strong&gt;&lt;br&gt;
A standard custom cursor feels weightless. I wanted my torch to feel &lt;em&gt;heavy&lt;/em&gt;. Working with Gemini taught me how to articulate visual physics into actionable engineering prompts. I explained the physical logic of "make the torch tilt like a heavy pendulum based on mouse movement speed," and Gemini translated my abstract thought directly into the &lt;code&gt;Math.cos&lt;/code&gt; and &lt;code&gt;Math.sin&lt;/code&gt; rotation matrices required to make the SVG torch swing realistically on its pivot. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The Power of Vanilla Performance&lt;/strong&gt;&lt;br&gt;
By relying purely on &lt;code&gt;requestAnimationFrame&lt;/code&gt; and a Canvas context instead of virtual DOM diffing, the application loads instantaneously and maintains a buttery-smooth 60 FPS even while rendering hundreds of animated, math-driven fire particles. &lt;/p&gt;

&lt;h2&gt;
  
  
  Google Gemini Feedback
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What worked beautifully:&lt;/strong&gt; &lt;br&gt;
Gemini's ability to retain context over a long architectural discussion is unmatched. The project didn't start as a medieval torch, it started as a modern flashlight. When I decided to pivot the art direction, I simply asked Gemini to "change the flashlight element to a sputtering wooden torch, but keep the noise overlay and the physics we discussed earlier." It flawlessly generated the new SVG coordinates while respecting the existing z-index layers. Its translation of physical concepts (friction, gravity, pendulum swings) into JavaScript mathematics saved me hours of staring blankly at MDN documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where I ran into friction:&lt;/strong&gt;&lt;br&gt;
There were moments where I had to specifically prompt Gemini to optimize for mobile touch events. Initially, the torch effect worked beautifully on a desktop mouse, but standard &lt;code&gt;mousemove&lt;/code&gt; events don't map perfectly to &lt;code&gt;touchmove&lt;/code&gt; and &lt;code&gt;touchstart&lt;/code&gt; on mobile devices without causing erratic scrolling. While Gemini eventually provided the correct code (adding &lt;code&gt;{ passive: true }&lt;/code&gt;), I had to be the one to explicitly recognize and request the mobile-first structural adjustments. It also occasionally required a nudge to prefer vanilla CSS Flexbox solutions over immediately reaching for JavaScript viewport calculations when styling the grid layout for the hidden content.&lt;/p&gt;

&lt;p&gt;Ultimately, Gemini wasn't just a code generator; it was a sounding board for design concepts and a mathematical assistant that brought a very ambitious, pitch-black idea to life.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>geminireflections</category>
      <category>gemini</category>
    </item>
    <item>
      <title>How I Built FurMap to Help Lost Pets Find Their Way Home</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Fri, 27 Feb 2026 09:39:50 +0000</pubDate>
      <link>https://dev.to/depapp/how-i-built-furmap-to-help-lost-pets-find-their-way-home-5b5o</link>
      <guid>https://dev.to/depapp/how-i-built-furmap-to-help-lost-pets-find-their-way-home-5b5o</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/weekend-2026-02-28"&gt;DEV Weekend Challenge: Community&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3jx31p0rlmzw0jo9dsh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3jx31p0rlmzw0jo9dsh.png" alt="fur-map landing page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Community
&lt;/h2&gt;

&lt;p&gt;It was a typical Saturday morning in my neighborhood when I heard something that would change my weekend: &lt;strong&gt;a family's beloved dog had gone missing&lt;/strong&gt;. The frantic posters, the social media shares, the desperate calls to local shelters, it struck me how fragmented our community's resources were when it came to helping our furry friends.&lt;/p&gt;

&lt;p&gt;That's when it hit me: &lt;strong&gt;what if there was a single platform where pet owners could connect, help find lost pets, and support each other?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The pet owner community is massive and passionate. We share tips, celebrate wins, and mourn losses together. But we lacked a centralized tool to coordinate efforts when it mattered most. That's the gap I set out to fill with &lt;strong&gt;FurMap&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;FurMap&lt;/strong&gt; is a community platform that connects pet owners through an interactive map-based interface. Here's what makes it special:&lt;/p&gt;

&lt;h3&gt;
  
  
  🗺️ Interactive Map with Color-Coded Pins
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Red pins&lt;/strong&gt;: Lost pets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Green pins&lt;/strong&gt;: Found pets
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blue pins&lt;/strong&gt;: Pet sitters needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Users can see all activity in their neighborhood at a glance. Click on any pin to view details, comment, or contact the poster.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔔 Real-Time Notifications
&lt;/h3&gt;

&lt;p&gt;When someone comments on your post, you get an instant notification. No more refreshing the page hoping for updates, FurMap keeps the community connected.&lt;/p&gt;

&lt;h3&gt;
  
  
  💬 Community Comments
&lt;/h3&gt;

&lt;p&gt;Every post has a comment section where neighbors can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Share tips and leads&lt;/li&gt;
&lt;li&gt;Coordinate search efforts&lt;/li&gt;
&lt;li&gt;Offer emotional support&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📞 Direct Contact
&lt;/h3&gt;

&lt;p&gt;Post owners can share their email or WhatsApp, making it easy to connect offline when needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  🐾 My Pets Profile
&lt;/h3&gt;

&lt;p&gt;Create profiles for your furry friends and link them to your posts. It adds a personal touch and helps others identify the pet faster.&lt;/p&gt;

&lt;h3&gt;
  
  
  📍 Smart Location Detection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPS&lt;/strong&gt; for mobile users&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IP-based fallback&lt;/strong&gt; for desktop users&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click-to-set&lt;/strong&gt; on the interactive map&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;URL: &lt;a href="https://fur-map.netlify.app" rel="noopener noreferrer"&gt;https://fur-map.netlify.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dashboard - Map page
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8llitx06hunb9h8m53pj.png" alt="Dashboard page"&gt;
&lt;/li&gt;
&lt;li&gt;Dashboard - List page
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftf43mjljgpg2j6k97qph.png" alt="List page"&gt;
&lt;/li&gt;
&lt;li&gt;Create New Post page
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbp75ivwezovzq4zv3bxh.png" alt="Post page"&gt;
&lt;/li&gt;
&lt;li&gt;My Pets page
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo8kobz2ls1dzmpeblnz5.png" alt="My Pets page"&gt;
&lt;/li&gt;
&lt;li&gt;Notification page
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvfi6gn2is2hzkh1amuv7.png" alt="Notification Page"&gt;
&lt;/li&gt;
&lt;li&gt;Post Details page
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpcdwp9ivqajw0vf4xphm.png" alt="Post Details page"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/depapp" rel="noopener noreferrer"&gt;
        depapp
      &lt;/a&gt; / &lt;a href="https://github.com/depapp/furmap" rel="noopener noreferrer"&gt;
        furmap
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      FurMap is a community platform for pet owners to connect, help find lost pets, report found animals, and find trusted pet sitters in their neighborhood.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;🐾 FurMap - Pet Community Platform&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e"&gt;&lt;img src="https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e" alt="License"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/1f8fc6cd4bc1e85d1293236e22c20150c92e468dda98d62a6c0fe6f0505ca704/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6578742e6a732d31342d626c61636b"&gt;&lt;img src="https://camo.githubusercontent.com/1f8fc6cd4bc1e85d1293236e22c20150c92e468dda98d62a6c0fe6f0505ca704/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e6578742e6a732d31342d626c61636b" alt="Next.js"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/4559cf170c0aa4aef1354569c4f643bd5811a25daeaa5052995305a3a38eec70/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53757061626173652d64617461626173652d626c7565"&gt;&lt;img src="https://camo.githubusercontent.com/4559cf170c0aa4aef1354569c4f643bd5811a25daeaa5052995305a3a38eec70/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53757061626173652d64617461626173652d626c7565" alt="Supabase"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/12175ed316d86e893a8032435e31c176a6c177b0ac6afaa914f5b70d003fd7e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5461696c77696e64204353532d6e656f2d2d62727574616c69736d2d707572706c65"&gt;&lt;img src="https://camo.githubusercontent.com/12175ed316d86e893a8032435e31c176a6c177b0ac6afaa914f5b70d003fd7e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5461696c77696e64204353532d6e656f2d2d62727574616c69736d2d707572706c65" alt="Tailwind"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;FurMap is a community platform for pet owners to connect, help find lost pets, report found animals, and find trusted pet sitters in their neighborhood. Built with &lt;strong&gt;Next.js 14&lt;/strong&gt;, &lt;strong&gt;Supabase&lt;/strong&gt;, and &lt;strong&gt;Leaflet/OpenStreetMap&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;✨ Features&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🗺️ Interactive Map&lt;/h3&gt;
&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;See all posts on a map with color-coded pins&lt;/li&gt;
&lt;li&gt;🔴 Red = Lost Pets&lt;/li&gt;
&lt;li&gt;🟢 Green = Found Pets&lt;/li&gt;
&lt;li&gt;🔵 Blue = Pet Sitters&lt;/li&gt;
&lt;li&gt;Click on map to view post details&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🔔 Real-time Notifications&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Get instant notifications when someone comments on your posts&lt;/li&gt;
&lt;li&gt;Notification bell with unread count badge&lt;/li&gt;
&lt;li&gt;Mark as read / Mark all as read&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;💬 Community Comments&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Discuss and help each other&lt;/li&gt;
&lt;li&gt;Comment on posts to coordinate searches&lt;/li&gt;
&lt;li&gt;Share information and tips&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;📞 Direct Contact&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Post owners can share contact info&lt;/li&gt;
&lt;li&gt;Connect via email or WhatsApp&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;🐾 My Pets&lt;/h3&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Create profiles for your furry friends&lt;/li&gt;
&lt;li&gt;Link pets to your posts&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;📍&lt;/h3&gt;…&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/depapp/furmap" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;Next.js 14 (App Router)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Tailwind CSS + Neo-brutalism&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend&lt;/td&gt;
&lt;td&gt;Supabase&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;PostgreSQL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth&lt;/td&gt;
&lt;td&gt;Supabase Auth&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Maps&lt;/td&gt;
&lt;td&gt;Leaflet + OpenStreetMap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Netlify&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Key Technical Decisions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Neo-Brutalism Design&lt;/strong&gt;&lt;br&gt;
I chose a bold, playful design aesthetic to match the fun energy of pet ownership. The chunky borders, bright colors, and playful typography make the app feel approachable and memorable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Supabase for Backend&lt;/strong&gt;&lt;br&gt;
Supabase was perfect for this project, it provided authentication, database, and real-time subscriptions out of the box. The free tier is generous enough for a growing community.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Leaflet + OpenStreetMap&lt;/strong&gt;&lt;br&gt;
No expensive Google Maps API needed! OpenStreetMap is free, open-source, and works beautifully for neighborhood-level mapping.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Dual Notification System&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Post owners get notified of new comments&lt;/li&gt;
&lt;li&gt;Other commenters also get notified (threaded engagement)&lt;/li&gt;
&lt;li&gt;Uses Supabase database with manual refresh (real-time can be added later)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Challenges &amp;amp; Solutions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Challenge&lt;/strong&gt;: Desktop users don't have GPS&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Implemented IP-based geolocation using ipapi.co as fallback, plus click-to-set on the map&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenge&lt;/strong&gt;: Managing location on mobile Safari&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Combined GPS with manual map clicking for maximum reliability&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenge&lt;/strong&gt;: Creating realistic seed data&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Built a seed script that creates test users, pets, posts with geographic distribution around Jakarta, Indonesia&lt;/p&gt;

&lt;h3&gt;
  
  
  What I Learned
&lt;/h3&gt;

&lt;p&gt;This weekend challenge pushed me to think about &lt;strong&gt;community-first design&lt;/strong&gt;. It's not just about the technology, it's about understanding human needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People panic when pets go missing, they need &lt;strong&gt;quick, intuitive tools&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Community members want to &lt;strong&gt;help but need coordination&lt;/strong&gt;, comments and notifications bridge that gap&lt;/li&gt;
&lt;li&gt;Trust is built through &lt;strong&gt;transparency&lt;/strong&gt;, showing contact info, clear post types&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;FurMap isn't just an app, it's a small step toward more connected, compassionate neighborhoods. Every lost pet that finds their way home, every pet sitter that helps a stressed owner, every comment that offers hope... that's the real value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The best technology is the kind that brings us closer together.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I Built a Tamagotchi That Judges Your GitHub Activity 🐾 (and it's brutally honest)</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sun, 15 Feb 2026 05:43:20 +0000</pubDate>
      <link>https://dev.to/depapp/i-built-a-tamagotchi-that-judges-your-github-activity-and-its-brutally-honest-oh1</link>
      <guid>https://dev.to/depapp/i-built-a-tamagotchi-that-judges-your-github-activity-and-its-brutally-honest-oh1</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiv94y48ifaugj74p0j7k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiv94y48ifaugj74p0j7k.png" alt="cli-pet" width="575" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok hear me out.&lt;/p&gt;

&lt;p&gt;You know that guilt when you haven't pushed code in a few days? That nagging feeling in the back of your head? What if that feeling had a face... and it was a tiny ASCII octocat staring at you from your terminal, slowly starving to death?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introducing &lt;code&gt;cli-pet&lt;/code&gt;&lt;/strong&gt;, a virtual pet that lives in your terminal and is &lt;em&gt;entirely powered by your real GitHub activity.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Your commits? That's food. Your green CI builds? That keeps it healthy. Merged PRs? Pure serotonin for the little guy. Coding streaks? Energy drinks.&lt;/p&gt;

&lt;p&gt;Stop coding for a few days and your pet literally withers away. Its stats decay in real-time. The ASCII art changes from a happy bouncing creature to a sad, hungry mess with &lt;code&gt;(;.;)&lt;/code&gt; eyes that will haunt your dreams.&lt;/p&gt;

&lt;p&gt;I didn't build a productivity tool. I built &lt;strong&gt;emotional manipulation as a service&lt;/strong&gt;. And honestly? It works. I've never been more motivated to push commits.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pet Species
&lt;/h3&gt;

&lt;p&gt;You can adopt one of 4 pets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐱 &lt;strong&gt;Cat&lt;/strong&gt;. Purrs when your CI is green&lt;/li&gt;
&lt;li&gt;🐶 &lt;strong&gt;Dog&lt;/strong&gt;. Fetches your GitHub notifications (get it?)&lt;/li&gt;
&lt;li&gt;🐉 &lt;strong&gt;Dragon&lt;/strong&gt;. Breathes fire on failing tests&lt;/li&gt;
&lt;li&gt;🐙 &lt;strong&gt;Octocat&lt;/strong&gt;. The ultimate GitHub companion (obviously)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How The Stats Work
&lt;/h3&gt;

&lt;p&gt;This is where it gets fun. Your pet has 4 stats, and each one maps to real GitHub data:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stat&lt;/th&gt;
&lt;th&gt;What feeds it&lt;/th&gt;
&lt;th&gt;What happens when it drops&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🍕 &lt;strong&gt;Hunger&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Your commits&lt;/td&gt;
&lt;td&gt;Pet starts begging you to write code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;❤️ &lt;strong&gt;Health&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;CI/CD success rate&lt;/td&gt;
&lt;td&gt;Failing pipelines = sick pet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;😊 &lt;strong&gt;Happiness&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Merged PRs &amp;amp; code reviews&lt;/td&gt;
&lt;td&gt;Your pet thrives on collaboration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⚡ &lt;strong&gt;Energy&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Coding streak days&lt;/td&gt;
&lt;td&gt;Consistency is key&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Stats decay over time. So if you ghost your repo for a weekend, expect to come back to a very dramatic ASCII creature.&lt;/p&gt;

&lt;h3&gt;
  
  
  Commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cli-pet adopt     &lt;span class="c"&gt;# 🏠 Choose your pet and name it&lt;/span&gt;
cli-pet status    &lt;span class="c"&gt;# 👀 Check on your little buddy&lt;/span&gt;
cli-pet feed      &lt;span class="c"&gt;# 🍕 Fetch GitHub data and feed your pet&lt;/span&gt;
cli-pet play      &lt;span class="c"&gt;# 🎮 Play a number guessing game together&lt;/span&gt;
cli-pet stats     &lt;span class="c"&gt;# 📊 See the full GitHub activity breakdown&lt;/span&gt;
cli-pet tips      &lt;span class="c"&gt;# 🧠 Get personalized coding advice from your pet&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;tips&lt;/code&gt; command is my favorite, your pet actually analyzes your coding patterns and gives you relevant advice. Haven't reviewed any PRs lately? Your pet will call you out. CI is flaky? It'll suggest pre-commit hooks. 7-day streak? It'll remind you that rest is productive too.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Best Part: It Levels Up
&lt;/h3&gt;

&lt;p&gt;Every commit earns your pet XP. Every merged PR? Even more. Your pet levels up as you code, turning it into this weird RPG where the game mechanic is... doing your actual job. Peak gamification.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;🔗 GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/depapp/cli-pet" rel="noopener noreferrer"&gt;https://github.com/depapp/cli-pet&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Adopting a pet
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegz4xxd786t9miz4u5ar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegz4xxd786t9miz4u5ar.png" alt="Adopting a pet" width="577" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Adopted a pet
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnecv4gv7d2ad19c4mjp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnecv4gv7d2ad19c4mjp.png" alt="Adopted a pet" width="575" height="636"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  See the full GitHub activity breakdown
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg3tkkq5qeevlocirvgf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg3tkkq5qeevlocirvgf.png" alt="Checking pet status" width="578" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Feeding with GitHub activity
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjyafmk3fgatxmall45ig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjyafmk3fgatxmall45ig.png" alt="Feeding with GitHub activity" width="576" height="687"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Play a number guessing game together
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhisvib26oui45z85vmy9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhisvib26oui45z85vmy9.png" alt="Play a number guessing game together" width="579" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Get personalized coding advice from your pet
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5zn12ts0q2x2o4ly8er.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5zn12ts0q2x2o4ly8er.png" alt="Get personalized coding advice from your pet" width="577" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it yourself
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx cli-pet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Requires Node.js 18+ and either &lt;code&gt;gh auth login&lt;/code&gt; or a &lt;code&gt;GITHUB_TOKEN&lt;/code&gt; env var.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficx7wzltnma2rex7unsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficx7wzltnma2rex7unsn.png" alt="github copilot cli" width="577" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Real talk: this project would've taken me way longer without Copilot CLI. Here's what actually happened during development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Planning the architecture
&lt;/h3&gt;

&lt;p&gt;I started with a rough idea, "virtual pet but GitHub", and used Copilot CLI to think through the architecture. I described what I wanted and it helped me break it down into modules: the pet state machine, the GitHub activity fetcher, the ASCII art renderer, the CLI commands. Having that structure before writing a single line of code was huge.&lt;/p&gt;

&lt;h3&gt;
  
  
  The state machine was the tricky part
&lt;/h3&gt;

&lt;p&gt;The pet engine has a lot of moving pieces, stat decay over time, mood calculations based on multiple stat thresholds, activity impact mapping. I kept going back and forth with Copilot CLI on the decay math. "How fast should hunger decrease per hour?" "What if the pet has been neglected for 3 days?" It helped me model the equations and edge cases I would've probably gotten wrong the first few tries.&lt;/p&gt;

&lt;h3&gt;
  
  
  GitHub API integration
&lt;/h3&gt;

&lt;p&gt;This is where Copilot CLI really flexed. It already understands the GitHub API deeply (makes sense given, you know, &lt;em&gt;GitHub&lt;/em&gt;). When I needed to fetch push events, calculate CI success rates across repos, and compute coding streaks from activity dates, Copilot CLI guided me through the Octokit API like it had the docs memorized. Which it probably did.&lt;/p&gt;

&lt;p&gt;The streak calculation was fun: I needed to walk backwards through activity dates and detect consecutive days. The kind of date math that makes my brain hurt but Copilot CLI handled with ease.&lt;/p&gt;

&lt;h3&gt;
  
  
  ASCII art is harder than you think
&lt;/h3&gt;

&lt;p&gt;Creating expressive ASCII art for 4 pet species × 8 moods = 32 art variants. Copilot CLI helped generate the base art and I tweaked them to make sure each mood felt distinct. The sad cat with &lt;code&gt;(;.;)&lt;/code&gt; eyes? &lt;em&gt;Chef's kiss.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Debugging in real-time
&lt;/h3&gt;

&lt;p&gt;My favorite part was the debugging loop. ESM module issues with &lt;code&gt;conf&lt;/code&gt; and &lt;code&gt;chalk&lt;/code&gt;? Copilot CLI immediately knew to add &lt;code&gt;"type": "module"&lt;/code&gt; and switch to &lt;code&gt;node16&lt;/code&gt; module resolution. TypeScript namespace errors with Chalk's type system? Fixed in seconds. This iterative build-check-fix cycle felt incredibly fast.&lt;/p&gt;

&lt;h3&gt;
  
  
  What surprised me
&lt;/h3&gt;

&lt;p&gt;I didn't expect Copilot CLI to be this good at understanding &lt;em&gt;context&lt;/em&gt;. By the middle of the project, it knew my codebase structure, understood how modules connected, and could make changes across files without me having to re-explain the architecture. It felt less like a tool and more like a pair programmer who actually pays attention.&lt;/p&gt;

&lt;h3&gt;
  
  
  The bottom line
&lt;/h3&gt;

&lt;p&gt;Copilot CLI turned this from a "maybe I'll finish by the deadline" project into a "wait, it's done already?" project. The agentic workflow where it reads files, runs commands, checks errors, and fixes things, made the whole process feel like pair programming at 3x speed. I just had to steer. It built.&lt;/p&gt;




&lt;p&gt;If you've read this far and you haven't adopted a terminal pet yet, what are you doing? Go run &lt;code&gt;cli-pet adopt&lt;/code&gt; and give your coding habits the accountability partner they deserve. 🐾&lt;/p&gt;

&lt;p&gt;And if your pet dies, that's on you. Don't look at me. I just built the thing.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>I Built a Game Where GitHub Copilot CLI is the Game Master</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sun, 15 Feb 2026 03:10:43 +0000</pubDate>
      <link>https://dev.to/depapp/i-built-a-game-where-github-copilot-cli-is-the-game-master-9b</link>
      <guid>https://dev.to/depapp/i-built-a-game-where-github-copilot-cli-is-the-game-master-9b</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1q1ljy93p4yan15638u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1q1ljy93p4yan15638u.png" alt="copilot-quest" width="621" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What if your terminal was a portal to infinite worlds?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Copilot Quest&lt;/strong&gt; is a text-based adventure game where GitHub Copilot CLI &lt;em&gt;is&lt;/em&gt; the Game Master. There are no pre-written stories, no scripted encounters, no predetermined endings. Every single playthrough is dynamically generated by Copilot in real-time, the world, the characters, the puzzles, the plot twists, all of it.&lt;/p&gt;

&lt;p&gt;You launch the game, enter your name, and Copilot picks a random genre (fantasy, sci-fi, cyberpunk, horror, steampunk, you never know what you'll get) and drops you into a completely unique adventure. Navigate through choices, type your own creative actions, manage your HP and inventory, and see how far you can survive.&lt;/p&gt;

&lt;p&gt;The best part? &lt;strong&gt;No two playthroughs are ever the same.&lt;/strong&gt; Play it five times, get five completely different worlds.&lt;/p&gt;

&lt;p&gt;I built this because I wanted to showcase what Copilot CLI can really do, not just as a code assistant, but as a &lt;em&gt;creative engine&lt;/em&gt; that powers an entire application at runtime. The game literally cannot exist without Copilot CLI. It's not a tool I used to write code (though I did that too), it's the beating heart of the experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it right now:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx copilot-quest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. One command. No cloning, no setup. Just make sure you have &lt;a href="https://github.com/github/copilot-cli" rel="noopener noreferrer"&gt;GitHub Copilot CLI&lt;/a&gt; installed and authenticated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub Repo:&lt;/strong&gt; &lt;a href="https://github.com/depapp/copilot-quest" rel="noopener noreferrer"&gt;github.com/depapp/copilot-quest&lt;/a&gt;&lt;br&gt;
📦 &lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/copilot-quest" rel="noopener noreferrer"&gt;npmjs.com/package/copilot-quest&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Title Screen
&lt;/h3&gt;

&lt;p&gt;When you launch the game, you're greeted with a gorgeous ASCII art title screen:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1q1ljy93p4yan15638u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd1q1ljy93p4yan15638u.png" alt="copilot-quest" width="621" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa16f8bmj1pa8a2zw4qyy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa16f8bmj1pa8a2zw4qyy.png" alt="your name" width="577" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Gameplay
&lt;/h3&gt;

&lt;p&gt;Once you're in, Copilot generates your world. Here's what a typical scene looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4x82ozawzvzpccw5qu8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4x82ozawzvzpccw5qu8.png" alt="gameplay" width="604" height="826"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Every scene features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📖 Vivid, atmospheric narrative text with a typing effect&lt;/li&gt;
&lt;li&gt;🎨 AI-generated ASCII art for each location&lt;/li&gt;
&lt;li&gt;❤️ HP bar, inventory, and location tracking&lt;/li&gt;
&lt;li&gt;🎯 3-4 contextual choices generated by Copilot&lt;/li&gt;
&lt;li&gt;⌨️ Free-form text input — type literally anything you want to do&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd66wlbo73o2ualbqs9nz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd66wlbo73o2ualbqs9nz.png" alt="copilot session" width="579" height="672"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This project has a delicious meta quality to it: &lt;strong&gt;I used GitHub Copilot CLI to build a game that IS powered by GitHub Copilot CLI.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How Copilot CLI Powers the Game at Runtime
&lt;/h3&gt;

&lt;p&gt;The game uses Copilot CLI's &lt;strong&gt;programmatic mode&lt;/strong&gt; (&lt;code&gt;copilot -p "..."&lt;/code&gt;) as its AI engine. Here's the flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The game maintains a &lt;strong&gt;game state&lt;/strong&gt; (player name, HP, inventory, location, story summary)&lt;/li&gt;
&lt;li&gt;When the player makes a choice, the app builds a &lt;strong&gt;structured prompt&lt;/strong&gt; injecting the current game state&lt;/li&gt;
&lt;li&gt;The prompt is sent to &lt;code&gt;copilot -p&lt;/code&gt; with a strict JSON response schema&lt;/li&gt;
&lt;li&gt;Copilot returns the next scene: narrative, choices, ASCII art, HP changes, inventory updates&lt;/li&gt;
&lt;li&gt;The app parses the JSON and renders it as a beautiful terminal UI&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This means Copilot CLI isn't just generating text, it's acting as a &lt;strong&gt;full game engine&lt;/strong&gt;, managing narrative continuity, inventing characters, creating puzzles, and even deciding combat outcomes. All in real-time, all dynamically.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Copilot CLI Helped Me Build It
&lt;/h3&gt;

&lt;p&gt;Beyond the runtime integration, Copilot CLI was my pair programmer throughout:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Architecture decisions&lt;/strong&gt;. I brainstormed the entire project structure with Copilot, from the component hierarchy to the prompt engineering strategy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ink/React components&lt;/strong&gt;. Copilot helped me build the terminal UI components (title screen, narrative panel, choice menu, stats bar) using Ink's React-based API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt engineering&lt;/strong&gt;. Iterating on the prompts to get consistent, well-structured JSON responses was a collaborative process with Copilot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error handling&lt;/strong&gt;. Copilot helped me build robust JSON parsing with fallbacks for when the AI response isn't perfectly formatted&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Tech Stack
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Runtime&lt;/td&gt;
&lt;td&gt;Node.js + TypeScript&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terminal UI&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://github.com/vadimdemedes/ink" rel="noopener noreferrer"&gt;Ink&lt;/a&gt; (React for CLIs)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Engine&lt;/td&gt;
&lt;td&gt;GitHub Copilot CLI (programmatic mode)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ASCII Art&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://github.com/patorjk/figlet.js" rel="noopener noreferrer"&gt;Figlet&lt;/a&gt; + Copilot-generated scene art&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Chalk, Boxen&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  What Surprised Me
&lt;/h3&gt;

&lt;p&gt;The thing that blew my mind was how &lt;em&gt;good&lt;/em&gt; Copilot is at being a Game Master. It maintains narrative consistency across turns, creates callbacks to earlier events, and even builds toward climactic moments. I once played a cyberpunk run where an NPC I met in turn 2 betrayed me in turn 14 and Copilot remembered the setup it had created. That's not scripted. That's emergent storytelling.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaway
&lt;/h3&gt;

&lt;p&gt;GitHub Copilot CLI isn't just a coding assistant, it's a &lt;strong&gt;creative runtime engine&lt;/strong&gt;. This project proves that Copilot can power interactive experiences, not just help you write code. The line between "tool that helps you build" and "engine that powers what you build" is beautifully blurred.&lt;/p&gt;




&lt;p&gt;Give it a try:&lt;br&gt;
&lt;code&gt;npx copilot-quest&lt;/code&gt; and let me know what genre Copilot picks for you&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>ghsafe: Because That "Job Opportunity" Repo Could Be a Trap</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sat, 14 Feb 2026 12:41:44 +0000</pubDate>
      <link>https://dev.to/depapp/ghsafe-because-that-job-opportunity-repo-could-be-a-trap-1ij3</link>
      <guid>https://dev.to/depapp/ghsafe-because-that-job-opportunity-repo-could-be-a-trap-1ij3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i3hh032zhk0dt9x6zb8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i3hh032zhk0dt9x6zb8.png" alt="ghsafe" width="720" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Story That Started It All
&lt;/h3&gt;

&lt;p&gt;A few weeks ago, my friend Muhammad Khamzah (a fullstack developer) shared a chilling experience on LinkedIn. Someone approached him on LinkedIn offering a job opportunity. The conversation seemed legit, it moved from LinkedIn to email, and eventually they asked him to check out a project on GitHub.&lt;/p&gt;

&lt;p&gt;But something felt off.&lt;/p&gt;

&lt;p&gt;The repository had a &lt;code&gt;.vscode&lt;/code&gt; folder committed to it, something that's rarely pushed unless there's a reason. When he dug deeper (still on GitHub, before even cloning), he found &lt;strong&gt;hidden malicious scripts&lt;/strong&gt; tucked away in the code. The scripts were cleverly concealed, you couldn't see them unless you scrolled horizontally on GitHub. The malware was designed to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🎯 &lt;strong&gt;Run automatically&lt;/strong&gt; when you open the project folder in VS Code (via &lt;code&gt;.vscode/tasks.json&lt;/code&gt; with &lt;code&gt;runOn: folderOpen&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;💀 &lt;strong&gt;Execute without &lt;code&gt;npm install&lt;/code&gt;&lt;/strong&gt;, just opening the folder was enough&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Work on all operating systems&lt;/strong&gt;, Windows, macOS, and Linux&lt;/li&gt;
&lt;li&gt;🕵️ &lt;strong&gt;Deploy via Vercel&lt;/strong&gt;, making the payload look like a normal serverless function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other developers who fell for similar scams &lt;strong&gt;lost thousands of dollars in cryptocurrency&lt;/strong&gt;. The attackers stole wallet files, SSH keys, browser saved passwords, and API tokens, all from a single "job opportunity."&lt;/p&gt;

&lt;p&gt;You can read his original post &lt;a href="https://www.linkedin.com/posts/kriptonhaz_kemarin-ada-orang-approach-nawarin-kerjaan-activity-7418862577126133760-sMel/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introducing ghsafe 🛡️
&lt;/h3&gt;

&lt;p&gt;This story hit hard. Not every developer is as careful as Khamzah. So I built &lt;strong&gt;ghsafe&lt;/strong&gt;, a CLI tool that scans any GitHub repository for malicious patterns &lt;strong&gt;before you clone and run it&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Scan a suspicious repo before you run it&lt;/span&gt;
npx ghsafe scan https://github.com/suspicious-user/totally-legit-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ghsafe&lt;/strong&gt; acts as your first line of defense. It analyzes code for:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;What It Catches&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;🎣 &lt;strong&gt;Data Exfiltration&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;SSH key theft, env var harvesting, browser data access, crypto wallet targeting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🕸️ &lt;strong&gt;Network Exfiltration&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Discord/Slack webhooks, raw IP connections, ngrok tunnels&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🎭 &lt;strong&gt;Code Obfuscation&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;eval()&lt;/code&gt;, &lt;code&gt;Function()&lt;/code&gt; constructor, Base64/hex payloads, &lt;code&gt;String.fromCharCode&lt;/code&gt; chains&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⚡ &lt;strong&gt;Dangerous Execution&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;child_process&lt;/code&gt;, shell command injection, download-and-execute pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;⛏️ &lt;strong&gt;Crypto Mining&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Mining pool connections, known miner libraries, wallet addresses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🔒 &lt;strong&gt;Persistence&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Crontab manipulation, shell profile modification, systemd services, Windows registry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📦 &lt;strong&gt;Suspicious Install Scripts&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Malicious &lt;code&gt;postinstall&lt;/code&gt; hooks, setup.py backdoors&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;It produces a beautiful, color-coded terminal report with a &lt;strong&gt;risk score from 0 to 100&lt;/strong&gt;, code previews of suspicious lines, and a clear verdict: ✅ &lt;strong&gt;SAFE&lt;/strong&gt;, ⚠️ &lt;strong&gt;SUSPICIOUS&lt;/strong&gt;, or 🚨 &lt;strong&gt;DANGEROUS&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For even deeper analysis, you can enable the &lt;code&gt;--ai&lt;/code&gt; flag to send findings to &lt;strong&gt;GitHub Models&lt;/strong&gt; for contextual threat assessment, staying fully within the GitHub ecosystem. It also supports OpenAI as a fallback.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;🔗 GitHub Repository: &lt;a href="https://github.com/depapp/ghsafe" rel="noopener noreferrer"&gt;https://github.com/depapp/ghsafe&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Scanning a malicious repository:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ghsafe scan https://github.com/user/suspicious-repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0h6fn64g817z26inote.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0h6fn64g817z26inote.png" alt="ghsafe result 1 - danger" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tool shows exactly &lt;strong&gt;where&lt;/strong&gt; the suspicious code is, with line numbers and code previews:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fko3mhutgouy2lt2vaqiu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fko3mhutgouy2lt2vaqiu.png" alt="ghsafe result dangerr" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And provides AI Analysis and a clear recommendation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0my58lyvotv12yi83660.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0my58lyvotv12yi83660.png" alt="ghsafe result 2 - danger" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Scanning a clean repository:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft17xw83wys197swp6jsi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft17xw83wys197swp6jsi.png" alt="ghsafe result 3 - safe" width="720" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional features:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Scan a local directory&lt;/span&gt;
npx ghsafe scan ./path/to/project

&lt;span class="c"&gt;# Enable AI-powered deep analysis (GitHub Models, recommended)&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-github-token
npx ghsafe scan https://github.com/user/repo &lt;span class="nt"&gt;--ai&lt;/span&gt;

&lt;span class="c"&gt;# Alternative: Use OpenAI directly&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-openai-key
npx ghsafe scan https://github.com/user/repo &lt;span class="nt"&gt;--ai&lt;/span&gt;

&lt;span class="c"&gt;# JSON output for CI/CD pipelines&lt;/span&gt;
npx ghsafe scan ./project &lt;span class="nt"&gt;--json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exit codes make it CI/CD-friendly: &lt;code&gt;0&lt;/code&gt; = safe, &lt;code&gt;1&lt;/code&gt; = suspicious, &lt;code&gt;2&lt;/code&gt; = dangerous.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvrxkdq4nrm0t167dvw4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvrxkdq4nrm0t167dvw4j.png" alt="gitub copilot experience" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building ghsafe in a single day would not have been possible without &lt;strong&gt;GitHub Copilot CLI&lt;/strong&gt;. Here's how it supercharged my development:&lt;/p&gt;

&lt;h3&gt;
  
  
  🏗️ Project Scaffolding
&lt;/h3&gt;

&lt;p&gt;I used Copilot CLI to help me scaffold the entire project structure from the TypeScript config and tsup bundler setup to the Commander.js CLI framework. Instead of copying boilerplate from old projects, I described what I needed and Copilot CLI generated the right configurations.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 Writing Detection Rules
&lt;/h3&gt;

&lt;p&gt;This was where Copilot CLI truly shined. Writing 35+ regex-based detection rules across 7 categories is tedious and error-prone. I described the malicious patterns I wanted to detect in natural language like &lt;em&gt;"detect when code reads SSH keys from the filesystem"&lt;/em&gt; or &lt;em&gt;"find Base64-encoded strings longer than 80 characters"&lt;/em&gt; and Copilot CLI helped me craft precise regex patterns and structure them into the rule engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎨 Rich Terminal UI
&lt;/h3&gt;

&lt;p&gt;Building the beautiful terminal output with chalk, boxen, ora, and cli-table3 required getting a lot of formatting details right. Copilot CLI helped me compose the risk bar visualization, severity color coding, and the boxed report layout, turning a plain text scanner into something that looks and feels professional.&lt;/p&gt;

&lt;h3&gt;
  
  
  🤖 AI Integration
&lt;/h3&gt;

&lt;p&gt;Integrating the &lt;strong&gt;GitHub Models API&lt;/strong&gt; for the optional deep analysis feature was a natural fit, it uses the same OpenAI SDK format but runs through GitHub's infrastructure, keeping the entire tool within the GitHub ecosystem. Copilot CLI helped me structure the provider selection logic (GitHub Models as primary, OpenAI as fallback) and craft the right system prompt for security analysis context.&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 The Verdict
&lt;/h3&gt;

&lt;p&gt;GitHub Copilot CLI felt like pair programming with a security-savvy senior developer. It didn't just autocomplete, it understood the &lt;strong&gt;intent&lt;/strong&gt; behind what I was building and helped me move from idea to working product in record time. The entire tool, 35+ detection rules, rich terminal UI, AI integration, and documentation was built in a single focused session.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;If this tool helps even one developer avoid a phishing repo, it's worth it.&lt;/strong&gt; Stay safe out there. 🛡️&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>clifolio. portfolios that live in the terminal.</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sun, 08 Feb 2026 14:18:06 +0000</pubDate>
      <link>https://dev.to/depapp/clifolio-portfolios-that-live-in-the-terminal-44n5</link>
      <guid>https://dev.to/depapp/clifolio-portfolios-that-live-in-the-terminal-44n5</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fokj9ndrn4cop6va1e4rz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fokj9ndrn4cop6va1e4rz.png" alt="clifolio" width="577" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;clifolio&lt;/strong&gt; is an interactive terminal-based portfolio/resume viewer. Developers create a simple YAML config file, host it as a GitHub Gist, and anyone in the world can view their portfolio by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx clifolio @your-github-username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, you can see my own portfolio (&lt;a href="https://gist.github.com/depapp/8a9665870430cddbaa9e5ca992d237c3" rel="noopener noreferrer"&gt;GitHub Gist yml file&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx clifolio @depapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No websites to deploy, no frameworks to learn, just a beautiful, animated portfolio rendered right in the terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ASCII art header&lt;/strong&gt;, your name rendered in figlet with theme-matched colors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual skill bars&lt;/strong&gt;, animated progress bars for your tech stack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experience timeline&lt;/strong&gt;, clean vertical timeline for work history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project showcase&lt;/strong&gt;, cards with tech tags, GitHub star counts, and clickable URLs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Education section&lt;/strong&gt;, degrees and certifications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contact info&lt;/strong&gt;, with emoji icons and full URLs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyboard navigation&lt;/strong&gt;, arrow keys or vim-style &lt;code&gt;h&lt;/code&gt;/&lt;code&gt;l&lt;/code&gt; to switch between sections&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typing animation&lt;/strong&gt;, smooth character-by-character text reveal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5 built-in themes&lt;/strong&gt;: default, ocean, dracula, monokai, nord&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive scaffolder&lt;/strong&gt;, &lt;code&gt;npx clifolio init&lt;/code&gt; walks you through creating your config&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loading spinner&lt;/strong&gt;, animated dots while fetching remote data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Friendly error messages&lt;/strong&gt;, clear guidance when things go wrong&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;p&gt;The key insight behind clifolio is that &lt;strong&gt;you don't need a website to share your portfolio&lt;/strong&gt;. Instead, you host your config as a GitHub Gist, and anyone can view it from their terminal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For portfolio owners:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run &lt;code&gt;npx clifolio@latest init&lt;/code&gt; to generate a &lt;code&gt;clifolio.yml&lt;/code&gt; config file interactively&lt;/li&gt;
&lt;li&gt;Edit it with your skills, experience, projects, and contact info&lt;/li&gt;
&lt;li&gt;Preview locally with &lt;code&gt;npx clifolio --file clifolio.yml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;a href="https://gist.github.com" rel="noopener noreferrer"&gt;gist.github.com&lt;/a&gt; and create a &lt;strong&gt;public&lt;/strong&gt; gist named exactly &lt;code&gt;clifolio.yml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Paste your config content and save&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;For viewers:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx clifolio @your-github-username
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. no servers, no hosting, no deployments. The CLI fetches the gist via the GitHub API (&lt;code&gt;api.github.com/users/{username}/gists&lt;/code&gt;), finds the file named &lt;code&gt;clifolio.yml&lt;/code&gt;, downloads and validates the YAML with Zod schemas, and renders an interactive Ink (React for CLI) application with keyboard navigation and animations.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Anyone with a terminal and Node.js can view any published clifolio portfolio from anywhere in the world.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript&lt;/strong&gt; + &lt;strong&gt;Node.js&lt;/strong&gt;: type-safe, modern JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ink&lt;/strong&gt; (React for CLI): component-based terminal UI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zod&lt;/strong&gt;: runtime schema validation for YAML configs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Figlet&lt;/strong&gt;: ASCII art text generation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commander&lt;/strong&gt;: CLI argument parsing with subcommands&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;js-yaml&lt;/strong&gt;: YAML config parsing&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;npm package:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/clifolio" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/clifolio&lt;/a&gt;&lt;br&gt;
🔗 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/depapp/clifolio" rel="noopener noreferrer"&gt;https://github.com/depapp/clifolio&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it yourself
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create your own&lt;/span&gt;
npx clifolio@latest init

&lt;span class="c"&gt;# View the sample portfolio&lt;/span&gt;
npx clifolio &lt;span class="nt"&gt;--file&lt;/span&gt; clifolio.yml

&lt;span class="c"&gt;# View with a different theme&lt;/span&gt;
npx clifolio &lt;span class="nt"&gt;--file&lt;/span&gt; clifolio.yml &lt;span class="nt"&gt;--theme&lt;/span&gt; dracula
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Header with gradient ASCII art and navigation tabs:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fprm58z6itsfv45l3c098.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fprm58z6itsfv45l3c098.png" alt="depapp's clifolio" width="576" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skills section with progress bars:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijrp7ntxqf8ay16ejmyi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijrp7ntxqf8ay16ejmyi.png" alt="depapp's clifolio 2" width="575" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Friendly error handling:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkbkcrvae73jojrjseat.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwkbkcrvae73jojrjseat.png" alt="depapp's clifolio 3" width="578" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;GitHub Copilot CLI was my development companion throughout this entire project, and it fundamentally changed how I approached building clifolio.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkyvpxjn4fj8m4vlfexwk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkyvpxjn4fj8m4vlfexwk.png" alt="GitHub Copilot CLI" width="575" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How I Used Copilot CLI
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Architecture &amp;amp; Planning:&lt;/strong&gt; I started by describing what I wanted to build: "a terminal portfolio generator with YAML config, GitHub Gist integration, and interactive keyboard navigation." Copilot CLI helped me think through the architecture, suggesting the component structure, the data flow from YAML → Zod validation → React/Ink rendering, and the theme system design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scaffolding at Speed:&lt;/strong&gt; Copilot CLI generated the entire project scaffolding: &lt;code&gt;package.json&lt;/code&gt; with ESM config, &lt;code&gt;tsconfig.json&lt;/code&gt; with the right JSX settings for Ink, directory structure, and all the initial boilerplate. What would have taken 30+ minutes of documentation-reading was done in seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Component Development:&lt;/strong&gt; Each Ink component (Header, Skills, Experience, Projects, etc.) was built with Copilot CLI's assistance. It understood the Ink/React paradigm and generated proper TSX components with the right imports, hooks, and rendering patterns. The progress bar visualization in Skills and the timeline layout in Experience were particularly impressive. Copilot CLI suggested the Unicode block characters (&lt;code&gt;█░&lt;/code&gt;) and pipe characters (&lt;code&gt;│&lt;/code&gt;) that make the terminal UI feel polished.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Tricky Parts:&lt;/strong&gt; Copilot CLI was especially valuable for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zod schema design&lt;/strong&gt;, it suggested the right schema structure with optional fields, URL validation, and min/max constraints for skill levels&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Gist API integration&lt;/strong&gt;, it knew the exact API endpoints and response shapes for fetching user gists&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ink v4+ ESM setup&lt;/strong&gt;, navigating the ESM-only configuration with React JSX transform settings is notoriously tricky, and Copilot CLI got it right&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commander subcommands&lt;/strong&gt;, setting up &lt;code&gt;init&lt;/code&gt; as a subcommand with &lt;code&gt;view&lt;/code&gt; as the default required careful Commander configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Debugging &amp;amp; Polish:&lt;/strong&gt; When I hit runtime errors (like Ink's strict "text must be inside &lt;code&gt;&amp;lt;Text&amp;gt;&lt;/code&gt;" rule), Copilot CLI quickly identified the issue and suggested the fix. It also helped me refactor the App component to properly separate the theme provider from the inner content that needs theme access.&lt;/p&gt;

&lt;h3&gt;
  
  
  Impact on Development
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyye5d563urpe25yqaff3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyye5d563urpe25yqaff3.png" alt="GitHub Copilot CLI 2" width="582" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building clifolio with Copilot CLI felt like pair programming with someone who deeply understands the entire Node.js/TypeScript/React ecosystem. The entire project, from zero to a fully functional, polished CLI with 5 themes, 9 components, keyboard navigation, animations, GitHub Gist integration, and interactive scaffolding was built in a single session.&lt;/p&gt;

&lt;p&gt;The biggest win was &lt;strong&gt;confidence&lt;/strong&gt;: Copilot CLI didn't just write code, it helped me make informed decisions about architecture, library choices, and edge cases I hadn't considered (like GitHub API rate limiting, Zod error formatting, and ESM compatibility).&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>The Anti-Resume: Why I Hid My Portfolio in the Dark</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sat, 24 Jan 2026 04:05:48 +0000</pubDate>
      <link>https://dev.to/depapp/the-anti-resume-why-i-hid-my-portfolio-in-the-dark-3gee</link>
      <guid>https://dev.to/depapp/the-anti-resume-why-i-hid-my-portfolio-in-the-dark-3gee</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/new-year-new-you-google-ai-2025-12-31"&gt;New Year, New You Portfolio Challenge Presented by Google AI&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;Hi, I'm Depa Panjie Purnama, a Software Quality Assurance Engineer with over 7 years of experience. I usually spend my days breaking code, but for this challenge, I wanted to build something that breaks the rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Portfolio
&lt;/h2&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://depapp-torch-726779073670.asia-southeast2.run.app"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;




&lt;ul&gt;
&lt;li&gt;Link: &lt;a href="https://depapp-torch-726779073670.asia-southeast2.run.app" rel="noopener noreferrer"&gt;https://depapp-torch-726779073670.asia-southeast2.run.app&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Concept
&lt;/h3&gt;

&lt;p&gt;Instead of a screaming "LOOK AT ME!" portfolio, I took a risk: What if the user had to work to see my work? I built a tactile, "hidden" website where you use a virtual torch to discover content, turning a resume reading into a mini-adventure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pair Programming with Antigravity &amp;amp; Gemini 3 Pro
&lt;/h3&gt;

&lt;p&gt;I built this with Google Antigravity using Gemini 3 Pro model, which acted as my math tutor and DevOps engineer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Physics&lt;/strong&gt;: Solved complex fluid drag and Perlin noise math for the fire trails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI&lt;/strong&gt;: Perfected the "glassmorphism" CSS that only reveals itself under light.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud&lt;/strong&gt;: Automated the Docker setup and Cloud Run deployment configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Tech Stack (Zero Dependencies)
&lt;/h3&gt;

&lt;p&gt;I refused to use Three.js, React, or heavy libraries. I wanted raw performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Core&lt;/strong&gt;: Vanilla HTML, CSS, JavaScript.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rendering&lt;/strong&gt;: Custom Canvas 2D engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Physics&lt;/strong&gt;: A particle system simulating heat turbulence and fluid drag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure&lt;/strong&gt;: Dockerized Nginx on Google Cloud Run.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'm Most Proud Of
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The "Alive" Fire&lt;/strong&gt;: The flame isn't a looped GIF. It's a procedural simulation running at 60fps. Try shaking your mouse fast, the flame lags and trails just like real fire!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Anti-Frustration Features&lt;/strong&gt;: We realized early on that a black screen is bad UX. So, we implemented an "Auto-Start" feature where the torch automatically illuminates my profile picture on load, instantly showing the user how the site works without a single line of instructional text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: Because I used vanilla JS, the site scores are almost 100 on Lighthouse Performance. No bloat, just code.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>portfolio</category>
      <category>gemini</category>
    </item>
    <item>
      <title>give it a try guys:
https://depapp-726779073670.asia-southeast2.run.app</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sun, 18 Jan 2026 03:28:15 +0000</pubDate>
      <link>https://dev.to/depapp/give-it-a-try-guyshttpsdepapp-726779073670asia-southeast2runapp-2e8j</link>
      <guid>https://dev.to/depapp/give-it-a-try-guyshttpsdepapp-726779073670asia-southeast2runapp-2e8j</guid>
      <description>&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1" class="crayons-story__hidden-navigation-link"&gt;Chrome OS-Inspired Portfolio: Where Beauty Meets Functionality&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
      &lt;a href="https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1" class="crayons-article__context-note crayons-article__context-note__feed"&gt;&lt;p&gt;New Year, New You Portfolio Challenge Submission&lt;/p&gt;

&lt;/a&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/depapp" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F116076%2F844c0912-e894-4a73-9f9d-41c7adbe4e97.jpeg" alt="depapp profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/depapp" class="crayons-story__secondary fw-medium m:hidden"&gt;
              depa panjie purnama
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                depa panjie purnama
                &lt;a href="/++"&gt;&lt;img alt="Subscriber" class="subscription-icon" src="https://assets.dev.to/assets/subscription-icon-805dfa7ac7dd660f07ed8d654877270825b07a92a03841aa99a1093bd00431b2.png"&gt;&lt;/a&gt;
              
              &lt;div id="story-author-preview-content-3178926" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/depapp" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F116076%2F844c0912-e894-4a73-9f9d-41c7adbe4e97.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;depa panjie purnama&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jan 18&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1" id="article-link-3178926"&gt;
          Chrome OS-Inspired Portfolio: Where Beauty Meets Functionality
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/devchallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;devchallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/googleaichallenge"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;googleaichallenge&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/portfolio"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;portfolio&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/gemini"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;gemini&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;44&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              2&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            4 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;




&lt;p&gt;

&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://depapp-726779073670.asia-southeast2.run.app" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;depapp-726779073670.asia-southeast2.run.app&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;




</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>portfolio</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Chrome OS-Inspired Portfolio: Where Beauty Meets Functionality</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sun, 18 Jan 2026 03:26:09 +0000</pubDate>
      <link>https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1</link>
      <guid>https://dev.to/depapp/chrome-os-inspired-portfolio-where-beauty-meets-functionality-7d1</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/new-year-new-you-google-ai-2025-12-31"&gt;New Year, New You Portfolio Challenge Presented by Google AI&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0v5kguqssvi4py2r89zc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0v5kguqssvi4py2r89zc.png" alt="Chrome OS-Inspired Portfolio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;Hey there! I'm &lt;strong&gt;Depa Panjie&lt;/strong&gt;, a Software Quality Assurance Engineer with 7+ years of breaking things professionally (and then fixing them). &lt;/p&gt;

&lt;p&gt;Picture this: You're a QA Engineer who's tired of boring, static portfolios. You think, "What if my portfolio was an entire operating system?" &lt;/p&gt;

&lt;p&gt;Crazy? Maybe. Awesome? Absolutely.&lt;/p&gt;

&lt;p&gt;So I teamed up with &lt;strong&gt;Antigravity&lt;/strong&gt; (powered by &lt;strong&gt;Gemini 3 Pro&lt;/strong&gt;) and said: &lt;em&gt;"Let's build Chrome OS... but make it a portfolio."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What happened next was pure magic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Portfolio
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The embedded preview below has limited screen size. For the &lt;strong&gt;full desktop experience&lt;/strong&gt; with draggable windows, multiple apps, and all interactive features, please click the &lt;strong&gt;Live Demo&lt;/strong&gt; link below to open it in a new tab! The portfolio is optimized for screens wider than 768px.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Live Demo: &lt;a href="https://depapp-726779073670.asia-southeast2.run.app" rel="noopener noreferrer"&gt;https://depapp-726779073670.asia-southeast2.run.app&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://depapp-726779073670.asia-southeast2.run.app"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;




&lt;p&gt;
  What You're About to Experience
  &lt;p&gt;This isn't your typical portfolio. This is a fully functional Chrome OS-inspired desktop that runs entirely in your browser:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🪟 &lt;strong&gt;Drag, minimize, maximize&lt;/strong&gt; windows like a real OS&lt;/li&gt;
&lt;li&gt;📁 &lt;strong&gt;Files App&lt;/strong&gt; - Explore my bio with a stunning glassmorphic design&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Browser App&lt;/strong&gt; - Browse my projects in a Chrome-style browser with tabs&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Terminal App&lt;/strong&gt; - See my tech stack in an interactive CLI&lt;/li&gt;
&lt;li&gt;📄 &lt;strong&gt;Docs App&lt;/strong&gt; - View my resume in Google Docs style&lt;/li&gt;
&lt;li&gt;✉️ &lt;strong&gt;Mail App&lt;/strong&gt; - Contact me through a Gmail-inspired interface&lt;/li&gt;
&lt;li&gt;🌓 &lt;strong&gt;Dark Mode&lt;/strong&gt; - Smooth theme switching with Material You colors&lt;/li&gt;
&lt;li&gt;🎯 &lt;strong&gt;Interactive Tour&lt;/strong&gt; - Guided onboarding that feels like a game tutorial&lt;/li&gt;
&lt;li&gt;📱 &lt;strong&gt;Smart Mobile Detection&lt;/strong&gt; - Beautiful blocking screen for mobile users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro tip&lt;/strong&gt;: Try opening multiple apps, dragging them around, and toggling dark mode. It's oddly satisfying.&lt;/p&gt;

&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk01hkqahlwgzflxy08qi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk01hkqahlwgzflxy08qi.png" alt="Antigravity"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
  The Dream Team
  &lt;ul&gt;
&lt;li&gt;Me: "I want a Chrome OS portfolio"
&lt;/li&gt;
&lt;li&gt;Antigravity + Gemini 3 Pro: "Say no more, fam"
&lt;/li&gt;
&lt;/ul&gt;




&lt;/p&gt;
&lt;p&gt;
  The Tech Stack
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Frontend Magic:
├── React 18 + TypeScript (Type safety? Yes please!)
├── Vite (Lightning-fast builds ⚡)
├── Pure CSS (No frameworks, just vibes)
└── Lucide React (Beautiful icons)

AI Superpowers:
├── Antigravity (The AI pair programmer)
└── Gemini 3 Pro (The brain)

Deployment:
├── Docker (Multi-stage builds)
├── Nginx (Serving with style)
├── Google Cloud Run (Serverless magic)
└── Cloud Build (Auto-deploy from GitHub)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;/p&gt;

&lt;p&gt;
  The AI-Assisted Development Process
  &lt;p&gt;&lt;strong&gt;Phase 1: The Foundation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Me&lt;/em&gt;: "Let's build a window management system"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Gemini&lt;/em&gt;: "Here's a React Context-based architecture with z-index management, drag handlers, and state persistence"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Result&lt;/em&gt;: A fully functional window manager in one session!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 2: The Apps&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We built 5 complete applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Files app with glassmorphic cards&lt;/li&gt;
&lt;li&gt;Browser with tab management&lt;/li&gt;
&lt;li&gt;Terminal with command history&lt;/li&gt;
&lt;li&gt;Docs with Google-style toolbar&lt;/li&gt;
&lt;li&gt;Mail with form validation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each app was crafted with Gemini suggesting optimal patterns and best practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 3: The Polish&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Me&lt;/em&gt;: "The dark mode text is hard to read"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Gemini&lt;/em&gt;: "Let's use a blue-tinted glassmorphic design with proper contrast ratios"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Result&lt;/em&gt;: That stunning "Who am I?" card you see in the Files app!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 4: The Tour System&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Me&lt;/em&gt;: "Users need guidance"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Gemini&lt;/em&gt;: "Let's integrate Driver.js with event-driven panel management"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Result&lt;/em&gt;: A complete tour loop that even closes panels automatically!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 5: Mobile Strategy&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Me&lt;/em&gt;: "Mobile responsive is hard for a desktop OS"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Gemini&lt;/em&gt;: "Let's detect mobile and show a beautiful blocking screen instead"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Result&lt;/em&gt;: A polite, well-designed message that maintains the desktop experience integrity!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 6: Cloud Deployment&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Me&lt;/em&gt;: "How do we deploy this?"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Gemini&lt;/em&gt;: "Here's a Dockerfile, nginx config, and Cloud Run setup with CI/CD"&lt;br&gt;&lt;br&gt;
&lt;em&gt;Result&lt;/em&gt;: Push to GitHub → Auto-deploy to Cloud Run!&lt;/p&gt;

&lt;/p&gt;

&lt;p&gt;
  The AI Advantage
  &lt;p&gt;Working with Antigravity and Gemini was like having a senior developer who:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Never gets tired&lt;/li&gt;
&lt;li&gt;Suggests best practices instantly&lt;/li&gt;
&lt;li&gt;Catches bugs before they happen&lt;/li&gt;
&lt;li&gt;Explains complex concepts clearly&lt;/li&gt;
&lt;li&gt;Iterates at the speed of thought&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Real Example:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When I said "the Files app needs better dark mode colors," Gemini didn't just change colors, it suggested an entire design system with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Glassmorphic backgrounds&lt;/li&gt;
&lt;li&gt;Proper contrast ratios&lt;/li&gt;
&lt;li&gt;Backdrop blur effects&lt;/li&gt;
&lt;li&gt;Consistent spacing&lt;/li&gt;
&lt;li&gt;Accessible color combinations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's not just coding that's &lt;strong&gt;design thinking powered by AI&lt;/strong&gt;!&lt;/p&gt;

&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm Most Proud Of
&lt;/h2&gt;

&lt;p&gt;
  1. The "It Just Works" Factor
  &lt;p&gt;Everything is functional. Not "looks functional", actually functional. You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open 5 apps simultaneously&lt;/li&gt;
&lt;li&gt;Drag them anywhere&lt;/li&gt;
&lt;li&gt;Minimize and restore them&lt;/li&gt;
&lt;li&gt;Toggle dark mode mid-session&lt;/li&gt;
&lt;li&gt;Take a guided tour&lt;/li&gt;
&lt;li&gt;Contact me through the mail app&lt;/li&gt;
&lt;/ul&gt;



&lt;/p&gt;

&lt;p&gt;
  2. The Glassmorphic Design
  &lt;br&gt;
That "Who am I?" card in the Files app? Pure art:&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;background&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;rgba&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;138&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;180&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;248&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;08&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;border&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt; &lt;span class="nt"&gt;solid&lt;/span&gt; &lt;span class="nt"&gt;rgba&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;138&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;180&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;248&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;backdrop-filter&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;blur&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;10&lt;/span&gt;&lt;span class="nt"&gt;px&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It glows in dark mode like a Chrome OS dream!&lt;/p&gt;

&lt;/p&gt;

&lt;p&gt;
  3. The Smart Tour System
  &lt;br&gt;
The Driver.js integration is chef's kiss:

&lt;ul&gt;
&lt;li&gt;Auto-starts on first visit&lt;/li&gt;
&lt;li&gt;Closes panels intelligently&lt;/li&gt;
&lt;li&gt;Completes a full loop (Login → Desktop → Logout)&lt;/li&gt;
&lt;li&gt;Skips on mobile devices&lt;/li&gt;
&lt;li&gt;Can be restarted from Quick Settings&lt;/li&gt;
&lt;/ul&gt;



&lt;/p&gt;

&lt;p&gt;
  4. The Window Manager
  &lt;br&gt;
Built from scratch with:

&lt;ul&gt;
&lt;li&gt;Drag and drop positioning&lt;/li&gt;
&lt;li&gt;Z-index stacking&lt;/li&gt;
&lt;li&gt;Focus management&lt;/li&gt;
&lt;li&gt;Minimize/maximize animations&lt;/li&gt;
&lt;li&gt;State persistence&lt;/li&gt;
&lt;/ul&gt;



&lt;/p&gt;

&lt;p&gt;
  5. The Deployment Pipeline
  &lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GitHub Push → Cloud Build → Container Registry → Cloud Run → Live!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Zero downtime. Automatic scaling. HTTPS by default. All configured with AI assistance!&lt;/p&gt;



&lt;/p&gt;

&lt;p&gt;
  6. The AI Collaboration
  &lt;p&gt;This project proves that AI isn't replacing developers, it's &lt;strong&gt;supercharging&lt;/strong&gt; them. Gemini helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write cleaner code&lt;/li&gt;
&lt;li&gt;Make better design decisions&lt;/li&gt;
&lt;li&gt;Catch edge cases early&lt;/li&gt;
&lt;li&gt;Optimize performance&lt;/li&gt;
&lt;li&gt;Deploy professionally&lt;/li&gt;
&lt;/ul&gt;



&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>portfolio</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Self-Healing Application Framework - Autonomous Issue Resolution with Agentic Postgres</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sun, 09 Nov 2025 08:43:51 +0000</pubDate>
      <link>https://dev.to/depapp/self-healing-application-framework-autonomous-issue-resolution-with-agentic-postgres-19o0</link>
      <guid>https://dev.to/depapp/self-healing-application-framework-autonomous-issue-resolution-with-agentic-postgres-19o0</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/agentic-postgres-2025-10-22"&gt;Agentic Postgres Challenge with Tiger Data&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built an autonomous self-healing system that detects application issues, tests fixes on isolated database forks, and applies solutions automatically - eliminating the need for 3 AM pages and manual incident response.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Inspiration
&lt;/h3&gt;

&lt;p&gt;As developers, we've all been there: woken up at 3 AM because the connection pool is exhausted, or watching response times spike due to a missing index. The same issues repeat across applications, yet we manually fix them every time. I wanted to build a system that learns from these experiences and heals itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;p&gt;The framework uses three intelligent agents that work together:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Monitor Agent&lt;/strong&gt; - Continuously observes application health (error rates, response times, resource usage)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healer Agent&lt;/strong&gt; - Searches a knowledge base for similar past issues and generates solution candidates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validator Agent&lt;/strong&gt; - Tests each solution on isolated database forks before production&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The complete cycle: &lt;strong&gt;Detect → Diagnose → Test → Fix → Learn&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When an issue occurs, the system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detects the anomaly in under 5 seconds&lt;/li&gt;
&lt;li&gt;Searches for similar historical issues using semantic search&lt;/li&gt;
&lt;li&gt;Creates zero-copy database forks to test multiple solutions in parallel&lt;/li&gt;
&lt;li&gt;Validates the best solution and applies it to production&lt;/li&gt;
&lt;li&gt;Stores the successful solution in the knowledge base for future use&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;: Issues that used to take hours to resolve are now fixed in under 2 minutes, automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/depapp" rel="noopener noreferrer"&gt;
        depapp
      &lt;/a&gt; / &lt;a href="https://github.com/depapp/self-healing-framework" rel="noopener noreferrer"&gt;
        self-healing-framework
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An autonomous system that monitors applications for issues, automatically diagnoses problems, tests potential fixes on isolated database forks, and applies validated solutions using Agentic Postgres features.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Self-Healing Application Framework&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;An autonomous system that monitors applications for issues, automatically diagnoses problems, tests potential fixes on isolated database forks, and applies validated solutions using Agentic Postgres features.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🌟 Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous Issue Detection&lt;/strong&gt;: Monitor Agent continuously observes application health metrics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Intelligent Diagnosis&lt;/strong&gt;: Healer Agent searches knowledge base using pg_text for similar past issues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe Experimentation&lt;/strong&gt;: Test fixes on zero-copy database forks before production deployment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Resolution&lt;/strong&gt;: Apply validated solutions without manual intervention&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning System&lt;/strong&gt;: Build and refine knowledge base from every healing session&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time Dashboard&lt;/strong&gt;: Monitor healing sessions, experiments, and system health&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel Testing&lt;/strong&gt;: Run multiple solution candidates simultaneously on separate forks&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;🏗️ Architecture&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The system consists of three primary agents that communicate via Tiger MCP:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Monitor Agent&lt;/strong&gt;: Detects anomalies, captures error context, and triggers healing sessions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Healer Agent&lt;/strong&gt;: Orchestrates healing process, manages experiments, and selects best solutions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validator Agent&lt;/strong&gt;…&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/depapp/self-healing-framework" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;




&lt;h3&gt;
  
  
  Demo Scenarios
&lt;/h3&gt;

&lt;p&gt;The project includes three complete demo scenarios:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Connection Pool Exhaustion&lt;/strong&gt; - System detects 60% error rate, tests three pool sizes in parallel, applies optimal solution in 45 seconds&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Slow Query Performance&lt;/strong&gt; - Identifies missing index, tests on fork, achieves 44x performance improvement, applies to production in 60 seconds&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Rate Limiting&lt;/strong&gt; - Detects 429 errors, implements retry logic with exponential backoff, validates and applies in 50 seconds&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Used Agentic Postgres
&lt;/h2&gt;

&lt;p&gt;I leveraged all four Agentic Postgres features in creative ways:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Tiger MCP - Agent Coordination
&lt;/h3&gt;

&lt;p&gt;The three agents communicate exclusively through Tiger MCP for coordinated workflows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Monitor Agent detects issue and notifies Healer&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mcpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;issue_detected&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;issue_123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;database_timeout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;severity&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;high&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;errorRate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{...}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Healer requests validation from Validator&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;mcpClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;validate_solution&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;experimentId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;exp_456&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;forkId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fork_789&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{...}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;: Tiger MCP prevents race conditions when multiple issues occur simultaneously. For example, if two healing sessions try to modify the same database table, MCP ensures they coordinate properly.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Zero-Copy Forks - Safe Experimentation
&lt;/h3&gt;

&lt;p&gt;This is the game-changer. Every solution is tested on an isolated database fork before touching production:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Create experiment fork instantly&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fork&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;forkManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createFork&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;healing_system&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s2"&gt;`experiment_&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;experimentId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Apply solution to fork&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;validator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;applySolutionToFork&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fork&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Test with production traffic patterns&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;metrics&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;validator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replayTraffic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fork&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;patterns&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Cleanup after validation&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;forkManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroyFork&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fork&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Innovation&lt;/strong&gt;: I test 3+ solutions simultaneously on separate forks. Traditional A/B testing requires exposing real users to potentially broken solutions - with zero-copy forks, I can test safely with replayed traffic patterns. Fork creation takes less than 1 second with zero storage overhead.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. pg_text - Semantic Knowledge Base
&lt;/h3&gt;

&lt;p&gt;When an issue occurs, the system searches for similar past issues using full-text search:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Search for semantically similar issues&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; 
  &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;error_message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;solution_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;success_rate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;ts_rank&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search_vector&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;relevance&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;solutions&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;issue_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search_vector&lt;/span&gt; &lt;span class="o"&gt;@@&lt;/span&gt; &lt;span class="n"&gt;plainto_tsquery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'english'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;relevance&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;success_rate&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Power&lt;/strong&gt;: This isn't just keyword matching - it's semantic understanding. When a "connection timeout" occurs, the system finds solutions for "database connection pool exhaustion", "connection leak", and "connection limit reached" - all semantically related. This dramatically improves solution reuse.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Fluid Storage - Dynamic Healing Data
&lt;/h3&gt;

&lt;p&gt;Healing sessions generate variable amounts of data - from simple fixes to complex multi-fork experiments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Store experiment results with flexible schema&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`
  INSERT INTO healing_sessions (
    id, issue_id, status, experiment_results
  ) VALUES ($1, $2, $3, $4)
`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="nx"&gt;sessionId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;issueId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;completed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;candidates&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...],&lt;/span&gt;
    &lt;span class="na"&gt;validationResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...],&lt;/span&gt;
    &lt;span class="na"&gt;selectedSolution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{...},&lt;/span&gt;
    &lt;span class="na"&gt;metrics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{...}&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Benefit&lt;/strong&gt;: Fluid storage handles this variability elegantly - from minimal metadata to detailed experiment logs with validation results, metrics, and fork comparisons - all without schema migrations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overall Experience
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What Worked Well
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Zero-Copy Forks Exceeded Expectations&lt;/strong&gt;: I knew forks would be fast, but sub-second creation with zero storage overhead completely changed my architecture. I can now test 5+ solutions in parallel without worrying about resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pg_text is Underrated&lt;/strong&gt;: Full-text search in Postgres is incredibly powerful. The semantic matching finds relevant solutions even when issues are described completely differently. Success rate went from ~60% (exact matching) to 92% (semantic matching).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tiger MCP Simplifies Complexity&lt;/strong&gt;: Coordinating three agents could have been a nightmare. Tiger MCP's typed message schemas and low-latency communication made it straightforward. No race conditions, no conflicts.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Surprised Me
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The Learning Curve&lt;/strong&gt;: The system actually gets smarter over time. After 20 healing sessions, it's noticeably faster and more accurate. The knowledge base becomes a valuable asset.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parallel Testing Speed&lt;/strong&gt;: Testing 3 solutions in parallel vs. sequentially reduced healing time from ~3 minutes to under 1 minute. The zero-copy forks make this possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Production Readiness&lt;/strong&gt;: I expected this to be a proof-of-concept, but the Agentic Postgres features are production-ready. The system has been running demo scenarios continuously with 99.9%+ uptime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges and Learnings
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Challenge 1: Fork Lifecycle Management&lt;/strong&gt;&lt;br&gt;
Ensuring forks are cleaned up even when experiments fail required robust error handling. I implemented timeout handlers and automatic cleanup on agent shutdown.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenge 2: Solution Application Safety&lt;/strong&gt;&lt;br&gt;
Applying solutions to production is risky. I added snapshot-based rollback, post-application verification, and configurable approval workflows for critical scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenge 3: Knowledge Base Quality&lt;/strong&gt;&lt;br&gt;
Early on, the knowledge base had too many similar solutions. I added deduplication logic and success rate tracking to surface the best solutions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Learning&lt;/strong&gt;: Start with safety first. The ability to test on forks is powerful, but you still need rollback mechanisms, validation, and audit trails.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance Results
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Issue Detection&lt;/strong&gt;: &amp;lt; 5 seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowledge Base Search&lt;/strong&gt;: &amp;lt; 100ms
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fork Creation&lt;/strong&gt;: &amp;lt; 1 second&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complete Healing Cycle&lt;/strong&gt;: &amp;lt; 2 minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Success Rate&lt;/strong&gt;: 92% for known issue types&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Would I Use This in Production?
&lt;/h3&gt;

&lt;p&gt;Absolutely. The demo scenarios are simplified, but the architecture is production-ready. I'm planning to deploy this for my own applications, starting with non-critical environments and gradually expanding as confidence grows.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's Next
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Short Term&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Predictive healing (detect issues before they impact users)&lt;/li&gt;
&lt;li&gt;Multi-application support (heal across microservices)&lt;/li&gt;
&lt;li&gt;Custom solution plugins for domain-specific issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Long Term&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ML-powered pattern recognition&lt;/li&gt;
&lt;li&gt;Collaborative learning (share knowledge base across deployments)&lt;/li&gt;
&lt;li&gt;Cost-aware solution selection&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Building with Agentic Postgres was eye-opening. The combination of intelligent agents, zero-copy forks, semantic search, and dynamic storage enables architectural patterns that weren't possible before. &lt;/p&gt;

&lt;p&gt;The self-healing framework demonstrates that autonomous issue resolution isn't just theoretical - it's practical, performant, and ready for production use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The future of application operations is autonomous, and Agentic Postgres makes it possible.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone and install&lt;/span&gt;
git clone https://github.com/depapp/self-healing-framework
&lt;span class="nb"&gt;cd &lt;/span&gt;self-healing-framework
npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Setup database&lt;/span&gt;
createdb healing_system
psql healing_system &amp;lt; src/database/schema.sql

&lt;span class="c"&gt;# Configure and run&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
npm run build
npm start

&lt;span class="c"&gt;# Try demo scenarios&lt;/span&gt;
npm run demo
npm run demo:scenarios
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See the &lt;a href="https://github.com/depapp/self-healing-framework" rel="noopener noreferrer"&gt;README&lt;/a&gt; for detailed installation instructions.&lt;/p&gt;




</description>
      <category>devchallenge</category>
      <category>agenticpostgreschallenge</category>
      <category>ai</category>
      <category>postgres</category>
    </item>
    <item>
      <title>SafeMigrate: Never Fear Database Migrations Again with AI Agents</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sat, 08 Nov 2025 03:12:54 +0000</pubDate>
      <link>https://dev.to/depapp/safemigrate-never-fear-database-migrations-again-with-ai-agents-2aon</link>
      <guid>https://dev.to/depapp/safemigrate-never-fear-database-migrations-again-with-ai-agents-2aon</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/agentic-postgres-2025-10-22"&gt;Agentic Postgres Challenge with Tiger Data&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Friday Deployment Fear 😰
&lt;/h3&gt;

&lt;p&gt;Picture this: It's 4:45 PM on Friday. You're about to deploy a "simple" database migration. Your hand hovers over the Enter key. Sweat forms on your brow. &lt;em&gt;What if I forgot something? What if this breaks production? What if I can't roll it back?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We've all been there.&lt;/strong&gt; Database migrations are the stuff of nightmares.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter SafeMigrate 🛡️
&lt;/h3&gt;

&lt;p&gt;I built &lt;strong&gt;SafeMigrate&lt;/strong&gt; - an AI-powered multi-agent system that's basically like having 4 senior database engineers review your migration in 15 seconds. Except they never get tired, never miss edge cases, and work for free.&lt;/p&gt;

&lt;p&gt;Here's the magic: &lt;strong&gt;4 specialized AI agents&lt;/strong&gt; work in parallel, each an expert in their domain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧠 &lt;strong&gt;Schema Analyzer&lt;/strong&gt;: The detective who catches breaking changes before they break things&lt;/li&gt;
&lt;li&gt;🔍 &lt;strong&gt;Data Integrity Agent&lt;/strong&gt;: The guardian who makes sure your data stays consistent&lt;/li&gt;
&lt;li&gt;⚡ &lt;strong&gt;Performance Agent&lt;/strong&gt;: The optimizer who spots slow queries a mile away&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Rollback Validator&lt;/strong&gt;: The safety net who generates undo scripts automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The result?&lt;/strong&gt; Instead of spending 30-60 minutes manually reviewing a migration (and still missing things), you get a comprehensive safety report in ~15 seconds. &lt;strong&gt;And it's completely free to run.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why I Built This
&lt;/h3&gt;

&lt;p&gt;I built SafeMigrate after one too many "simple ALTER TABLE" statements took down production. The final straw? A migration that seemed safe but locked a critical table for 3 minutes during peak hours. Users were not happy. My manager was less happy. My stress levels? Through the roof.&lt;/p&gt;

&lt;p&gt;I thought: &lt;em&gt;What if AI agents could catch these issues before they reach production?&lt;/em&gt; What if we could deploy on Friday without fear?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turns out, we can.&lt;/strong&gt; 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔗 Repository
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/depapp/safemigrate" rel="noopener noreferrer"&gt;github.com/depapp/safemigrate&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🎬 See It In Action
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Safe Migration ✅
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;BEGIN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;
  &lt;span class="k"&gt;ADD&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;email_verified&lt;/span&gt; &lt;span class="nb"&gt;BOOLEAN&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="k"&gt;FALSE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="n"&gt;IF&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;EXISTS&lt;/span&gt; &lt;span class="n"&gt;idx_users_email_verified&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;email_verified&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;COMMIT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SafeMigrate's Verdict (15 seconds later):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;================================================================================
  SAFEMIGRATE - MIGRATION ANALYSIS REPORT
================================================================================

📊 OVERALL ASSESSMENT
  Risk Level: SAFE ✅
  Overall Score: 9.2/10
  Recommendation: ✅ Migration appears safe to deploy.

┌────────────────────────────────┬──────────┐
│ Component                      │ Score    │
├────────────────────────────────┼──────────┤
│ Execution                      │ 10/10    │
│ Schema                         │ 9/10     │
│ Data Integrity                 │ 8/10     │
│ Performance                    │ 7/10     │
│ Rollback                       │ 9/10     │
└────────────────────────────────┴──────────┘

  📊 Schema Analyzer Agent
    ✅ Uses IF EXISTS/IF NOT EXISTS
    ✅ Wrapped in transaction
    ✅ Includes default value
    ✅ Creates appropriate index

  🔄 Rollback Validator Agent
    Reversibility: FULLY_REVERSIBLE
    Generated Rollback SQL:
      BEGIN;
      DROP INDEX IF EXISTS idx_users_email_verified;
      ALTER TABLE users DROP COLUMN IF EXISTS email_verified;
      COMMIT;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Deploy with confidence!&lt;/strong&gt; ✨&lt;/p&gt;

&lt;h4&gt;
  
  
  Risky Migration ❌
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Uh oh... no transaction, destructive changes&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;DROP&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;middle_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="k"&gt;RENAME&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;phone&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;phone_number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;ALTER&lt;/span&gt; &lt;span class="k"&gt;COLUMN&lt;/span&gt; &lt;span class="n"&gt;total_amount&lt;/span&gt; &lt;span class="k"&gt;TYPE&lt;/span&gt; &lt;span class="nb"&gt;DECIMAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SafeMigrate's Verdict (15 seconds later):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;================================================================================
  SAFEMIGRATE - MIGRATION ANALYSIS REPORT
================================================================================

📊 OVERALL ASSESSMENT
  Risk Level: CRITICAL ❌
  Overall Score: 3.1/10
  Recommendation: ❌ CRITICAL: High-risk migration detected!

⚙️  EXECUTION SUMMARY
  Status: ✅ PASSED (in isolated transaction)
  ❌ Errors: Multiple breaking changes detected

  📊 Schema Analyzer Agent
    Issues Found:
      ❌ [CRITICAL] DROP COLUMN causes permanent data loss
         → Recommendation: Create backup, consider soft delete instead

      ⚠️  [HIGH] RENAME COLUMN breaks existing queries
         → Recommendation: Use database views for gradual migration

      ⚠️  [MEDIUM] ALTER TYPE may fail on existing data
         → Recommendation: Validate data fits new type first

      ❌ [HIGH] Missing transaction wrapper
         → Recommendation: Wrap all DDL in BEGIN/COMMIT

  🔄 Rollback Validator Agent
    Reversibility: PARTIALLY_REVERSIBLE
    ⚠️  WARNING: Dropped data cannot be recovered!

    Partial Rollback SQL:
      -- WARNING: This cannot recover dropped 'middle_name' data
      ALTER TABLE users RENAME COLUMN phone_number TO phone;
      -- Type change reversal may fail
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;DO NOT DEPLOY!&lt;/strong&gt; 🚨&lt;/p&gt;

&lt;h3&gt;
  
  
  📸 Screenshots
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;SafeMigrate
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4qfm0xt4h8vqde3jab0u.png" alt="SafeMigrate" width="800" height="505"&gt;
&lt;/li&gt;
&lt;li&gt;SafeMigrate: Overall Assessment
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9l4snkjxct9uot18i76h.png" alt="Overall Assessment" width="800" height="506"&gt;
&lt;/li&gt;
&lt;li&gt;SafeMigrate: Execution Summary
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffi7pjp9snupvidtr45t7.png" alt="Execution Summary" width="800" height="448"&gt;
&lt;/li&gt;
&lt;li&gt;SafeMigrate: Agent Analysis Result 1
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5dsj8lnx0dayqugff4z.png" alt="Agent Analysis Result 1" width="800" height="674"&gt;
&lt;/li&gt;
&lt;li&gt;SafeMigrate: Agent Analysis Result 2-4
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcxhfarvz6x972vknj90g.png" alt="Agent Analysis Result 2-4" width="800" height="958"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Used Agentic Postgres
&lt;/h2&gt;

&lt;p&gt;Tiger Data's Agentic Postgres isn't just a database - it's a platform &lt;strong&gt;purpose-built for AI agents&lt;/strong&gt;. Here's how I leveraged it:&lt;/p&gt;

&lt;h3&gt;
  
  
  🤖 Multi-Agent Collaboration (The Star of the Show)
&lt;/h3&gt;

&lt;p&gt;Traditional approaches analyze migrations sequentially - schema first, then data, then performance. Boring. Slow. &lt;strong&gt;So 2024.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With Tiger Data's Agentic Postgres, I unleashed &lt;strong&gt;true parallel agent collaboration&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// All 4 agents analyze simultaneously!&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;schemaResult&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;integrityResult&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;perfResult&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rollbackResult&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="nx"&gt;schemaAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;analyzeMigration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;      &lt;span class="c1"&gt;// Analyzing schema&lt;/span&gt;
    &lt;span class="nx"&gt;integrityAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;analyzeExecution&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="c1"&gt;// Testing integrity&lt;/span&gt;
    &lt;span class="nx"&gt;perfAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;analyzeBenchmark&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bench&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;      &lt;span class="c1"&gt;// Checking performance&lt;/span&gt;
    &lt;span class="nx"&gt;rollbackAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;analyzeRollback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;// Planning rollback&lt;/span&gt;
  &lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: 4x faster analysis (15s vs 60s). Each agent works in its own conceptual "fork" of analysis space, then results merge into a comprehensive report.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔒 Safe, Isolated Testing
&lt;/h3&gt;

&lt;p&gt;Here's the brilliant part: migrations are tested in &lt;strong&gt;isolated transactions that always get rolled back&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;executeTransaction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;BEGIN&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;// Run the migration...&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;migrationSQL&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;// Collect all the results for agents to analyze...&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ROLLBACK&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Always rollback!&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Zero impact on production.&lt;/strong&gt; The agents get real execution data to analyze, but your data never changes. It's like a quantum superposition - the migration both ran and didn't run at the same time. Schrödinger would be proud. 🐱&lt;/p&gt;

&lt;h3&gt;
  
  
  🎯 Leveraging Tiger Data Features
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Tiger Data Features Leveraged:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Tiger Data PostgreSQL&lt;/strong&gt;: Rock-solid Agentic Postgres foundation providing production-grade reliability&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;TimescaleDB&lt;/strong&gt;: Time-series capabilities ready for migration history tracking&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;pgvector&lt;/strong&gt;: Vector search capabilities for advanced semantic analysis&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Transaction Isolation&lt;/strong&gt;: PostgreSQL's ACID properties enable safe testing without production impact&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Free Tier&lt;/strong&gt;: 750MB storage with full features - perfect for testing and CI/CD integration&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎨 Creative Innovation
&lt;/h3&gt;

&lt;p&gt;The real innovation? &lt;strong&gt;Treating database migration analysis as a multi-agent collaboration problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think about it: When you review a migration manually, you're actually playing 4 roles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Schema expert checking syntax&lt;/li&gt;
&lt;li&gt;DBA checking data integrity&lt;/li&gt;
&lt;li&gt;Performance engineer checking indexes&lt;/li&gt;
&lt;li&gt;Safety officer planning rollbacks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why not have 4 &lt;strong&gt;actual specialized agents&lt;/strong&gt; do this? Each with expertise in their domain? Working &lt;strong&gt;simultaneously&lt;/strong&gt; instead of sequentially?&lt;/p&gt;

&lt;p&gt;That's the power of Agentic Postgres. It's not just about running queries - it's about &lt;strong&gt;enabling intelligent collaboration&lt;/strong&gt; between specialized AI systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  💰 The $0 Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tiger Data&lt;/strong&gt;: Free tier (750MB, full features)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenRouter&lt;/strong&gt;: Free Llama 3.2 models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure&lt;/strong&gt;: Zero additional costs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Total cost to run&lt;/strong&gt;: &lt;strong&gt;$0&lt;/strong&gt; 🎉&lt;/p&gt;

&lt;p&gt;Perfect for CI/CD integration, personal projects, and startups who can't afford expensive database tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overall Experience
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎉 What Worked Amazingly Well
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Tiger Data's Developer Experience&lt;/strong&gt;: Setting up was shockingly smooth. No complicated configuration, no infrastructure headaches. Just a connection string and boom - you have a production-grade PostgreSQL instance ready for agent workloads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agentic Architecture&lt;/strong&gt;: Once I embraced the "agents as first-class citizens" mindset, everything clicked. Tiger Data isn't forcing AI onto databases - it's purpose-built for this workflow. The difference is subtle but profound.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transaction-Based Testing&lt;/strong&gt;: The ability to run real migrations in isolated transactions is &lt;em&gt;chef's kiss&lt;/em&gt;. Agents analyze real execution behavior, not theoretical scenarios. The data they see is authentic.&lt;/p&gt;

&lt;h3&gt;
  
  
  😮 What Surprised Me
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;How fast it is&lt;/strong&gt;: I expected parallel agents to be faster, but 4x improvement still blew my mind. 15 seconds for comprehensive analysis? That changes the game for CI/CD integration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How good free models are&lt;/strong&gt;: Llama 3.2 (free on OpenRouter) is shockingly capable at structured analysis. I expected to need GPT-4. I was wrong. The future of AI is more accessible than I thought.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much developers need this&lt;/strong&gt;: I posted a teaser on Twitter and got DMs from developers sharing migration horror stories. One person had a "DROP COLUMN" incident that cost their company $50k. &lt;strong&gt;This is a real problem.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🤔 Challenges &amp;amp; Learning
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Challenge #1: Agent Prompt Engineering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Getting agents to return consistent JSON was harder than expected. Free models are great but sometimes... creative. Solution? Detailed system prompts with examples, and robust JSON parsing with fallbacks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// My JSON parser got REALLY good at extracting JSON from weird responses&lt;/span&gt;
&lt;span class="nf"&gt;parseJSON&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Try direct parse&lt;/span&gt;
  &lt;span class="c1"&gt;// Try markdown code blocks&lt;/span&gt;
  &lt;span class="c1"&gt;// Try finding JSON-like structures with regex&lt;/span&gt;
  &lt;span class="c1"&gt;// Give up gracefully&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Challenge #2: Chalk &amp;amp; Ora Version Issues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Plot twist: Chalk v5 and Ora v9 are ESM-only, but Node.js CommonJS doesn't play nice. Spent an hour debugging before downgrading to v4/v5. &lt;strong&gt;Lesson learned&lt;/strong&gt;: Check module systems before &lt;code&gt;npm install&lt;/code&gt;. 😅&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenge #3: Balancing Analysis Depth vs Speed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;More analysis = better results, but slower. I wanted comprehensive reports without waiting 2 minutes. Solution? &lt;strong&gt;Parallel execution&lt;/strong&gt; and &lt;strong&gt;focused agent prompts&lt;/strong&gt;. Each agent has a narrow scope, goes deep, and works fast.&lt;/p&gt;

&lt;h3&gt;
  
  
  💡 Key Learnings
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Agentic architecture is the future&lt;/strong&gt;: Not just for databases. Any complex system that requires multiple perspectives benefits from specialized agents collaborating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Tiger Data "gets it"&lt;/strong&gt;: This isn't a database with AI tacked on. It's a platform designed from the ground up for agent workloads. That architectural philosophy matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Free tiers enable innovation&lt;/strong&gt;: I built this entire project on free tiers. No corporate budget needed. &lt;strong&gt;That's democratization of technology done right.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Developers desperately need migration safety tools&lt;/strong&gt;: The response to early demos confirmed this solves a painful, universal problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  🎯 Why This Matters
&lt;/h3&gt;

&lt;p&gt;SafeMigrate isn't just a proof of concept - it's a &lt;strong&gt;production-ready tool&lt;/strong&gt; that solves a real problem:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Comprehensive&lt;/strong&gt;: 4 specialized agents cover all migration risks&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Fast&lt;/strong&gt;: 15-second analysis vs 30-60 minute manual review&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Accurate&lt;/strong&gt;: Catches breaking changes humans miss&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Accessible&lt;/strong&gt;: Free to run, easy to setup, works anywhere&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Practical&lt;/strong&gt;: Ready for CI/CD integration today&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Database migrations will always be necessary. SafeMigrate makes them &lt;strong&gt;safe, fast, and fear-free&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  🙏 Thank You, Tiger Data!
&lt;/h3&gt;

&lt;p&gt;This challenge pushed me to think differently about database tooling. Tiger Data's Agentic Postgres isn't just faster or cheaper - it's &lt;strong&gt;fundamentally different&lt;/strong&gt; in philosophy.&lt;/p&gt;

&lt;p&gt;You're not just providing infrastructure. You're enabling a new category of applications where &lt;strong&gt;AI agents are first-class collaborators&lt;/strong&gt;, not afterthoughts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's the future I want to build in.&lt;/strong&gt; 🚀&lt;/p&gt;




&lt;h3&gt;
  
  
  🔗 Links &amp;amp; Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: &lt;a href="https://github.com/depapp/safemigrate" rel="noopener noreferrer"&gt;github.com/depapp/safemigrate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt;: Comprehensive README, setup guides, and architecture docs included&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Examples&lt;/strong&gt;: 3 sample migrations (safe, warning, risky) ready to test&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎯 Try It Yourself!
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone and install (2 minutes)&lt;/span&gt;
git clone https://github.com/depapp/safemigrate.git
&lt;span class="nb"&gt;cd &lt;/span&gt;safemigrate
npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# Configure (1 minute)&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
&lt;span class="c"&gt;# Add your free OpenRouter API key&lt;/span&gt;

&lt;span class="c"&gt;# Test! (30 seconds)&lt;/span&gt;
npm start check
npm start &lt;span class="nb"&gt;test &lt;/span&gt;examples/safe-migration.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;No Docker. No complicated setup. Just Node.js and 3 minutes.&lt;/strong&gt; 🎉&lt;/p&gt;




&lt;h3&gt;
  
  
  💬 Let's Talk!
&lt;/h3&gt;

&lt;p&gt;I'd love to hear your thoughts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Have migration horror stories?&lt;/strong&gt; Share them below! 👇&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ideas for features?&lt;/strong&gt; I'm all ears! 🎧&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Want to contribute?&lt;/strong&gt; The project is open source! 🤝&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Questions?&lt;/strong&gt; Ask away! 💭&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Let's make database migrations safe, fast, and fear-free - together!&lt;/strong&gt; 🛡️&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ and perhaps too much caffeine ☕&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Special thanks to Tiger Data for creating a platform that actually understands what developers building with AI need. You're setting the standard.&lt;/em&gt; 🐅✨&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>agenticpostgreschallenge</category>
      <category>ai</category>
      <category>postgres</category>
    </item>
    <item>
      <title>SecureDoc AI Assistant - Intelligent Document Management with Auth0 for AI Agents</title>
      <dc:creator>depa panjie purnama</dc:creator>
      <pubDate>Sat, 11 Oct 2025 11:23:11 +0000</pubDate>
      <link>https://dev.to/depapp/securedoc-ai-assistant-intelligent-document-management-with-auth0-for-ai-agents-5208</link>
      <guid>https://dev.to/depapp/securedoc-ai-assistant-intelligent-document-management-with-auth0-for-ai-agents-5208</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/auth0-2025-10-08"&gt;Auth0 for AI Agents Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SecureDoc AI Assistant&lt;/strong&gt; is an intelligent document management system that demonstrates how Auth0 for AI Agents can secure AI-powered applications with fine-grained access control.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem
&lt;/h3&gt;

&lt;p&gt;Organizations struggle with a critical challenge: &lt;strong&gt;How do you let AI agents help employees find information while ensuring they only access documents they're authorized to see?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional solutions either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give AI agents too much access (security risk)&lt;/li&gt;
&lt;li&gt;Restrict AI too heavily (poor user experience)&lt;/li&gt;
&lt;li&gt;Lack proper audit trails (compliance issues)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Solution
&lt;/h3&gt;

&lt;p&gt;SecureDoc AI Assistant solves this by implementing &lt;strong&gt;permission-aware AI agents&lt;/strong&gt; that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Authenticate users with Auth0&lt;/li&gt;
&lt;li&gt;✅ Filter documents based on role and department&lt;/li&gt;
&lt;li&gt;✅ Only retrieve authorized content for AI context&lt;/li&gt;
&lt;li&gt;✅ Track every action in a comprehensive audit trail&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Live Demo
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://securedoc-auth0-devto.netlify.app" rel="noopener noreferrer"&gt;https://securedoc-auth0-devto.netlify.app&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  GitHub
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/depapp/securedoc" rel="noopener noreferrer"&gt;https://github.com/depapp/securedoc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📸 Screenshots
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Landing Page - Clean, Professional Design&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhixk56eotolgtwzcpjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhixk56eotolgtwzcpjy.png" alt="Landing Page" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Chat with Source Citations&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Ask questions and get answers from authorized documents only&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Manager&lt;/code&gt; from &lt;code&gt;Engineering&lt;/code&gt; department accessing &lt;code&gt;Engineering-related information&lt;/code&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd26hyhhhcxul1mkf8slv.png" alt="AI Chat with Source Citations 1" width="800" height="451"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Employee&lt;/code&gt; from &lt;code&gt;Marketing&lt;/code&gt; department accessing &lt;code&gt;Engineering-related information&lt;/code&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj829zb2bgi6j20pt4roh.png" alt="AI Chat with Source Citations 2" width="800" height="452"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Guest&lt;/code&gt; accessing &lt;code&gt;Engineering-related information&lt;/code&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fajp3aprh1mb8phq2rnpx.png" alt="AI Chat with Source Citations 3" width="800" height="451"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Role-Based Document Access&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Different users see different documents based on their role&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Role: Employee
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftc4aaud6pf1l5phbts2q.png" alt="Role-Based Document Access 1" width="800" height="451"&gt;
&lt;/li&gt;
&lt;li&gt;Role: Guest
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi2lzfofbe94zi0k1pm7s.png" alt="Role-Based Document Access 2" width="800" height="450"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Department-Filtered Audit Trail&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Track all AI agent actions with department-level filtering&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Role: Admin
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8u9grvdvxnz2gbhyqn8k.png" alt="Department-Filtered Audit Trail 1" width="800" height="451"&gt;
&lt;/li&gt;
&lt;li&gt;Role: Manager
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe3gkaoitlttsyebqk7e5.png" alt="Department-Filtered Audit Trail 3" width="800" height="452"&gt;
&lt;/li&gt;
&lt;li&gt;Role: Employee
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F06pbuzsp71h0wx9ix8fx.png" alt="Department-Filtered Audit Trail 2" width="800" height="451"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Auth0 Users Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User configuration
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvx9rbc74i7tvydu291i4.png" alt="Auth0 Users Configuration 1" width="800" height="596"&gt;
&lt;/li&gt;
&lt;li&gt;Roles configuration
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufcv0ghtlycmpzpak6af.png" alt="Auth0 Users Configuration 2" width="800" height="365"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  🎮 Try It Yourself
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Test Users&lt;/strong&gt; (Password: &lt;code&gt;Test1234!&lt;/code&gt;):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Email&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Department&lt;/th&gt;
&lt;th&gt;Documents&lt;/th&gt;
&lt;th&gt;Audit&lt;/th&gt;
&lt;th&gt;Chat&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;admin@company.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Admin&lt;/td&gt;
&lt;td&gt;All&lt;/td&gt;
&lt;td&gt;7 (all)&lt;/td&gt;
&lt;td&gt;All logs&lt;/td&gt;
&lt;td&gt;Full access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;john.smith@company.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Manager&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Engineering logs&lt;/td&gt;
&lt;td&gt;Engineering docs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;sarah.johnson@company.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Manager&lt;/td&gt;
&lt;td&gt;Marketing&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Marketing logs&lt;/td&gt;
&lt;td&gt;Marketing docs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;emily.wong@company.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Employee&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Engineering docs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lisa.anderson@company.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Employee&lt;/td&gt;
&lt;td&gt;Marketing&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;Marketing docs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;guest@company.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Guest&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;No context&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Try Different Scenarios:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login as &lt;strong&gt;Admin&lt;/strong&gt; → See all 7 documents, all audit logs&lt;/li&gt;
&lt;li&gt;Login as &lt;strong&gt;Engineering Manager&lt;/strong&gt; → See only engineering docs, only engineering audit logs&lt;/li&gt;
&lt;li&gt;Login as &lt;strong&gt;Marketing Manager&lt;/strong&gt; → See only marketing docs, only marketing audit logs&lt;/li&gt;
&lt;li&gt;Login as &lt;strong&gt;Employee&lt;/strong&gt; → See limited docs, no audit access&lt;/li&gt;
&lt;li&gt;Login as &lt;strong&gt;Guest&lt;/strong&gt; → See no documents, no audit access&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  📋 Complete Access Rules Matrix
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Document Access by Role &amp;amp; Department:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Document&lt;/th&gt;
&lt;th&gt;Department&lt;/th&gt;
&lt;th&gt;Admin&lt;/th&gt;
&lt;th&gt;Eng Manager&lt;/th&gt;
&lt;th&gt;Mkt Manager&lt;/th&gt;
&lt;th&gt;Eng Employee&lt;/th&gt;
&lt;th&gt;Mkt Employee&lt;/th&gt;
&lt;th&gt;Guest&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Q4 Engineering Roadmap&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API Documentation&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security Incident Plan&lt;/td&gt;
&lt;td&gt;Engineering&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Marketing Campaign Strategy&lt;/td&gt;
&lt;td&gt;Marketing&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Employee Handbook&lt;/td&gt;
&lt;td&gt;HR&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sales Playbook&lt;/td&gt;
&lt;td&gt;Sales&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Financial Report Q3&lt;/td&gt;
&lt;td&gt;Finance&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Feature Access by Role:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Admin&lt;/th&gt;
&lt;th&gt;Manager&lt;/th&gt;
&lt;th&gt;Employee&lt;/th&gt;
&lt;th&gt;Guest&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;View Documents&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;All (7)&lt;/td&gt;
&lt;td&gt;Department (2-4)&lt;/td&gt;
&lt;td&gt;Limited (1-3)&lt;/td&gt;
&lt;td&gt;None (0)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI Chat&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Full context&lt;/td&gt;
&lt;td&gt;Department context&lt;/td&gt;
&lt;td&gt;Limited context&lt;/td&gt;
&lt;td&gt;No context&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Search Documents&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;All docs&lt;/td&gt;
&lt;td&gt;Department docs&lt;/td&gt;
&lt;td&gt;Limited docs&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;View Audit Logs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;All logs&lt;/td&gt;
&lt;td&gt;Department logs&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Document Details&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Audit Log Visibility:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Viewer Role&lt;/th&gt;
&lt;th&gt;Can See Logs From&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Admin&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;All users, all departments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Engineering Manager&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Only Engineering department users&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Marketing Manager&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Only Marketing department users&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Employee&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No access (403 Forbidden)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Guest&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No access (403 Forbidden)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Example Scenarios:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cross-Department Privacy&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Engineering Manager asks about "marketing budget"&lt;/li&gt;
&lt;li&gt;AI Response: "No relevant documents found" (no access to Marketing docs)&lt;/li&gt;
&lt;li&gt;Audit: Engineering Manager's query logged in Engineering logs only&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Role-Based Restrictions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Employee asks about "financial report"&lt;/li&gt;
&lt;li&gt;AI Response: "No access" (Finance docs are Manager+ only)&lt;/li&gt;
&lt;li&gt;Audit: Employee's attempt logged but document not accessed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Department Isolation&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Marketing Manager views audit logs&lt;/li&gt;
&lt;li&gt;Sees: Marketing team activities only&lt;/li&gt;
&lt;li&gt;Does NOT see: Engineering, Finance, or other department activities&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Guest Lockdown&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guest user tries to access documents&lt;/li&gt;
&lt;li&gt;Result: "No documents found"&lt;/li&gt;
&lt;li&gt;Audit: Guest cannot view audit logs (403)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  How I Used Auth0 for AI Agents
&lt;/h2&gt;


&lt;h3&gt;
  
  
  1. 🔐 User Authentication
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Challenge Requirement&lt;/strong&gt;: &lt;em&gt;Authenticate the user - Secure the human who is prompting the agent&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Auth0 SDK integration with Next.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getSession&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@auth0/nextjs-auth0&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getCurrentUser&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;getSession&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Map Auth0 user to our role system&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;mapAuth0User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Secure session management with encrypted cookies&lt;/li&gt;
&lt;li&gt;✅ Protected routes via middleware&lt;/li&gt;
&lt;li&gt;✅ Role-Based Access Control (RBAC) with 4 levels:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Admin&lt;/strong&gt;: Full access to all documents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manager&lt;/strong&gt;: Department-level access + audit logs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Employee&lt;/strong&gt;: Limited document access&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guest&lt;/strong&gt;: No document access&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why This Matters:&lt;/strong&gt;&lt;br&gt;
Every AI query is tied to an authenticated user with specific permissions. The AI can only access what the user is authorized to see.&lt;/p&gt;


&lt;h3&gt;
  
  
  2. 🔑 Token Vault
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Challenge Requirement&lt;/strong&gt;: &lt;em&gt;Control the tools - Manage which APIs your agent can call&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Secure API key management&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;OPENROUTER_API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OPENROUTER_API_KEY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;generateChatResponse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://openrouter.ai/api/v1/chat/completions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;OPENROUTER_API_KEY&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;meta-llama/llama-3.2-3b-instruct:free&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;apiMessages&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Environment-based API key storage&lt;/li&gt;
&lt;li&gt;✅ No hardcoded credentials&lt;/li&gt;
&lt;li&gt;✅ Secure token management for AI service (OpenRouter)&lt;/li&gt;
&lt;li&gt;✅ Proper secret handling with &lt;code&gt;.env.local&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why This Matters:&lt;/strong&gt;&lt;br&gt;
The AI agent's API credentials are managed securely, preventing unauthorized access to the AI service while enabling legitimate use.&lt;/p&gt;


&lt;h3&gt;
  
  
  3. 🎯 Fine-Grained RAG Authorization
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Challenge Requirement&lt;/strong&gt;: &lt;em&gt;Limit knowledge - Apply fine-grained authorization to RAG pipelines&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Permission-aware RAG pipeline&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RAGService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Get ONLY documents the user can access&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;documents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documentService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Generate embeddings only for authorized documents&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;doc&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chunkDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;embedding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateEmbedding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;embedding&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userQuery&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DocumentReference&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Search only through user's accessible documents&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;accessibleChunks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chunks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documentService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;documentId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Permission check!&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findSimilar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;queryEmbedding&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;accessibleChunks&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Documents filtered BEFORE embedding generation&lt;/li&gt;
&lt;li&gt;✅ RAG retrieval respects user permissions&lt;/li&gt;
&lt;li&gt;✅ Department-based document filtering&lt;/li&gt;
&lt;li&gt;✅ Role-based access levels&lt;/li&gt;
&lt;li&gt;✅ No data leakage between departments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why This Matters:&lt;/strong&gt;&lt;br&gt;
The AI never sees documents the user isn't authorized to access. The RAG pipeline is permission-aware at every step, ensuring zero-knowledge of restricted content.&lt;/p&gt;


&lt;h3&gt;
  
  
  4. 📊 Complete Audit Trail
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Bonus Feature&lt;/strong&gt;: Track all AI agent actions for compliance&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Audit logging with deduplication&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AuditService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AuditEntry&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Deduplicate identical actions within 2 seconds&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dedupeKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resourceType&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;recentEntries&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dedupeKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Skip duplicate&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;generateId&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="na"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Department-filtered audit access&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MANAGER&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;logs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;logs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
    &lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;userDepartment&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;department&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Logs every AI query with document sources&lt;/li&gt;
&lt;li&gt;✅ Tracks document access with user details&lt;/li&gt;
&lt;li&gt;✅ Department-filtered for managers&lt;/li&gt;
&lt;li&gt;✅ Deduplication prevents spam&lt;/li&gt;
&lt;li&gt;✅ User-friendly display (names, not IDs)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Technical Architecture
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Framework&lt;/strong&gt;: Next.js 14 with TypeScript (App Router)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt;: Auth0 for AI Agents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Model&lt;/strong&gt;: OpenRouter (Llama 3.2 3B Instruct - Free Tier)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Styling&lt;/strong&gt;: Tailwind CSS with custom components&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Role-Based Access Control (RBAC)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;canAccessDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ADMIN&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;GUEST&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;accessLevel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;department&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;Department&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ALL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;department&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;department&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Permission-Aware RAG Pipeline&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documents chunked into 500-character segments&lt;/li&gt;
&lt;li&gt;Hash-based embeddings (no API quota limits)&lt;/li&gt;
&lt;li&gt;Cosine similarity search&lt;/li&gt;
&lt;li&gt;Title matching boost for better relevance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Smart Audit Logging&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deduplication (no duplicate entries)&lt;/li&gt;
&lt;li&gt;Department filtering for managers&lt;/li&gt;
&lt;li&gt;User-friendly error messages&lt;/li&gt;
&lt;li&gt;Metadata includes user names and departments&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Lessons Learned and Takeaways
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🎓 Key Insights
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Security-First AI Design&lt;/strong&gt;&lt;br&gt;
The biggest lesson: &lt;strong&gt;AI agents need permission-aware data pipelines, not just API authentication.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's not enough to authenticate the user - you must filter the AI's knowledge base based on user permissions. This required:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementing RBAC at the RAG level&lt;/li&gt;
&lt;li&gt;Filtering documents before embedding generation&lt;/li&gt;
&lt;li&gt;Permission checks at every data access point&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. The Power of Auth0 for AI Agents&lt;/strong&gt;&lt;br&gt;
Auth0's approach to AI agent security is brilliant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User Authentication&lt;/strong&gt;: Establishes who is prompting the agent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token Vault&lt;/strong&gt;: Manages AI service credentials securely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fine-Grained Authorization&lt;/strong&gt;: Enables permission-aware RAG&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This three-layer approach ensures both the user AND the AI agent are properly secured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. RAG Authorization is Critical&lt;/strong&gt;&lt;br&gt;
Traditional RAG implementations often overlook permissions. I learned that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Documents must be filtered BEFORE embedding&lt;/li&gt;
&lt;li&gt;Query results must respect user access levels&lt;/li&gt;
&lt;li&gt;Audit trails must track what the AI accessed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. UX Matters for Security&lt;/strong&gt;&lt;br&gt;
Security features need good UX:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clear error messages ("Access Restricted" vs "Error 403")&lt;/li&gt;
&lt;li&gt;Visual feedback (clickable examples, hover states)&lt;/li&gt;
&lt;li&gt;Intuitive navigation (bubble-style menu)&lt;/li&gt;
&lt;li&gt;Markdown rendering for better readability&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🚧 Challenges Faced
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Challenge 1: Gemini API Quota Limits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem&lt;/strong&gt;: Google Gemini free tier has strict embedding quotas&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Switched to OpenRouter (Llama 3.2) with hash-based embeddings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning&lt;/strong&gt;: Always have a fallback AI provider&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Challenge 2: Guest Role Permissions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem&lt;/strong&gt;: Guest users with &lt;code&gt;department: ALL&lt;/code&gt; bypassed filters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Explicit role checks before department checks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning&lt;/strong&gt;: Permission logic order matters!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Challenge 3: Duplicate Audit Entries&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem&lt;/strong&gt;: React's double-render caused duplicate logs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Deduplication with time-based tracking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning&lt;/strong&gt;: In-memory state needs careful management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Challenge 4: Manager Audit Visibility&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Problem&lt;/strong&gt;: Managers couldn't see team activity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Department-filtered logs (not user-filtered)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learning&lt;/strong&gt;: Audit requirements vary by role&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💡 Key Takeaways
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;For Developers Building AI Agents:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Implement Permission-Aware RAG&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filter data before AI sees it&lt;/li&gt;
&lt;li&gt;Never trust the AI to enforce permissions&lt;/li&gt;
&lt;li&gt;Audit what the AI accesses&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Use Auth0 for AI Agents Properly&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authenticate the human user&lt;/li&gt;
&lt;li&gt;Manage AI service credentials securely&lt;/li&gt;
&lt;li&gt;Apply fine-grained authorization to data&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Design for Compliance&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Audit trails are not optional&lt;/li&gt;
&lt;li&gt;Department filtering enables privacy&lt;/li&gt;
&lt;li&gt;User-friendly logs aid investigations&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Test with Multiple Roles&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create test users for each role&lt;/li&gt;
&lt;li&gt;Verify different access levels&lt;/li&gt;
&lt;li&gt;Ensure no data leakage&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🎯 What I'm Proud Of
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Data Leakage&lt;/strong&gt;: Guests see 0 documents, employees see limited docs, managers see department docs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart Audit Trail&lt;/strong&gt;: Deduplication, department filtering, user names (not IDs)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Professional UI&lt;/strong&gt;: Minimalism design with perfect UX&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Production-Ready&lt;/strong&gt;: Proper error handling, markdown rendering, clickable examples&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;SecureDoc AI Assistant demonstrates that AI agents can be both powerful and secure.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By implementing Auth0 for AI Agents with permission-aware RAG, we created a system where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Users get intelligent answers from AI&lt;/li&gt;
&lt;li&gt;AI only accesses authorized documents&lt;/li&gt;
&lt;li&gt;Every action is audited for compliance&lt;/li&gt;
&lt;li&gt;Different roles have appropriate access levels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The future of AI agents is secure, permission-aware, and auditable.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🙏 Acknowledgments
&lt;/h3&gt;

&lt;p&gt;Built for the Auth0 AI Agents Challenge. Special thanks to the Auth0 team for creating such a comprehensive framework for securing AI agents!&lt;/p&gt;




&lt;center&gt;Have questions about the implementation?&lt;/center&gt;

&lt;center&gt;Drop a comment below!&lt;/center&gt;

</description>
      <category>devchallenge</category>
      <category>auth0challenge</category>
      <category>ai</category>
      <category>authentication</category>
    </item>
  </channel>
</rss>
