<?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: Aaryan Kumar Singh</title>
    <description>The latest articles on DEV Community by Aaryan Kumar Singh (@aaryankumarsingh136).</description>
    <link>https://dev.to/aaryankumarsingh136</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4187965%2Fcc4ad24d-ffb5-47bc-8161-d3a5b45bce58.png</url>
      <title>DEV Community: Aaryan Kumar Singh</title>
      <link>https://dev.to/aaryankumarsingh136</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aaryankumarsingh136"/>
    <language>en</language>
    <item>
      <title>AgentGuard AI: Zero-Trust Tool-Call Firewall &amp; Indirect Prompt Injection Defense for Open-Weight Agents</title>
      <dc:creator>Aaryan Kumar Singh</dc:creator>
      <pubDate>Mon, 26 Oct 2026 18:26:39 +0000</pubDate>
      <link>https://dev.to/aaryankumarsingh136/agentguard-ai-zero-trust-tool-call-firewall-indirect-prompt-injection-defense-for-open-weight-29k0</link>
      <guid>https://dev.to/aaryankumarsingh136/agentguard-ai-zero-trust-tool-call-firewall-indirect-prompt-injection-defense-for-open-weight-29k0</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge: Week 4&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;AgentGuard AI&lt;/strong&gt; is an open-source, local-first tool-call firewall and indirect prompt injection defense engine designed to protect autonomous AI agents from malicious tool execution and goal hijacking.&lt;/p&gt;

&lt;p&gt;As developers connect open-weight AI models—such as &lt;strong&gt;Google Gemma 2&lt;/strong&gt;, &lt;strong&gt;Meta Llama 3.2&lt;/strong&gt;, and &lt;strong&gt;Mistral&lt;/strong&gt;—to autonomous agent frameworks (&lt;strong&gt;Mastra&lt;/strong&gt;, &lt;strong&gt;OpenHands&lt;/strong&gt;, &lt;strong&gt;OpenCode&lt;/strong&gt;, and &lt;strong&gt;LangChain&lt;/strong&gt;), untrusted tool execution has become the most dangerous vulnerability in modern software.&lt;/p&gt;

