<?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: Nitin Sharma</title>
    <description>The latest articles on DEV Community by Nitin Sharma (@nitinlavaniya2007).</description>
    <link>https://dev.to/nitinlavaniya2007</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%2F4157713%2F3af24724-f25a-431b-9b53-f97b15544f6e.png</url>
      <title>DEV Community: Nitin Sharma</title>
      <link>https://dev.to/nitinlavaniya2007</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nitinlavaniya2007"/>
    <language>en</language>
    <item>
      <title>GitGhost: The Haunted Code Archaeologist &amp; Legacy Tech-Debt Exorcist</title>
      <dc:creator>Nitin Sharma</dc:creator>
      <pubDate>Sat, 31 Oct 2026 10:05:06 +0000</pubDate>
      <link>https://dev.to/nitinlavaniya2007/gitghost-the-haunted-code-archaeologist-legacy-tech-debt-exorcist-1097</link>
      <guid>https://dev.to/nitinlavaniya2007/gitghost-the-haunted-code-archaeologist-legacy-tech-debt-exorcist-1097</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ffzxeh3lmb03dzfxfaf.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ffzxeh3lmb03dzfxfaf.png" alt=" " width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;Every software engineer has inherited a codebase haunted by the departed.&lt;/p&gt;

&lt;p&gt;You open an unfamiliar file and discover an arcane block of logic paired with a terrifying comment:&lt;br&gt;
&lt;code&gt;// DO NOT TOUCH THIS. ONLY GOD AND BOB KNOW WHY THIS WORKS.&lt;/code&gt;&lt;br&gt;
You check &lt;code&gt;git blame&lt;/code&gt;: &lt;em&gt;Bob left the company in 2019.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You find tombstone comments like &lt;code&gt;// TODO (2018): Refactor this before next sprint&lt;/code&gt;. You stumble across frantic late-night commits: &lt;code&gt;wip emergency fix&lt;/code&gt;, &lt;code&gt;please work god&lt;/code&gt;. When you try to touch or modernize this code, unforeseen production outages strike. The original architects are gone, documentation is lost, and the software behaves like an unpredictable, possessing presence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitGhost&lt;/strong&gt; brings these invisible spirits to life.&lt;/p&gt;

&lt;p&gt;GitGhost is a local-first open-source developer agent that turns code archaeology into an interactive séance. It excavates your &lt;code&gt;.git&lt;/code&gt; history, blame trees, and ancient comments, and channels the &lt;strong&gt;"ghosts of past contributors"&lt;/strong&gt; through local open-weight AI (like &lt;strong&gt;Google Gemma 2&lt;/strong&gt; or &lt;strong&gt;Qwen 2.5-Coder&lt;/strong&gt;).&lt;/p&gt;
&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;🕯️ The Haunt Scanner &amp;amp; Haunt Meter:&lt;/strong&gt; Calculates your repository's &lt;strong&gt;Haunt Score (0–100%)&lt;/strong&gt; by detecting ancient unresolved tombstones (&lt;code&gt;TODO&lt;/code&gt;, &lt;code&gt;FIXME&lt;/code&gt;, &lt;code&gt;HACK&lt;/code&gt;, &lt;code&gt;MAGIC&lt;/code&gt;, &lt;code&gt;BUG&lt;/code&gt;), desperate midnight commits, zombie commented-out blocks, and the oldest surviving line in your tree.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔮 The Séance Chamber:&lt;/strong&gt; Select any ancient relic or tombstone. GitGhost synthesizes historical git metadata and summons the spirit of the past author to explain &lt;em&gt;why&lt;/em&gt; the hack was written, what crisis they were fighting, and what catastrophic edge-case will break if you delete it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;✨ The Exorcism Protocol:&lt;/strong&gt; GitGhost doesn't just complain—it banishes technical debt by generating a clean modernized refactoring patch (&lt;code&gt;.diff&lt;/code&gt;) and synthesizing an automated regression verification test suite.&lt;/li&gt;
&lt;/ol&gt;


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

