<?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: Aditya Kumar</title>
    <description>The latest articles on DEV Community by Aditya Kumar (@member_c5e0aff5).</description>
    <link>https://dev.to/member_c5e0aff5</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%2F3243799%2Ff4dd794f-804a-4ad7-b41b-fd2457d9a1ee.png</url>
      <title>DEV Community: Aditya Kumar</title>
      <link>https://dev.to/member_c5e0aff5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/member_c5e0aff5"/>
    <language>en</language>
    <item>
      <title>Built for Dad: A Local Inventory App That Talks Back</title>
      <dc:creator>Aditya Kumar</dc:creator>
      <pubDate>Mon, 05 Oct 2026 00:07:58 +0000</pubDate>
      <link>https://dev.to/member_c5e0aff5/built-for-dad-a-local-inventory-app-that-talks-back-4bl8</link>
      <guid>https://dev.to/member_c5e0aff5/built-for-dad-a-local-inventory-app-that-talks-back-4bl8</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;StockPile&lt;/strong&gt; is a desktop inventory manager I built for my dad. It tracks batches of perishable goods - medicines, spices, or anything with an expiry date - entirely on his laptop. Nothing leaves his machine: no cloud, no API keys, no telemetry. Data lives in a single SQLite file tucked away in his home folder.&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm0w8wu6nx4r1oa7u67vc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm0w8wu6nx4r1oa7u67vc.gif" alt=" " width="760" height="411"&gt;&lt;/a&gt;&lt;/p&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/GxAditya" rel="noopener noreferrer"&gt;
        GxAditya
      &lt;/a&gt; / &lt;a href="https://github.com/GxAditya/StockPile" rel="noopener noreferrer"&gt;
        StockPile
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


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

&lt;p&gt;I built this app using opencode in a single night . &lt;/p&gt;

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



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    subgraph Renderer["Webview renderer (React 19 + TypeScript)"]
        UI["UI: Dashboard, Inventory, Sell, History, Agent"]
        Search[Full-text search, typeahead]
    end

    subgraph Rust["Tauri v2 (Rust core)"]
        IPC["Tauri commands (IPC API)"]
        DB[SQLite via rusqlite]
        Ollama[Ollama HTTP client]
    end

    subgraph LLM["Local LLM (Ollama)"]
        FG[Function Gemma - tool calls only]
        G4E["Gemma-4-e2b - reasoning &amp;amp; chat"]
    end

    UI --&amp;gt;|"invoke()"| IPC
    IPC --&amp;gt;|read/write| DB
    IPC --&amp;gt;|prompt| Ollama
    Ollama --&amp;gt;|FG| FG
    Ollama --&amp;gt;|G4E| G4E
    DB --&amp;gt;|answer rows| Ollama

    style Renderer fill:#f0f9ff,stroke:#3366cc,stroke-width:1px,color:#0b3a75
    style Rust fill:#e8f5e9,stroke:#2e7d32,stroke-width:1px,color:#1b5e20
    style LLM fill:#fafafa,stroke:#9e9e9e,stroke-width:1px,color:#212121
    style FG fill:#fff3e0,stroke:#bf360c,stroke-width:1px,color:#3e2723
    style G4E fill:#fff3e0,stroke:#bf360c,stroke-width:1px,color:#3e2723&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Agentic layer
&lt;/h3&gt;

&lt;p&gt;For natural‑language queries the app routes the request through two tiny open‑source models hosted by Ollama:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Function Gemma&lt;/strong&gt; (gemma3:270m) - a ultra‑light model that only generates a small JSON payload describing which tool to call and its arguments. It never returns free‑form text. The Rust backend validates the payload against a closed enum of allowed commands (add_batch, record_sale, query_stock, etc.) and then executes the command against SQLite. Because the model never sees raw stock numbers, it cannot hallucinate quantities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma‑4‑e2b&lt;/strong&gt; (gemma4:e2b) - a slightly larger model that receives the retrieved database rows as context and produces a conversational response sent back to the user through the agent chat panel. It runs only when the user asks a “why” or “what‑if” question; after it finishes the model is evicted immediately, keeping RSS under 400 MB.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The flow is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User types a sentence in the agent panel (e.g., “Sold 5 Panadol to Mr Sharma”).&lt;/li&gt;
&lt;li&gt;The Rust side sends a concise prompt to &lt;strong&gt;Function Gemma&lt;/strong&gt;, which returns a JSON like &lt;code&gt;{ "tool": "record_sale", "args": { "buyer": "Mr Sharma", "qty": 5, "product": "Panadol" } }&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The backend validates and runs the tool, writes the ledger row, and returns a short confirmation.&lt;/li&gt;
&lt;li&gt;If the user asks “What’s expiring this month?” the prompt is sent to &lt;strong&gt;Gemma‑4‑e2b&lt;/strong&gt;, which looks at the rows returned from SQLite and drafts a natural‑language answer such as “Three batches of amoxicillin expire within 30 days.”&lt;/li&gt;
&lt;li&gt;The answer streams into the chat panel. The model is then unloaded, and the next request starts fresh.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  How it flows
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User interaction&lt;/strong&gt; - clicking a button or typing in the React UI.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IPC call&lt;/strong&gt; - the renderer sends a request through Tauri’s Rust‑exposed command surface.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rust backend&lt;/strong&gt; - the command reads or writes the local SQLite database (append‑only ledger, batch table, product table).
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM involvement&lt;/strong&gt; -

&lt;ul&gt;
&lt;li&gt;For intent parsing or tool‑call generation, the prompt is forwarded to &lt;strong&gt;Function Gemma&lt;/strong&gt;, which returns a minimal JSON payload. The backend validates and executes the command.
&lt;/li&gt;
&lt;li&gt;For explanatory answers, the prompt is forwarded to &lt;strong&gt;Gemma‑4‑e2b&lt;/strong&gt;, which receives the retrieved rows and produces a short narrative.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result back&lt;/strong&gt; - the response travels back through IPC to the UI, which updates the view (e.g., new ledger row, formatted answer in the chat panel).
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both models run locally on Ollama and are evicted after each request.Everything runs on the user’s machine, there’s no network dependency . &lt;/p&gt;




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

&lt;p&gt;Using a local LLM keeps everything on the user’s machine, which matters for an app built for dad:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Privacy – no data leaves the laptop, so personal inventory details never travel over the internet.&lt;/li&gt;
&lt;li&gt;Offline first – the app works without an internet connection, so stock can be added or queried even when the network is down.&lt;/li&gt;
&lt;li&gt;No API keys or subscriptions – there are no monthly fees or secret tokens to manage, making the app simpler to set up and maintain.&lt;/li&gt;
&lt;li&gt;Cost‑free – running a small model locally costs nothing compared with per‑token pricing from a cloud service.&lt;/li&gt;
&lt;li&gt;Reliability – the app isn’t dependent on a third‑party service being up; if the LLM process stops the deterministic rule‑based parser takes over instantly.&lt;/li&gt;
&lt;li&gt;Full control – the model, its size, and the keep‑alive behaviour can be tuned to keep RAM usage low (under 400 MB) and ensure the UI stays responsive.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Gemma &lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