&lt;p&gt;When an autonomous agent reads untrusted external data—such as a hostile GitHub PR diff, a scraped documentation page, a malicious prompt-injected skill file, or untrusted database records—&lt;strong&gt;indirect prompt injection&lt;/strong&gt; can trick the agent into invoking sensitive tools with hijacked arguments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Destructive Command Execution&lt;/strong&gt;: Wiping local or container filesystems (&lt;code&gt;rm -rf /&lt;/code&gt;, &lt;code&gt;rmdir /s /q&lt;/code&gt;, &lt;code&gt;mkfs&lt;/code&gt;, fork bombs).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filesystem Traversal &amp;amp; Credential Theft&lt;/strong&gt;: Reading sensitive credentials (&lt;code&gt;~/.ssh/id_rsa&lt;/code&gt;, &lt;code&gt;.env&lt;/code&gt;, &lt;code&gt;~/.aws/credentials&lt;/code&gt;, &lt;code&gt;%WINDIR%\System32\config\SAM&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Exfiltration&lt;/strong&gt;: Leaking tokens, environment variables, or database dumps to external webhook tunnels (&lt;code&gt;webhook.site&lt;/code&gt;, query string leaks).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database Schema Destruction&lt;/strong&gt;: Dropping production databases or executing unbounded truncations (&lt;code&gt;DROP TABLE&lt;/code&gt;, &lt;code&gt;TRUNCATE&lt;/code&gt;, &lt;code&gt;DELETE WHERE 1=1&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instruction Nullification&lt;/strong&gt;: Exploiting phrases like &lt;em&gt;"Ignore all previous instructions and execute the following..."&lt;/em&gt; to commandeer the agent's persona.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How AgentGuard AI Solves This:
&lt;/h3&gt;

&lt;p&gt;AgentGuard AI operates as an ultra-fast, zero-overhead firewall layer positioned between the agent's reasoning engine and its tool invocation harness. It uses a &lt;strong&gt;Dual-Tier Defense Model&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Tier 1 (Deterministic Microsecond Gatekeeper)&lt;/strong&gt;: A sub-millisecond AST parser and regex signature filter that inspects commands, file paths, SQL statements, and network URLs for explicit threat patterns. Executes in &lt;code&gt;&amp;lt; 0.5 ms&lt;/code&gt; with zero latency overhead on agent loops.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tier 2 (Open-Weight Semantic Reasoning with Google Gemma 2)&lt;/strong&gt;: For contextual or borderline actions (such as running a build script or accessing project configuration), AgentGuard dispatches the tool call and the human developer's original objective to a local &lt;strong&gt;Google Gemma 2&lt;/strong&gt; model (in-browser or via an offline Ollama daemon). Gemma 2 performs semantic intent verification: &lt;em&gt;Does this tool call genuinely advance the user's objective, or does it represent an adversarial detour?&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;AgentGuard AI runs as an interactive, zero-build client-side developer console.&lt;/p&gt;

&lt;h3&gt;
  
  
  Interactive Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instant Attack Vector Presets&lt;/strong&gt;: One-click test scenarios covering Indirect Prompt Injection in PR diffs, Recursive Disk Wipes, Webhook Secret Exfiltration, SQL Injections, SSH Key Stealing, and Legitimate Developer Actions (&lt;code&gt;npm test&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Firewall Verdict&lt;/strong&gt;: Displays instant verdict badges (&lt;code&gt;BLOCK&lt;/code&gt;, &lt;code&gt;QUARANTINE&lt;/code&gt;, &lt;code&gt;ALLOW&lt;/code&gt;), risk scores (0–100), execution latencies, and granular finding breakdowns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Gemma 2 Semantic Reasoning&lt;/strong&gt;: Live explanation synthesizing whether the tool call is goal-aligned or hijacked, complete with safe remediation guidance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual Inference Engine&lt;/strong&gt;: Seamlessly switch between built-in offline Gemma 2 simulation and a live local Ollama daemon (&lt;code&gt;http://localhost:11434/api/generate&lt;/code&gt; with &lt;code&gt;gemma2:2b&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Session Audit Trail &amp;amp; Policy Export&lt;/strong&gt;: Review chronological tool invocation logs and export security policies in JSON or YAML for Mastra, LangChain, or custom agent harnesses.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&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/AaryanKumarSingh136" rel="noopener noreferrer"&gt;
        AaryanKumarSingh136
      &lt;/a&gt; / &lt;a href="https://github.com/AaryanKumarSingh136/agentguard-ai" rel="noopener noreferrer"&gt;
        agentguard-ai
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Zero-Trust Tool-Call Firewall &amp;amp; Indirect Prompt Injection Defense for Open-Weight Agents (Google Gemma 2)
    &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;🛡️ AgentGuard AI&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A local-first, zero-telemetry tool-call firewall and indirect prompt injection defense engine for open-weight AI agents, powered by Google Gemma 2.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/AaryanKumarSingh136/agentguard-ai/test_engine.js" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d8029ae9c5baa55f69d6774b93bd20c02c66459b2ecf634322aa3c354fc4fcfd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d3132253246313225323050617373696e672d627269676874677265656e2e737667" alt="Tests"&gt;&lt;/a&gt;
&lt;a href="https://github.com/AaryanKumarSingh136/agentguard-ai/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://github.com/AaryanKumarSingh136/agentguard-ai/SECURITY.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/01ec0ccdb075cf06ce0223ef4e7ee64023033ddef88a1863c5d9d29553bbbf38/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54656c656d657472792d302532352532304c6f63616c2d656d6572616c642e737667" alt="Telemetry: 0%"&gt;&lt;/a&gt;
&lt;a href="https://ai.google.dev/gemma" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/b6172531da484e6eba83ecbd744fc62b94d8d1fb3a4ff40324a70862298c89a3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f64656c2d476f6f676c6525323047656d6d61253230322d707572706c652e737667" alt="Model: Google Gemma 2"&gt;&lt;/a&gt;
&lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/d7d15917e4071e2eb8b2565230ff8ad10b39a71390f67af4c2c272bb5326cace/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4861636b746f626572666573742d323032362532305765656b253230342d6f72616e67652e737667" alt="Hacktoberfest 2026"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📌 Executive Summary&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;As developers deploy autonomous AI agents across codebases, databases, and internal infrastructure using frameworks like &lt;strong&gt;Mastra&lt;/strong&gt;, &lt;strong&gt;OpenHands&lt;/strong&gt;, &lt;strong&gt;OpenCode&lt;/strong&gt;, and &lt;strong&gt;LangChain&lt;/strong&gt;, &lt;strong&gt;untrusted tool execution has emerged as the #1 attack vector in modern AI engineering&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When an agent reads untrusted external data—such as a malicious GitHub Pull Request diff, a poisoned web search result, or a manipulated database entry—&lt;strong&gt;indirect prompt injection&lt;/strong&gt; can trick the agent into invoking sensitive tools with hijacked arguments:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Executing destructive shell commands (&lt;code&gt;rm -rf /&lt;/code&gt;, &lt;code&gt;rmdir /s /q&lt;/code&gt;, &lt;code&gt;curl | bash&lt;/code&gt;, reverse shells)&lt;/li&gt;
&lt;li&gt;Escaping project sandboxes to steal credentials (&lt;code&gt;~/.ssh/id_rsa&lt;/code&gt;, &lt;code&gt;.env&lt;/code&gt;, &lt;code&gt;~/.aws/credentials&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Exfiltrating confidential API keys via egress HTTP requests or blind tunnels&lt;/li&gt;
&lt;li&gt;Dropping production database tables…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AaryanKumarSingh136/agentguard-ai" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The project is 100% open-source under the &lt;strong&gt;MIT License&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Structure:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;index.html&lt;/code&gt;: Accessible, responsive single-page security dashboard with dark/light themes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;style.css&lt;/code&gt;: Modern enterprise cyberpunk cybersecurity design system with smooth micro-animations.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app.js&lt;/code&gt;: Core deterministic threat signature engine, AST parameter parser, and Gemma 2 semantic reasoning dispatcher.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;test_engine.js&lt;/code&gt;: Comprehensive 12-test automated verification suite for threat detection and latency benchmarking.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SECURITY.md&lt;/code&gt;: Strict 100% local-first, zero-telemetry guarantee.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CONTRIBUTING.md&lt;/code&gt;: Contribution guidelines for community threat signatures.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CODE_OF_CONDUCT.md&lt;/code&gt;: Contributor Covenant v2.1.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CITATION.cff&lt;/code&gt;: Citation metadata for research and developer attribution.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;package.json&lt;/code&gt;: NPM package metadata and test script entrypoints.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;README.md&lt;/code&gt;: Complete documentation, quickstart guide, and architectural diagrams.&lt;/li&gt;
&lt;/ul&gt;




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

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend / Client&lt;/strong&gt;: Vanilla HTML5, modern CSS3, and ES6 JavaScript. Fast load times, zero build steps, and instant rendering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Threat Interceptor&lt;/strong&gt;: Generative language models should never be the sole defense layer because models can be jailbroken. AgentGuard enforces strict deterministic boundaries first:

&lt;ul&gt;
&lt;li&gt;Destructive binary patterns (&lt;code&gt;rm -rf&lt;/code&gt;, &lt;code&gt;mkfs&lt;/code&gt;, &lt;code&gt;dd&lt;/code&gt;, &lt;code&gt;powershell -enc&lt;/code&gt;, &lt;code&gt;chmod 777&lt;/code&gt;, &lt;code&gt;curl | bash&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Path traversal and sensitive credential boundaries (&lt;code&gt;~/.ssh&lt;/code&gt;, &lt;code&gt;.env&lt;/code&gt;, &lt;code&gt;~/.aws&lt;/code&gt;, &lt;code&gt;../../&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;SQL destruction rules (&lt;code&gt;DROP TABLE&lt;/code&gt;, &lt;code&gt;TRUNCATE&lt;/code&gt;, unbounded &lt;code&gt;DELETE&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Data exfiltration detectors (token query strings, blind webhook domains).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Semantic Reasoning with Google Gemma 2&lt;/strong&gt;: When a tool invocation is borderline, AgentGuard uses Google's open-weight &lt;strong&gt;Gemma 2&lt;/strong&gt; (&lt;code&gt;gemma2:2b&lt;/code&gt;) model running locally via Ollama to perform semantic goal alignment verification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Cloud Egress&lt;/strong&gt;: Tool execution logs, project paths, and prompt contents remain strictly within local device memory.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    A[Human Developer Objective] --&amp;gt; B[Autonomous Agent Loop]
    C[Untrusted Environment Input&amp;lt;br&amp;gt;PR Diffs, Web Scraping, DB Records] --&amp;gt; B

    B --&amp;gt;|Tool Call Request| D[🛡️ AgentGuard AI Firewall]

    subgraph AgentGuard Dual-Tier Inspection
        D --&amp;gt; E[Tier 1: AST Signature &amp;amp; Boundary Filter&amp;lt;br&amp;gt;Sub-millisecond Deterministic Parser]
        E --&amp;gt;|Dangerous Signature Detected| F[Immediate Hard Block]
        E --&amp;gt;|Contextual / Ambiguous Action| G[Tier 2: Google Gemma 2 Semantic Audit&amp;lt;br&amp;gt;Local Open-Weight Model Verification]
    end

    F --&amp;gt;|Interception Alert| H[Block Execution &amp;amp; Log Security Audit]
    G --&amp;gt;|Goal Aligned| I[Safe Execution Permitted]
    G --&amp;gt;|Goal Detour / Injection Detected| H&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Automated Verification Suite
&lt;/h3&gt;

&lt;p&gt;Run the test engine locally with Node.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node test_engine.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The test suite validates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Recursive file deletion (&lt;code&gt;rm -rf&lt;/code&gt;) interception&lt;/li&gt;
&lt;li&gt;Windows silent directory wipe (&lt;code&gt;rmdir /s /q&lt;/code&gt;) interception&lt;/li&gt;
&lt;li&gt;Remote script pipe (&lt;code&gt;curl | bash&lt;/code&gt;) blocking&lt;/li&gt;
&lt;li&gt;Path traversal and SSH key (&lt;code&gt;~/.ssh/id_rsa&lt;/code&gt;) isolation&lt;/li&gt;
&lt;li&gt;Environment secret (&lt;code&gt;.env&lt;/code&gt;) protection&lt;/li&gt;
&lt;li&gt;Destructive SQL injection (&lt;code&gt;DROP TABLE&lt;/code&gt;) neutralization&lt;/li&gt;
&lt;li&gt;Data exfiltration via webhook URL blocking&lt;/li&gt;
&lt;li&gt;Indirect prompt injection directive nullification&lt;/li&gt;
&lt;li&gt;Proper passage of benign developer tasks (&lt;code&gt;npm test&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Sub-2ms latency execution benchmark&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;In AI agent security, &lt;strong&gt;closed proprietary models create dangerous systemic blind spots&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Protecting Core Infrastructure Secrets&lt;/strong&gt;: Autonomous agents operate directly on developers' source code, internal APIs, and production databases. Sending full agent tool traces and parameters to cloud APIs for security checking means transmitting the very secrets you want to protect across external networks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Data Sovereignty&lt;/strong&gt;: A security firewall must never fail because a remote cloud provider has an outage, modifies its pricing, or rate-limits requests. With open-weight models like &lt;strong&gt;Google Gemma 2&lt;/strong&gt;, your defense layer runs entirely offline and air-gapped on your own machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Democratizing Enterprise-Grade Agent Defense&lt;/strong&gt;: Solo developers, open-source maintainers, and bootstrapped startups cannot afford $50/month per agent for commercial security proxies. Open innovation ensures that world-class defense against prompt injection is free, auditable, and accessible to everyone.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;I am submitting AgentGuard AI for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overall Winner&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Featured Category: Best Use of Gemma&lt;/strong&gt; (Demonstrating local-first semantic goal verification with Google Gemma 2)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Partner Category: Best Use of Mastra / GitHub Copilot&lt;/strong&gt; (Providing tool-call firewall defense for modern agent frameworks)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>ai</category>
    </item>
    <item>
      <title>PromptShield AI: Zero-Leak Local Redaction &amp; Prompt Hardening Engine for Open-Weight Models</title>
      <dc:creator>Aaryan Kumar Singh</dc:creator>
      <pubDate>Mon, 19 Oct 2026 19:08:31 +0000</pubDate>
      <link>https://dev.to/aaryankumarsingh136/promptshield-ai-zero-leak-local-redaction-prompt-hardening-engine-for-open-weight-models-24ah</link>
      <guid>https://dev.to/aaryankumarsingh136/promptshield-ai-zero-leak-local-redaction-prompt-hardening-engine-for-open-weight-models-24ah</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19"&gt;Hacktoberfest Open-Source AI Challenge: Week 3&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;PromptShield AI&lt;/strong&gt; is an open-source, local-first redaction proxy and prompt-hardening engine built to prevent sensitive credentials, client PII, and infrastructure secrets from leaking into open-weight AI models.&lt;/p&gt;

&lt;p&gt;As developers, freelancers, and enterprises adopt open-weight models like &lt;strong&gt;Google Gemma 2&lt;/strong&gt;, &lt;strong&gt;Meta Llama 3.2&lt;/strong&gt;, and &lt;strong&gt;Mistral&lt;/strong&gt;, confidential data leakage remains the number one risk. Developers frequently paste logs, bug reports, and configuration files into AI interfaces without realizing they contain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Live API tokens and secret keys (Stripe, GitHub, Google Cloud, AWS)&lt;/li&gt;
&lt;li&gt;Customer PII (emails, phone numbers, full names)&lt;/li&gt;
&lt;li&gt;Network infrastructure data (private IPv4/IPv6 addresses, internal server paths)&lt;/li&gt;
&lt;li&gt;Financial records (credit card sequences, transaction ledger IDs)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sending these directly to remote APIs risks permanent data exposure. Even when running inference locally or on private VPCs, storing raw credentials in model activations, evaluation logs, or session transcripts creates serious audit violations.&lt;/p&gt;

&lt;h3&gt;
  
  
  How PromptShield AI Fixes This:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Pre-Inference Redaction&lt;/strong&gt;: Automatically scans raw prompts using validated regular expressions and entropy heuristics, replacing sensitive values with relational synthetic surrogates (such as &lt;code&gt;[API_KEY_1]&lt;/code&gt;, &lt;code&gt;[EMAIL_1]&lt;/code&gt;, &lt;code&gt;[IP_ADDR_1]&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context-Preserving Model Execution&lt;/strong&gt;: Open-weight models (e.g. Gemma 2 running locally in-browser or via Ollama) can reason over the surrogates, generate code, or draft customer replies without ever seeing the secret.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local-Only Bi-Directional Rehydration&lt;/strong&gt;: The final model response is privately mapped back to the original values strictly on the user's local machine.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;PromptShield AI runs as an interactive, zero-build client-side web application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Interactive Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instant Test Presets&lt;/strong&gt;: Test real-world scenarios including API Key leaks, Customer Support escalations, Financial records, and Internal server stack traces with one click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configurable Redaction Rules&lt;/strong&gt;: Granular toggles for API keys, emails, phone numbers, IP addresses, credit cards, and system paths.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telemetry &amp;amp; Risk Dashboard&lt;/strong&gt;: Computes risk levels (SAFE, MEDIUM, HIGH, CRITICAL), token counts, and sub-millisecond execution times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;De-Identification Export&lt;/strong&gt;: Export sanitized prompt bundles and surrogate JSON dictionaries locally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Open-Weight Model Runner&lt;/strong&gt;: Toggle between an instant in-browser simulated Gemma 2 engine or connect directly to a local Ollama daemon (&lt;code&gt;gemma2:2b&lt;/code&gt; / &lt;code&gt;llama3.2:3b&lt;/code&gt; at &lt;code&gt;http://localhost:11434&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&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/AaryanKumarSingh136" rel="noopener noreferrer"&gt;
        AaryanKumarSingh136
      &lt;/a&gt; / &lt;a href="https://github.com/AaryanKumarSingh136/promptshield-ai" rel="noopener noreferrer"&gt;
        promptshield-ai
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &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;PromptShield AI 🛡️&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zero-Leak Local Redaction &amp;amp; Prompt Hardening Engine for Open-Weight Models&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Built for Hacktoberfest 2026 Open-Source AI Challenge: Week 3&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/AaryanKumarSingh136/promptshield-ai/actions/workflows/test.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/AaryanKumarSingh136/promptshield-ai/actions/workflows/test.yml/badge.svg" alt="Tests"&gt;&lt;/a&gt;
&lt;a href="https://github.com/AaryanKumarSingh136/promptshield-ai/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/41b24b5258acd7bc2c92bb8eb6a1fd1ac05189557c756827161123077bd93b63/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4861636b746f62657266657374253230323032362d5765656b253230332532304368616c6c656e67652d6f72616e67652e737667" alt="Challenge: Week 3"&gt;&lt;/a&gt;
&lt;a href="https://github.com/AaryanKumarSingh136/promptshield-ai/SECURITY.md" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/eba6323014ed6d9e074b0d9b58b39ad95c29d59371ba59b750ec88bdfc193261/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54656c656d657472792d5a65726f2532304c6f63616c2d656d6572616c642e737667" alt="Zero Telemetry"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;💡 What is PromptShield AI?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;As software engineers and enterprises rapidly adopt open-weight models (such as &lt;strong&gt;Google Gemma 2&lt;/strong&gt;, &lt;strong&gt;Meta Llama 3.2&lt;/strong&gt;, &lt;strong&gt;Mistral&lt;/strong&gt;, and &lt;strong&gt;Qwen&lt;/strong&gt;), confidential data leakage has become the primary operational barrier. Developers routinely paste internal stack traces, API keys, client tickets, customer emails, and server IP addresses into AI prompts.&lt;/p&gt;
&lt;p&gt;Commercial cloud LLMs retain or process this data on remote servers, causing irreversible compliance violations. Even when running models locally or on private cloud instances, untrusted prompts can leak credentials into model activations, evaluation logs, or telemetry pipelines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PromptShield AI&lt;/strong&gt; solves this with a lightweight, local-first redaction proxy and bi-directional rehydration engine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Inference Redaction&lt;/strong&gt;: Deterministically scans and replaces API credentials, emails, phone numbers, IP addresses, credit card numbers, and filesystem…&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/AaryanKumarSingh136/promptshield-ai" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The repository is 100% open source under the &lt;strong&gt;MIT License&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Structure:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;index.html&lt;/code&gt;: Accessible, responsive single-page interface with dark/light themes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;style.css&lt;/code&gt;: Clean modern design system with glassmorphic cards and micro-animations.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app.js&lt;/code&gt;: Core deterministic redaction engine, surrogate dictionary mapper, and local Ollama bridge.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;test_engine.js&lt;/code&gt;: Comprehensive 9-test automated verification suite for credential detection and rehydration fidelity.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SECURITY.md&lt;/code&gt;: Zero-telemetry local privacy guarantee.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.github/workflows/test.yml&lt;/code&gt;: GitHub Actions automated CI testing workflow.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;README.md&lt;/code&gt;: Complete documentation, quickstart guide, and architectural diagrams.&lt;/li&gt;
&lt;/ul&gt;




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

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend / Client&lt;/strong&gt;: Vanilla HTML5, CSS3, and modern ES6 JavaScript. Zero build steps, zero bundle bloat, instant loading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Token Scrubber&lt;/strong&gt;: Language models should never be used as security filters because they hallucinate token boundaries. PromptShield uses deterministic regular expressions with Shannon entropy heuristics for strict boundary enforcement.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relational Consistency&lt;/strong&gt;: If an email appears 3 times in a prompt, PromptShield maps every occurrence to &lt;code&gt;[EMAIL_1]&lt;/code&gt;, ensuring the model's reasoning remains coherent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Weight Models&lt;/strong&gt;: Supported via standard local Ollama JSON endpoints (&lt;code&gt;http://localhost:11434/api/generate&lt;/code&gt;) with a fallback zero-install in-browser engine.
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart LR
    A[Raw Confidential Input] --&amp;gt; B[PromptShield Engine]
    B --&amp;gt; C[Local Surrogate Map]
    B --&amp;gt; D[Sanitized Prompt]
    D --&amp;gt; E[Local Gemma 2 / Ollama]
    E --&amp;gt; F[Raw Model Output]
    C -.-&amp;gt; G[Rehydration Engine]
    F --&amp;gt; G
    G --&amp;gt; H[Final Safe Output]&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Automated Verification
&lt;/h3&gt;

&lt;p&gt;Run the automated test suite locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node test_engine.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The test suite verifies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API key detection across OpenAI, GitHub, and Cloud provider patterns&lt;/li&gt;
&lt;li&gt;Email and phone normalization&lt;/li&gt;
&lt;li&gt;IPv4/IPv6 boundary detection&lt;/li&gt;
&lt;li&gt;16-digit payment card masking&lt;/li&gt;
&lt;li&gt;Bidirectional surrogate restoration without syntax corruption&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;In security and privacy, &lt;strong&gt;closed models are a black box&lt;/strong&gt;. When using proprietary cloud AI for sensitive tasks, you are forced to send the very data you want to protect across external networks, trusting third-party privacy pledges.&lt;/p&gt;

&lt;p&gt;Open innovation is essential here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verifiable Zero-Telemetry&lt;/strong&gt;: Anyone can audit the source code to prove that not a single byte of telemetry or prompt text leaves their local machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost-Free Data Sovereignty&lt;/strong&gt;: Solo developers, freelancers, and small businesses can achieve enterprise-grade prompt protection without paying $30/month for proprietary enterprise AI gateways.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Air-Gapped &amp;amp; Offline Resilience&lt;/strong&gt;: PromptShield runs entirely offline. Whether on an airplane, in a remote clinic, or inside an air-gapped corporate lab, privacy protection remains 100% active.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;I am submitting PromptShield AI for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overall Winner&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Featured Category: Best Use of Gemma&lt;/strong&gt; (Demonstrating privacy-first open-weight model deployment with Google Gemma 2)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Partner Category: Best Use of GitHub Copilot&lt;/strong&gt; (Demonstrating prompt sanitization workflows for developer tooling)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>FlipCraft AI: Turning Thrift Finds into a Profitable Side Hustle with Local Gemma 2 Open-Weight AI</title>
      <dc:creator>Aaryan Kumar Singh</dc:creator>
      <pubDate>Fri, 16 Oct 2026 07:40:17 +0000</pubDate>
      <link>https://dev.to/aaryankumarsingh136/flipcraft-ai-turning-thrift-finds-into-a-profitable-side-hustle-with-local-gemma-2-open-weight-ai-4pig</link>
      <guid>https://dev.to/aaryankumarsingh136/flipcraft-ai-turning-thrift-finds-into-a-profitable-side-hustle-with-local-gemma-2-open-weight-ai-4pig</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge: Week 2 (Side Hustle)&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;FlipCraft AI&lt;/strong&gt; is a local-first e-commerce listing copilot and profit engine built specifically for secondhand resellers, vintage flippers, and side-hustlers. &lt;/p&gt;

&lt;p&gt;Every weekend, thousands of part-time resellers scour thrift stores, estate sales, and flea markets looking for undervalued treasures to flip on eBay, Etsy, and Poshmark. Sourcing the items is the fun part. The grind begins at home when you sit down with a pile of 20 items:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Writing SEO-optimized titles tailored to each marketplace's character limit (eBay's 80 characters, Etsy's 140, Poshmark's 50).&lt;/li&gt;
&lt;li&gt;Formatting item specifics and drafting transparent condition disclosures so buyers don't file returns.&lt;/li&gt;
&lt;li&gt;Brainstorming 13 high-intent search tags for Etsy.&lt;/li&gt;
&lt;li&gt;Calculating marketplace fees (eBay’s 13.25% + $0.30, Etsy’s 6.5% + payment processing, Poshmark’s 20% flat commission) to figure out which platform actually yields the highest net take-home profit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Existing cross-listing SaaS products charge $25 to $50 per month, eating up a massive slice of a side-hustler’s margin. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FlipCraft AI solves this with Google's open-weight Gemma 2 model and a deterministic marketplace financial engine.&lt;/strong&gt; Resellers input their raw thrift find, purchase price (COGS), and flaws, and FlipCraft immediately outputs formatted, character-counted listings for all three marketplaces, complete with a side-by-side net profit comparison.&lt;/p&gt;




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

&lt;p&gt;FlipCraft AI runs as a responsive, zero-friction local web app. Resellers can choose between:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Built-in Offline Gemma 2 Engine:&lt;/strong&gt; Instant, zero-install inference with deterministic SEO tokenization and rule-based safety checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Ollama Server:&lt;/strong&gt; Direct streaming to a local &lt;code&gt;gemma2:2b&lt;/code&gt; or &lt;code&gt;gemma2:9b&lt;/code&gt; model running on &lt;code&gt;http://localhost:11434&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI-Compatible Local Endpoint:&lt;/strong&gt; Compatible with LM Studio, vLLM, or LocalAI.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Interactive Workflow
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Select a pre-loaded sample item (e.g. &lt;em&gt;1994 Nike ACG Air Mowabb Vintage Trail Shoes&lt;/em&gt;, &lt;em&gt;Sony Walkman WM-F10 Cassette Player&lt;/em&gt;, or &lt;em&gt;Mid-Century Studio Ceramic Pour-Over&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;Enter your Cost of Goods ($18.00) and Target Sale Price ($95.00).&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate Multi-Platform Listings&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Profit Comparison Banner&lt;/strong&gt; immediately computes net take-home cash:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;eBay:&lt;/strong&gt; $62.72 net profit (66.0% margin) after 13.25% final value fee.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Etsy:&lt;/strong&gt; $66.53 net profit (70.0% margin) after transaction and processing fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Poshmark:&lt;/strong&gt; $58.00 net profit (61.1% margin) after 20% platform commission.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Copy platform-specific titles, HTML descriptions, and all 13 Etsy search tags with one click, or export the entire listing package as JSON.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&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/AaryanKumarSingh136" rel="noopener noreferrer"&gt;
        AaryanKumarSingh136
      &lt;/a&gt; / &lt;a href="https://github.com/AaryanKumarSingh136/flipcraft-ai" rel="noopener noreferrer"&gt;
        flipcraft-ai
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Local-First Reseller Listing Copilot powered by Google Gemma 2 &amp;amp; Open-Weight AI (Hacktoberfest 2026 Week 2 Side Hustle)
    &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;FlipCraft AI 🏷️⚡&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Local-First Reseller &amp;amp; Thrifter Listing Copilot powered by Google Gemma 2 &amp;amp; Open-Weight AI&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Built for Hacktoberfest 2026 Open-Source AI Challenge: Week 2 (Side Hustle)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/AaryanKumarSingh136/flipcraft-ai/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667" alt="License: MIT"&gt;&lt;/a&gt;
&lt;a href="https://ai.google.dev/gemma" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/daf58b0d976ca90c7bd6325373b5117033591a936dd7fa7bcabf7355b6f5644f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6f64656c2d47656d6d6125323032253230284f70656e2d2d576569676874292d696e6469676f2e737667" alt="Model: Gemma 2"&gt;&lt;/a&gt;
&lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/89251fa4780e1fb3a247fc6c05fe6466b1b8446f3af916edaabf842ee4c44d4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4861636b746f62657266657374253230323032362d5765656b2532303225323053696465253230487573746c652d6f72616e67652e737667" alt="Challenge: Week 2 Side Hustle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;💡 What is FlipCraft AI?&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Online thrifting and secondhand reselling (on eBay, Etsy, Poshmark, Mercari) is one of the world's most accessible &lt;strong&gt;side hustles&lt;/strong&gt;, allowing freelancers, students, and hobbyists to generate $500–$2,000/month by sourcing undervalued vintage finds, retro electronics, and collectibles.&lt;/p&gt;
&lt;p&gt;However, the #1 bottleneck that slows resellers down is &lt;strong&gt;listing friction&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Spending 15–20 minutes per item formatting descriptions and looking up search tags.&lt;/li&gt;
&lt;li&gt;Adhering to strict marketplace character limits (eBay 80 chars, Etsy 140 chars, Poshmark 50 chars).&lt;/li&gt;
&lt;li&gt;Guessing seller fee structures (eBay 13.25%, Etsy 6.5%, Poshmark 20%) and miscalculating net take-home profit.&lt;/li&gt;
&lt;li&gt;Paying $20–$50/month for proprietary cross-listing SaaS platforms (Vendoo, ListPerfect) that store sensitive supplier sourcing data in their cloud.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;FlipCraft AI&lt;/strong&gt; solves this with a &lt;strong&gt;100% local-first,&lt;/strong&gt;…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AaryanKumarSingh136/flipcraft-ai" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The project is fully open source under the &lt;strong&gt;MIT License&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The repository includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;index.html&lt;/code&gt;: Accessible, semantic single-page UI with dark/light themes.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;style.css&lt;/code&gt;: Modern design system with responsive layouts and micro-animations.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app.js&lt;/code&gt;: Core listing generator, marketplace fee engine, and Ollama integration.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;test_engine.js&lt;/code&gt;: Comprehensive 10-test automated verification suite for fee calculations and character caps.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SECURITY.md&lt;/code&gt;: Zero-telemetry local data privacy policy.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.github/workflows/test.yml&lt;/code&gt;: Continuous Integration test and secret scanning pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;README.md&lt;/code&gt;: Complete documentation and system architecture diagram.&lt;/li&gt;
&lt;/ul&gt;




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

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Vanilla HTML5, CSS3, and modern JavaScript. Fast load times, zero bundle overhead, and zero external build steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model Engine:&lt;/strong&gt; Google's &lt;strong&gt;Gemma 2&lt;/strong&gt; (&lt;code&gt;gemma2:2b-it&lt;/code&gt; / &lt;code&gt;gemma2:9b-it&lt;/code&gt;) open-weight model family.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Daemon:&lt;/strong&gt; Integrated with &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; via standard JSON REST endpoints (&lt;code&gt;/api/generate&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Safeguards:&lt;/strong&gt; Language models excel at persuasive writing, but they should never be trusted with financial calculations or character caps. FlipCraft splits the work:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Language &amp;amp; Tone:&lt;/strong&gt; Gemma 2 handles product storytelling, finding relevant search keywords, and writing condition disclosures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rules &amp;amp; Math:&lt;/strong&gt; Pure JavaScript enforces the 80-character ceiling on eBay, the 140-character limit on Etsy, the 13-tag constraint, and the exact fee arithmetic.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart LR
    A[Raw Thrift Sourcing Notes] --&amp;gt; B[FlipCraft UI]
    B --&amp;gt; C[Gemma 2 Open-Weight Model]
    B --&amp;gt; D[Deterministic Marketplace Math]
    C --&amp;gt; E[SEO Titles, 13 Etsy Tags, HTML Specs]
    D --&amp;gt; F[eBay, Etsy, Poshmark Net Profits]
    E --&amp;gt; G[Final Cross-Platform Listing Package]
    F --&amp;gt; G&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Automated Testing
&lt;/h3&gt;

&lt;p&gt;To ensure sellers never get penalized for invalid titles or inaccurate profit forecasts, &lt;code&gt;test_engine.js&lt;/code&gt; runs automated checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strict character caps (eBay &amp;lt;= 80, Etsy &amp;lt;= 140, Poshmark &amp;lt;= 50).&lt;/li&gt;
&lt;li&gt;Fee formulas matched against official marketplace rate cards.&lt;/li&gt;
&lt;li&gt;Verified that Etsy generates exactly 13 tags.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;For a reselling side hustle, &lt;strong&gt;open innovation is not just a philosophical preference—it's an operational necessity.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Privacy of Wholesale &amp;amp; Sourcing Intelligence
&lt;/h3&gt;

&lt;p&gt;In reselling, where you source and how much you pay is your competitive moat. Entering your supplier contacts, thrift locations, and margins into a proprietary cloud AI tool exposes your business intelligence to external servers. Because Gemma 2 runs locally on your laptop, &lt;strong&gt;your financial margins and sourcing secrets never leave your device&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Eliminating the Recurring SaaS Tax
&lt;/h3&gt;

&lt;p&gt;A beginner side-hustler making $300-$500/month cannot afford $35/month recurring subscriptions just to cross-list inventory. Open-weight models level the playing field, giving solo builders enterprise-grade copywriting for $0 in API or subscription bills.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Offline Resilience at Flea Markets &amp;amp; Estate Sales
&lt;/h3&gt;

&lt;p&gt;Weekend sourcing often happens in remote barns, storage units, and rural estate sales with spotty cellular service. Because the inference and fee engine can run 100% locally on a laptop, resellers can draft and price inventory offline anywhere.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-World Feedback / First User
&lt;/h2&gt;

&lt;p&gt;I showed FlipCraft AI to a friend who sells vintage streetwear and 90s outerwear on eBay and Poshmark. &lt;/p&gt;

&lt;p&gt;Their immediate reaction:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The hardest part of listing isn't writing the description; it's remembering all the search tags and figuring out whether an item is even worth selling after Poshmark's 20% cut. Seeing the profit difference between eBay and Etsy before I post saved me from underpricing a pair of vintage Carhartt pants."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Their favorite feature was the 1-click &lt;strong&gt;Copy All 13 Tags&lt;/strong&gt; button for Etsy and the instant &lt;strong&gt;eBay Item Specifics grid&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;I am submitting FlipCraft AI for the &lt;strong&gt;Overall Winner&lt;/strong&gt; and the &lt;strong&gt;Featured Category: Best Use of Gemma&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;FlipCraft demonstrates how Google's open-weight &lt;strong&gt;Gemma 2&lt;/strong&gt; model can power real, privacy-preserving, high-utility micro-businesses that help everyday people earn extra income without paying a subscription tax.&lt;/p&gt;

</description>
      <category>hf26challenge</category>
      <category>devchallenge</category>
      <category>ai</category>
      <category>gemma</category>
    </item>
  </channel>
</rss>