&lt;p&gt;GitGhost provides both an atmospheric, high-contrast terminal CLI (with ASCII ghost art and audio-visual text effects) and a sleek, glowing dark-mode Web Portal.&lt;/p&gt;
&lt;h3&gt;
  
  
  1. The Haunt Meter &amp;amp; The Crypt of Tech Debt
&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fllbd2dzf6ins1bd8yxtg.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fllbd2dzf6ins1bd8yxtg.png" alt="GitGhost Haunt Meter" width="800" height="505"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Scanning an active repository to uncover ancient tombstones, possession levels, and lingering developer phantoms.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  2. The Séance Chamber: Channeling Past Contributors
&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmygvno2gajzyg98t5gux.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmygvno2gajzyg98t5gux.png" alt="GitGhost Séance Chamber" width="800" height="505"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Summoning the ghost of a past engineer to question why an emergency hack was written, followed by the Exorcism Protocol generating clean refactoring diffs.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Terminal CLI in Action
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; gitghost.cli scan

          .---.
         /     &lt;span class="se"&gt;\ &lt;/span&gt;     G I T G H O S T
        | &lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;()&lt;/span&gt; |     The Haunted Code Archaeologist
         &lt;span class="se"&gt;\ &lt;/span&gt; ^  /      Open-Source AI &lt;span class="k"&gt;for &lt;/span&gt;Hacktoberfest &lt;span class="s1"&gt;'26
          |||||       Theme: Ghost in the Machine 👻
          |||||

🔍 Commencing Archaeological Excavation on: C:\repos\project

╭─────────────────────── 🎃 Repository Haunt Diagnosis ────────────────────────╮
│ Repository: openlibrary                                                      │
│ Haunt Score: 78% (CRITICALLY POSSESSED 💀)                                   │
│ Files Scanned: 142 | Lines of Code: 48,920                                   │
│ Tombstones Uncovered (TODO/FIXME/HACK): 34                                   │
│ Cryptic Commits Detected: 12                                                 │
│ Zombie Commented Blocks: 7                                                   │
╰──────────────────────────────────────────────────────────────────────────────╯
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The complete source code for &lt;strong&gt;GitGhost&lt;/strong&gt; is 100% open-source under the MIT License:&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/n1t1n-cyber/gitghost" rel="noopener noreferrer"&gt;https://github.com/n1t1n-cyber/gitghost&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built with: Python 3.11, Rich, FastAPI, Uvicorn, Vanilla CSS Glassmorphism, and Open-Weight AI (Ollama Gemma 2 / Qwen 2.5 + offline Spectral Synthesizer).&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;GitGhost is architected around local-first speed, historical accuracy, and atmospheric immersion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   ┌─────────────────────────────────────────────────────────────┐
   │                   Git Repository (.git)                     │
   └─────────────┬─────────────────────────────────┬─────────────┘
                 │ (git blame, log, ast)           │
                 ▼                                 ▼
   ┌───────────────────────────┐     ┌───────────────────────────┐
   │    Archaeology Engine     │     │      Tombstone Parser     │
   │    (scanner.py)           │     │ (TODOs, HACKs, Blame Tree)│
   └─────────────┬─────────────┘     └─────────────┬─────────────┘
                 │                                 │
                 └───────────────┬─────────────────┘
                                 ▼
   ┌─────────────────────────────────────────────────────────────┐
   │        Ghost Context Synthesizer (Historical Prompt)        │
   └─────────────────────────────┬───────────────────────────────┘
                                 ▼
   ┌─────────────────────────────────────────────────────────────┐
   │           OPEN-WEIGHT MODEL INFERENCE (100% LOCAL)          │
   │       Ollama (Gemma 2 / Qwen 2.5) | Air-Gapped Engine       │
   └─────────────────────────────┬───────────────────────────────┘
                                 │
                 ┌───────────────┴───────────────┐
                 ▼                               ▼
   ┌───────────────────────────┐   ┌───────────────────────────┐
   │     Rich Terminal CLI     │   │    Sleek Web Dashboard    │
   │      (python -m cli)      │   │  (Obsidian &amp;amp; Ectoplasm)   │
   └───────────────────────────┘   └───────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Archaeology Engine (&lt;code&gt;scanner.py&lt;/code&gt;):&lt;/strong&gt; Traverses the repository using &lt;code&gt;git blame -L --porcelain&lt;/code&gt; and &lt;code&gt;git log&lt;/code&gt; to map each comment, hack, and function to its original author, commit date, and commit message.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Open-Source AI Core (&lt;code&gt;ghost_ai.py&lt;/code&gt;):&lt;/strong&gt; Connects to local &lt;strong&gt;Ollama&lt;/strong&gt; running open-weight models (&lt;strong&gt;Google Gemma 2&lt;/strong&gt; or &lt;strong&gt;Qwen 2.5-Coder&lt;/strong&gt;). The prompt grounds the model in historical facts—the exact timestamp, commit message, author name, and diff context—instructing it to adopt the eerie, weary, yet technically sharp persona of that past engineer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Air-Gapped Spectral Fallback:&lt;/strong&gt; To ensure zero friction for anyone testing without an active GPU or Ollama daemon, GitGhost features an offline deterministic heuristic synthesizer that preserves the full experience without network requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Exorcist Engine (&lt;code&gt;exorcist.py&lt;/code&gt;):&lt;/strong&gt; Analyzes the legacy anti-pattern, extracts the implicit safety contract, and synthesizes a modern, typed, null-safe replacement diff along with automated regression tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modern Frontend &amp;amp; CLI (&lt;code&gt;web/&lt;/code&gt; &amp;amp; &lt;code&gt;cli.py&lt;/code&gt;):&lt;/strong&gt; Built with Vanilla CSS, glassmorphism, animated mist particles, and custom radial progress gauges, alongside a Rich CLI terminal.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;p&gt;This challenge asks: &lt;em&gt;Why does open innovation matter for your build?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For developer tooling and code archaeology, &lt;strong&gt;open innovation is not just a preference—it is a non-negotiable security requirement.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Enterprise Privacy &amp;amp; IP Protection
&lt;/h3&gt;

&lt;p&gt;Proprietary corporate codebases contain trade secrets, patentable algorithms, and confidential business logic. &lt;strong&gt;No enterprise engineering team can legally or responsibly stream their raw source code and historical commit logs across the internet to closed third-party cloud APIs (such as OpenAI or Anthropic).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By utilizing &lt;strong&gt;open-weight models (Gemma 2, Qwen 2.5)&lt;/strong&gt; running locally via open runtimes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Cloud Leakage:&lt;/strong&gt; Sensitive code, author names, and corporate git logs never leave the developer's laptop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Air-Gapped Security:&lt;/strong&gt; GitGhost functions entirely offline, inside secure VPCs, on air-gapped defense networks, or on an airplane with no internet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Guarding Against Vendor Lock-in &amp;amp; Arbitrary Deprecation
&lt;/h3&gt;

&lt;p&gt;Closed cloud LLMs constantly change models, alter safety alignments, and deprecate endpoints. Open-weight models belong to the community: they can be audited, quantized, fine-tuned on company-specific idioms, and archived forever.&lt;/p&gt;

&lt;p&gt;Open innovation ensures that the developer—not a cloud API billing meter—owns the intelligence in their machine.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;GitGhost was conceptualized, built, tested, and polished in an intensive pair-programming session with an AI coding partner in Google Antigravity. We collaborated to design the archaeological git blame parsing engine, optimize Windows terminal UTF-8 encoding for Rich markup, construct the responsive Halloween glassmorphism UI, and execute automated browser testing to verify the séance interaction flows.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Happy Halloween &amp;amp; Happy Hacktoberfest! May your code be forever exorcised of legacy bugs.&lt;/em&gt; 🎃👻&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
    <item>
      <title>ParchiPay: Channeling Your Inner Sloth with Gemma &amp; LangGraph to Turn Messy Scribbled "Parchis" into Instant Paid Invoices</title>
      <dc:creator>Nitin Sharma</dc:creator>
      <pubDate>Tue, 20 Oct 2026 16:32:26 +0000</pubDate>
      <link>https://dev.to/nitinlavaniya2007/parchipay-channeling-your-inner-sloth-with-gemma-langgraph-to-turn-messy-scribbled-parchis-4c8a</link>
      <guid>https://dev.to/nitinlavaniya2007/parchipay-channeling-your-inner-sloth-with-gemma-langgraph-to-turn-messy-scribbled-parchis-4c8a</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fslq4alsidk6qkz5r7071.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fslq4alsidk6qkz5r7071.png" alt=" " width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&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: Slow and Steady&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;Tomorrow is &lt;strong&gt;International Sloth Day&lt;/strong&gt;, and sloths have life figured out: move at your own pace, conserve energy, and let the world spin without stressing out. &lt;/p&gt;

&lt;p&gt;If there is one person on earth who &lt;em&gt;desperately&lt;/em&gt; deserves to channel their inner sloth, it’s the &lt;strong&gt;independent trade contractor and hardware merchant&lt;/strong&gt; (electricians, plumbers, carpenter shops, fabrication subcontractors). &lt;/p&gt;

&lt;p&gt;Every day, contractors lose hours to the single most dreaded, brain-draining task in their business: &lt;strong&gt;manual estimating and quoting&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Job materials are hastily scribbled on torn scrap slips of paper called &lt;strong&gt;"parchis"&lt;/strong&gt; (often crinkled, covered in grease or cement dust).&lt;/li&gt;
&lt;li&gt;Details are rattled off in 10-second bilingual or Hinglish voice notes (&lt;em&gt;"Bhaiya 5 coil Finolex 2.5 wire, 10 Anchor switch aur PVC pipe note kar lo"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;Contractors then spend 45 minutes manually deciphering handwriting, opening Excel sheets, looking up catalog SKUs, calculating 18% GST, checking warehouse shelves to see if they're out of stock, and manually drafting restock orders to suppliers.&lt;/li&gt;
&lt;li&gt;Worst of all, they suffer &lt;strong&gt;severe revenue leakage&lt;/strong&gt;: they quote ₹25,000 worth of wire and conduit pipes, but completely forget to bill for concealing labor and wire-pulling charges.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We built &lt;strong&gt;ParchiPay&lt;/strong&gt; (powered by &lt;strong&gt;QuoteFlow AI&lt;/strong&gt;) — an autonomous, human-in-the-loop quoting and inventory agent that lets contractors be totally lazy.&lt;/p&gt;

&lt;h3&gt;
  
  
  What ParchiPay Does in 15 Seconds:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Snap &amp;amp; Speak:&lt;/strong&gt; Take a quick photo of the messy paper &lt;em&gt;parchi&lt;/em&gt; and/or record a voice note.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Cognition with Gemma:&lt;/strong&gt; Open-weight &lt;strong&gt;Gemma&lt;/strong&gt; parses the handwritten slip, cross-reconciles it with the audio transcript, and fuzzy-matches raw vernacular descriptions into standardized catalog SKUs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Inventory &amp;amp; GST Math:&lt;/strong&gt; Checks stock across a &lt;strong&gt;3-Tier Storage Matrix&lt;/strong&gt; (&lt;code&gt;HEALTHY&lt;/code&gt;, &lt;code&gt;THRESHOLD_WARNING&lt;/code&gt;, &lt;code&gt;INSTANT_DEFICIT&lt;/code&gt;) and computes line-item GST without LLM math hallucinations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognitive Revenue Guard:&lt;/strong&gt; Gemma audits the quoted materials, spots missing companion services (e.g., &lt;em&gt;"You quoted wiring and conduits but forgot installation labor"&lt;/em&gt;), and suggests billable add-ons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous Supplier Purchase Orders:&lt;/strong&gt; If materials are out of stock, it automatically groups deficits by supplier and drafts Restock Purchase Orders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-In-The-Loop Approval &amp;amp; Dispatch:&lt;/strong&gt; The contractor glances at the dashboard, toggles the suggestions with one tap, and approves. ParchiPay immediately generates a customer portal link, sends a &lt;strong&gt;Brevo transactional email&lt;/strong&gt;, and prepares a &lt;strong&gt;WhatsApp wa.me instant invoice link&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/siddg1161/HacktoberfestSage" rel="noopener noreferrer"&gt;github.com/siddg1161/HacktoberfestSage&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architecture &amp;amp; System Flow:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;graph TD
    A[Messy Paper Parchi / Image] --&amp;gt; B[OpenCV Image Preprocessor]
    C[Hinglish Voice Note / Audio] --&amp;gt; D[Speech Transcription]
    B --&amp;gt; E[Node 1: Gemma Multimodal Extractor]
    D --&amp;gt; E
    E --&amp;gt; F[Catalog SKU Fuzzy Matcher]
    F --&amp;gt; G[Node 2: Deterministic 3-Tier Inventory &amp;amp; GST Engine]
    G --&amp;gt; H[Node 3: Gemma Cognitive Revenue Guard &amp;amp; Python PO Drafter]
    H --&amp;gt; I{HITL Interrupt Gate&amp;lt;br/&amp;gt;Neon PostgresSaver}
    I --&amp;gt;|Merchant Review &amp;amp; 1-Tap Toggle| J[Node 4: Execute &amp;amp; Dispatch Engine]
    J --&amp;gt; K[Atomic DB Commit]
    J --&amp;gt; L[WhatsApp wa.me Invoice Link]
    J --&amp;gt; M[Brevo Email Dispatch]
    J --&amp;gt; N[Customer Self-Serve Payment Portal]&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Visual Walkthrough:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Technician Portal:&lt;/strong&gt; Technicians capture paper &lt;em&gt;parchis&lt;/em&gt; or speak into the microphone on-site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merchant Review Dashboard:&lt;/strong&gt; Displays the itemized breakdown, confidence scores for messy handwriting, stock deficit alerts, and AI revenue add-on suggestions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customer Portal:&lt;/strong&gt; Clean, mobile-friendly invoice portal with line items, tax breakdowns, and one-tap approval.&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/siddg1161" rel="noopener noreferrer"&gt;
        siddg1161
      &lt;/a&gt; / &lt;a href="https://github.com/siddg1161/HacktoberfestSage" rel="noopener noreferrer"&gt;
        HacktoberfestSage
      &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;HacktoberfestSage&lt;/h1&gt;

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



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/siddg1161/HacktoberfestSage" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;The repository is modularly structured into three core components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/Agent&lt;/code&gt;: Python 3.11 LangGraph state machine, Gemma multimodal LLM factory, Pydantic contracts, and Neon PostgreSQL checkpointing.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/Backend&lt;/code&gt;: Node.js / Express TypeScript service handling API routing, Brevo transactional email dispatch, WhatsApp link generation, and database pooling.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/frontend&lt;/code&gt;: React 19 + Vite + Tailwind CSS dashboard providing responsive Technician, Merchant Admin, and Client Self-Serve Portals.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;render.yaml&lt;/code&gt;: Infrastructure-as-Code for zero-downtime deployment on Render.&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;ParchiPay is engineered from the ground up around &lt;strong&gt;open-source AI and transparent agent orchestration&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Open-Weight Vision &amp;amp; Reasoning: Gemma
&lt;/h3&gt;

&lt;p&gt;We used Google's open-weight &lt;strong&gt;Gemma&lt;/strong&gt; family (&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;) via Google AI Studio. Gemma is the cognitive core responsible for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reading low-contrast, cursive, and vernacular handwriting on paper &lt;em&gt;parchis&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Cross-reconciling discrepancies between the image and speech transcripts (e.g., if the slip says "2 coils" but the voice note says "make that 5 coils", Gemma resolves the true customer intent).&lt;/li&gt;
&lt;li&gt;Semantic catalog mapping from messy trade slang to strict SKU IDs (&lt;code&gt;SKU-WIRE-25&lt;/code&gt;, &lt;code&gt;SKU-PVC-25&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Performing the &lt;strong&gt;Cognitive Revenue Guard&lt;/strong&gt; audit to identify missing installation labor and accessories.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Open-Source Agent Harness: LangGraph StateGraph
&lt;/h3&gt;

&lt;p&gt;Instead of unpredictable autonomous loops, we structured the pipeline into a 4-node deterministic LangGraph state machine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;builder&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;StateGraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;QuoteFlowState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 4 Specialized Nodes
&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;multimodal_extractor_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;multimodal_extractor_node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inventory_and_billing_analyzer_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;inventory_and_billing_analyzer_node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;revenue_and_procurement_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;revenue_and_procurement_node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_node&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;execute_dispatch_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;execute_dispatch_node&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Linear flow with HITL interrupt before final dispatch
&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;START&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;multimodal_extractor_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;multimodal_extractor_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inventory_and_billing_analyzer_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inventory_and_billing_analyzer_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;revenue_and_procurement_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;revenue_and_procurement_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;execute_dispatch_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_edge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;execute_dispatch_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;END&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Pauses state in Neon PostgreSQL for vendor review
&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;interrupt_before&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;execute_dispatch_node&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Separation of Cognition and Arithmetic (Zero Math Hallucination)
&lt;/h3&gt;

&lt;p&gt;A classic flaw in AI billing apps is letting the LLM calculate sums and taxes — leading to rounding errors and hallucinations. In ParchiPay:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gemma does strictly what it's best at:&lt;/strong&gt; Perception, unstructured text parsing, fuzzy matching, and creative companion service auditing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python &amp;amp; PostgreSQL do the math:&lt;/strong&gt; GST rates (5%, 12%, 18%), line totals, 3-tier deficit formulas (&lt;code&gt;order_qty = deficit_qty + reorder_threshold&lt;/code&gt;), and rate-card pricing are executed deterministically.&lt;/li&gt;
&lt;li&gt;All structured outputs are bound via strict &lt;strong&gt;Pydantic schemas&lt;/strong&gt; (&lt;code&gt;ExtractionOutput&lt;/code&gt;, &lt;code&gt;RevenueAuditOutput&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Image Preprocessing with OpenCV
&lt;/h3&gt;

&lt;p&gt;Real &lt;em&gt;parchis&lt;/em&gt; are taken under bad lighting with shadows. We use OpenCV with CLAHE (Contrast Limited Adaptive Histogram Equalization) and single-tile 768px downscaling to boost handwriting contrast and save ~38,000 unnecessary tokens.&lt;/p&gt;




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

&lt;p&gt;Open innovation is what makes ParchiPay viable for real-world small businesses:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Privacy &amp;amp; Data Sovereignty for Local Merchants:&lt;/strong&gt; Small contractors and hardware suppliers operate on confidential trade margins, private client phone numbers, and negotiated supplier wholesale costs. Feeding proprietary customer lists and invoices into opaque, closed commercial APIs poses real vendor-lockin and confidentiality risks. Open-weight models like Gemma give businesses the freedom to run inference in private VPCs or on on-premises workstations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architectural Freedom &amp;amp; Modularity:&lt;/strong&gt; Closed APIs force developers into rigid, proprietary tool-use ecosystems. Open frameworks like LangGraph paired with open models allow us to intercept state, pause execution in our own PostgreSQL checkpointer (&lt;code&gt;PostgresSaver&lt;/code&gt;), and inject human decisions without relying on proprietary platform lock-in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Economics for Micro-Businesses:&lt;/strong&gt; Tradespeople run on tight margins. When processing dozens of daily estimates, closed commercial API fees destroy unit economics. Open weights allow high-throughput batching, fine-tuning on regional handwriting (such as Devanagari numerals and local trade terms), and predictable operational costs.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Lazy Payoff
&lt;/h2&gt;

&lt;p&gt;International Sloth Day is all about doing the least work for the maximum reward. Here is how ParchiPay turns hours of dreaded manual labor into effortless sloth mode:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Traditional Contractor Quoting&lt;/th&gt;
&lt;th&gt;The ParchiPay Sloth Workflow&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Time:&lt;/strong&gt; 30 to 45 minutes per quote&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Time:&lt;/strong&gt; Under 30 seconds total&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Squinting at dirty paper slips &amp;amp; deciphering numbers&lt;/td&gt;
&lt;td&gt;AI reads messy handwriting &amp;amp; voice notes instantly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manually typing items into Excel or billing software&lt;/td&gt;
&lt;td&gt;Automatic SKU mapping to local warehouse catalog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Calculating GST rates and line totals on a desk calculator&lt;/td&gt;
&lt;td&gt;Instant deterministic math with zero human errors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Walking to the warehouse to check stock levels&lt;/td&gt;
&lt;td&gt;3-Tier inventory alerts tell you what’s in stock&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Forgetting installation labor (&lt;strong&gt;revenue lost!&lt;/strong&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Revenue Guard&lt;/strong&gt; alerts you to missed billable labor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Calling suppliers to restock missing items&lt;/td&gt;
&lt;td&gt;Auto-drafted Restock Purchase Orders grouped by vendor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Manually composing emails or messaging customers&lt;/td&gt;
&lt;td&gt;1-Click WhatsApp &amp;amp; Brevo email delivery to client&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Real-world impact:&lt;/strong&gt; Instead of coming home exhausted after a 10-hour job on-site only to sit in front of a laptop doing paperwork until midnight, the contractor takes a photo, speaks a voice note while drinking evening chai, clicks "Approve", and lets ParchiPay do the rest.&lt;/p&gt;




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

&lt;h3&gt;
  
  
  1. Best Use of Gemma
&lt;/h3&gt;

&lt;p&gt;ParchiPay relies on &lt;strong&gt;Gemma&lt;/strong&gt; (&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;) as the central cognitive engine across multiple stages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Handwriting Perception:&lt;/strong&gt; Transcribes complex, low-quality physical paper estimate slips (&lt;em&gt;parchis&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-Modal Reconciliation:&lt;/strong&gt; Resolves discrepancies between speech transcripts and written text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Catalog SKU Mapping:&lt;/strong&gt; Fuzzy-maps colloquial phrasing into structured catalog SKUs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognitive Revenue Guard:&lt;/strong&gt; Audits quoted materials against missing trade services and accessory items to prevent revenue leakage, returning strictly validated Pydantic JSON schemas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Best Use of Render
&lt;/h3&gt;

&lt;p&gt;ParchiPay is configured for full cloud deployment via &lt;strong&gt;Render&lt;/strong&gt; using our declarative Infrastructure-as-Code &lt;code&gt;render.yaml&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;quoteflow-backend:&lt;/strong&gt; Express &amp;amp; TypeScript web service with built-in health check monitoring (&lt;code&gt;/health&lt;/code&gt;), connecting to cloud serverless Neon PostgreSQL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;quoteflow-frontend:&lt;/strong&gt; React 19 / Vite static web service with single-page app rewrites (&lt;code&gt;/* -&amp;gt; /index.html&lt;/code&gt;) and automatic environment variable binding from the backend host.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Team Submissions
&lt;/h2&gt;

&lt;p&gt;Built with ❤️ for Hacktoberfest 2026 by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nitin&lt;/strong&gt; (&lt;a href="https://github.com/n1t1n-cyber" rel="noopener noreferrer"&gt;@n1t1n-cyber&lt;/a&gt;) - Backend Architecture, Email Services (Brevo), WhatsApp Integration &amp;amp; APIs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Siddharth Gupta&lt;/strong&gt; (&lt;a href="https://github.com/siddg1161" rel="noopener noreferrer"&gt;@siddg1161&lt;/a&gt;) - LangGraph Agent Orchestration, Gemma Factory &amp;amp; Neon DB Pipeline&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ravi Bhawsar&lt;/strong&gt; (&lt;a href="https://github.com/raviggbhawsar9090" rel="noopener noreferrer"&gt;@raviggbhawsar9090&lt;/a&gt;) - Frontend Architecture, Dashboards &amp;amp; Portals&lt;/li&gt;
&lt;/ul&gt;

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