<?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: Priyanshu Purohit</title>
    <description>The latest articles on DEV Community by Priyanshu Purohit (@purohitpriyanshu20).</description>
    <link>https://dev.to/purohitpriyanshu20</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%2F4173612%2F65ac9186-a78f-4533-a627-3f9ab1df9ee3.png</url>
      <title>DEV Community: Priyanshu Purohit</title>
      <link>https://dev.to/purohitpriyanshu20</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/purohitpriyanshu20"/>
    <language>en</language>
    <item>
      <title>LIFEFORM: your pulse and breath become a living world, a dashboard, and a piece of music</title>
      <dc:creator>Priyanshu Purohit</dc:creator>
      <pubDate>Sun, 22 Nov 2026 15:56:46 +0000</pubDate>
      <link>https://dev.to/purohitpriyanshu20/lifeform-your-pulse-and-breath-become-a-living-world-a-dashboard-and-a-piece-of-music-3fc6</link>
      <guid>https://dev.to/purohitpriyanshu20/lifeform-your-pulse-and-breath-become-a-living-world-a-dashboard-and-a-piece-of-music-3fc6</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;LIFEFORM&lt;/strong&gt; is a desktop app that reads your pulse rate, breathing rate and heart-rate variability through a camera and turns one measurement session into three experiences:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Experience&lt;/th&gt;
&lt;th&gt;What you get&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;01&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Explore&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A living Canvas world. Its colour, particle speed and density follow your pulse, it expands and contracts at your breathing rate, and its shapes get more irregular with your HRV.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;02&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Understand&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Live readings with confidence, charts, a history of past sessions, side-by-side comparison, and plain-sentence observations.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;03&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Create&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Original music composed on your device from the same numbers. Your pulse sets the tempo, one musical phrase lasts one breath, and HRV adds melodic variation.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The idea in one line: &lt;em&gt;your body creates patterns, and LIFEFORM turns them into things you can see, understand and hear.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You sit in front of the camera for a few minutes. The session keeps running while you move between the three screens, so the world you are watching, the chart you are reading and the music you are hearing are all driven by the same live readings. When you stop, a small numeric summary is saved on your device. You can replay that session in Explore, compare it with others in Understand, or turn it into a composition in Create that plays back the same way every time.&lt;/p&gt;

&lt;p&gt;LIFEFORM is not a medical device. It makes no diagnosis or health claims, and it never reads the numbers as emotions. The mappings are aesthetic.&lt;/p&gt;

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

&lt;p&gt;The demo is in two recordings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://drive.google.com/file/d/1D10d9Qa7VYRKwXtiWvWpo404pAZcKumB/view?usp=sharing" rel="noopener noreferrer"&gt;Demo video, part 1&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://drive.google.com/file/d/1QoNJEdPgALnmISDFQGas4hVWxE3r-n9j/view?usp=sharing" rel="noopener noreferrer"&gt;Demo video, part 2&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What the videos show:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Camera consent on the Welcome page, with the camera still off.&lt;/li&gt;
&lt;li&gt;The free camera check, then starting a real SmartSpectra session.&lt;/li&gt;
&lt;li&gt;Live pulse and breathing readings arriving from the SDK, with confidence.&lt;/li&gt;
&lt;li&gt;Explore responding to those readings.&lt;/li&gt;
&lt;li&gt;Understand: live values, charts, history and comparison.&lt;/li&gt;
&lt;li&gt;Create: live music in the three styles, then a composition from a saved session.&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/priyanshu-purohit" rel="noopener noreferrer"&gt;
        priyanshu-purohit
      &lt;/a&gt; / &lt;a href="https://github.com/priyanshu-purohit/lifeform" rel="noopener noreferrer"&gt;
        lifeform
      &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;p&gt;This is a &lt;a href="https://nextjs.org" rel="nofollow noopener noreferrer"&gt;Next.js&lt;/a&gt; project bootstrapped with &lt;a href="https://nextjs.org/docs/app/api-reference/cli/create-next-app" rel="nofollow noopener noreferrer"&gt;&lt;code&gt;create-next-app&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Getting Started&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;First, run the development server:&lt;/p&gt;
&lt;div class="highlight highlight-source-shell notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm run dev
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; or&lt;/span&gt;
yarn dev
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; or&lt;/span&gt;
pnpm dev
&lt;span class="pl-c"&gt;&lt;span class="pl-c"&gt;#&lt;/span&gt; or&lt;/span&gt;
bun dev&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Open &lt;a href="http://localhost:3000" rel="nofollow noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; with your browser to see the result.&lt;/p&gt;
&lt;p&gt;You can start editing the page by modifying &lt;code&gt;app/page.tsx&lt;/code&gt;. The page auto-updates as you edit the file.&lt;/p&gt;
&lt;p&gt;This project uses &lt;a href="https://nextjs.org/docs/app/building-your-application/optimizing/fonts" rel="nofollow noopener noreferrer"&gt;&lt;code&gt;next/font&lt;/code&gt;&lt;/a&gt; to automatically optimize and load &lt;a href="https://vercel.com/font" rel="nofollow noopener noreferrer"&gt;Geist&lt;/a&gt;, a new font family for Vercel.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Learn More&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;To learn more about Next.js, take a look at the following resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/docs" rel="nofollow noopener noreferrer"&gt;Next.js Documentation&lt;/a&gt; - learn about Next.js features and API.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/learn" rel="nofollow noopener noreferrer"&gt;Learn Next.js&lt;/a&gt; - an interactive Next.js tutorial.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can check out &lt;a href="https://github.com/vercel/next.js" rel="noopener noreferrer"&gt;the Next.js GitHub repository&lt;/a&gt; - your feedback and contributions are welcome!&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Deploy on Vercel&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The easiest way to deploy your Next.js app is to use the &lt;a href="https://vercel.com/new?utm_medium=default-template&amp;amp;filter=next.js&amp;amp;utm_source=create-next-app&amp;amp;utm_campaign=create-next-app-readme" rel="nofollow noopener noreferrer"&gt;Vercel Platform&lt;/a&gt; from the creators of Next.js.&lt;/p&gt;
&lt;p&gt;Check out our &lt;a href="https://nextjs.org/docs/app/building-your-application/deploying" rel="nofollow noopener noreferrer"&gt;Next.js deployment documentation&lt;/a&gt; for more…&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/priyanshu-purohit/lifeform" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Setup instructions are in the README. The short version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/priyanshu-purohit/lifeform.git
&lt;span class="nb"&gt;cd&lt;/span&gt; lifeform
npm install
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"SMARTSPECTRA_API_KEY=your_key_here"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .env
npm run electron:dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need Node.js 20+, a camera, and a Presage API key. No login is required.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;LIFEFORM uses three live Presage signals: &lt;strong&gt;pulse rate&lt;/strong&gt;, &lt;strong&gt;breathing rate&lt;/strong&gt;, and &lt;strong&gt;HRV (RMSSD)&lt;/strong&gt; when the SDK reports it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrating the SDK
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;@smartspectra/node-sdk&lt;/code&gt; runs only in Node.js and Electron, not in a plain browser. So LIFEFORM is a Next.js app loaded inside an Electron window, with three small pieces of integration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Main process.&lt;/strong&gt; It binds the SDK's IPC to the window, grants only the camera permission, and hands the API key to the app page on request. The key lives in a git-ignored &lt;code&gt;.env&lt;/code&gt; and is never bundled into page code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// electron/main.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;win&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BrowserWindow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;webPreferences&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;preload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"preload.js"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;contextIsolation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;sandbox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;nodeIntegration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;bindSmartSpectraIpc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Preload.&lt;/strong&gt; It loads the SDK's bridge and exposes exactly one function to the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// electron/preload.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s2"&gt;"@smartspectra/node-sdk/preload"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;contextBridge&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exposeInMainWorld&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"lifeform"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;getApiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ipcRenderer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"lifeform:get-api-key"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Renderer.&lt;/strong&gt; One module owns the SDK. It asks for the cardio and breathing metric sets, turns telemetry off, and pushes every event into a shared store.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/features/measurements/smartspectra.source.ts&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;instance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SmartSpectraSDK&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="c1"&gt;// cardioMetrics includes PULSE_RATE and HRV; breathingMetrics includes BREATHING_RATE.&lt;/span&gt;
  &lt;span class="n"&gt;requestedMetrics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;breathingMetrics&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cardioMetrics&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;enableTelemetry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"processingStatus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;measurementStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;adaptProcessingStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"validationStatus"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_timestampUs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hint&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;measurementStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setGuidance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hint&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;instance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"metrics"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;measurementStore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ingest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;adaptMetrics&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;decodeMetrics&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"presage-sdk"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The camera stream comes from &lt;code&gt;getUserMedia&lt;/code&gt; and is handed to the SDK with &lt;code&gt;instance.useMediaStream(stream)&lt;/code&gt;, then &lt;code&gt;instance.start()&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  One measurement layer, three experiences
&lt;/h3&gt;

&lt;p&gt;Explore, Understand and Create never touch SDK events. A single adapter converts each &lt;code&gt;metrics&lt;/code&gt; packet into normalized samples (value, unit, timestamp, SDK confidence, SDK stability), and a shared store validates, smooths and tracks freshness. The SDK's &lt;code&gt;validationStatus&lt;/code&gt; hints ("too dark", "too much motion", "frame rate too low") are shown on the Setup screen so you can fix the picture.&lt;/p&gt;

&lt;p&gt;Every reading gets a trust score from 0 to 1, built from freshness, the SDK's &lt;code&gt;stable&lt;/code&gt; flag, and the SDK's confidence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;metricDrive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;MetricState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;latest&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;smoothed&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;freshness&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"waiting"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;freshness&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;freshness&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"live"&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;VISUAL_MAPPING&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;staleInfluence&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;stability&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;latest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;validity&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"valid"&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;VISUAL_MAPPING&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;unsettledInfluence&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;latest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="no"&gt;VISUAL_MAPPING&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;defaultConfidence&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;trust&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.35&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;0.65&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;clamp01&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;freshness&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;stability&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;trust&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That score decides how strongly a signal shapes the picture and the sound. A signal with no reading drives nothing. If the SDK has not reported a pulse, the world has no heartbeat ripple and the music has no percussion. LIFEFORM never shows or plays a rhythm that is not yours, and a missing value is never displayed as zero.&lt;/p&gt;

&lt;h3&gt;
  
  
  What each signal does
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;Explore (Canvas)&lt;/th&gt;
&lt;th&gt;Create (Web Audio)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pulse rate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Colour warmth, particle speed and density; ripples at your pulse rate&lt;/td&gt;
&lt;td&gt;Tempo (kept between 60 and 120 BPM), rhythmic intensity, percussion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Breathing rate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The world expands and contracts once per breath; flow turbulence and trail length&lt;/td&gt;
&lt;td&gt;Phrase length (one phrase per breath), note length, ambient layers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;HRV (RMSSD)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Irregularity of shape and rhythm&lt;/td&gt;
&lt;td&gt;Melodic and harmonic variation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Pulse trend&lt;/strong&gt; (last 30 s vs the 30 s before)&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;Slow changes in dynamics&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The visuals ease toward their targets and the music changes only at bar lines, so a new reading never causes a jump or a glitch.&lt;/p&gt;

&lt;p&gt;The music is procedural: oscillators, filters and gain nodes, with every pitch taken from the style's scale. There are three styles (Ambient, Organic, Electronic) and two modes. &lt;strong&gt;Live Mode&lt;/strong&gt; follows the readings as they arrive. &lt;strong&gt;Session Mode&lt;/strong&gt; composes from a saved session, seeded by the session id, so the same session and style always give the same piece.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting a built-in webcam to work
&lt;/h3&gt;

&lt;p&gt;My only camera is a laptop webcam, and in indoor light its auto-exposure dropped the frame rate too low for a stable reading. So Setup has two steps. &lt;strong&gt;Check camera&lt;/strong&gt; is free: it opens the camera without the SDK and lets you tune exposure and brightness while watching the real frame rate. &lt;strong&gt;Measure&lt;/strong&gt; unlocks only once the camera holds 28 fps or more, and that is the step that spends credits.&lt;/p&gt;

&lt;p&gt;The challenge runs on trial credits, so a live session also stops itself after a time limit you choose, if no pulse is read for 60 seconds, or if the camera disconnects.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Most Creative or Delightful Use.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Camera-based sensing usually ends in a number on a screen. I wanted to see what happens if the number is the start. The part I find most delightful is Create: you sit still, and a piece of music comes out that no one else would have produced, because its tempo is your pulse and its phrases are as long as your breaths. Then you can save the session and hear it again later, note for note.&lt;/p&gt;

&lt;p&gt;What makes it more than a visualizer is that one session becomes three different things, and all three stay honest about the data. When a signal drops out, its part of the world goes quiet instead of being faked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Consent&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Welcome page explains what is measured and how data is handled before anything else happens. The camera is off.&lt;/li&gt;
&lt;li&gt;You must tick a consent box ("I allow LIFEFORM to use my camera to measure pulse and breathing during this session. I can stop at any time.") to continue.&lt;/li&gt;
&lt;li&gt;Consent lasts for one app session only. Every launch asks again. The Setup page sends you back to Welcome if consent is missing.&lt;/li&gt;
&lt;li&gt;The camera turns on only when you press a button on the Setup page. The header shows when the camera is on, and a Stop button is available on every screen. There is no background or hidden monitoring.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Video&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Camera frames are passed to the SmartSpectra SDK running inside the app. LIFEFORM never records, saves or uploads video or images.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Storage and retention&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After a session, LIFEFORM saves only a numeric summary in IndexedDB on your device: start and end time, and for each metric the average, minimum, maximum, spread, confidence and a downsampled line for charts.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;localStorage&lt;/code&gt; holds camera settings (chosen camera, exposure, brightness), the session time limit, and a local estimate of credits used.&lt;/li&gt;
&lt;li&gt;Summaries stay on your device until you delete them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Deletion&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand → History lets you delete a single session or all sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sharing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;None. LIFEFORM has no backend, no accounts and no analytics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;SDK network use and telemetry&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The SmartSpectra SDK contacts Presage's servers to authenticate the API key and meter usage. The SDK's aggregate telemetry is on by default, and LIFEFORM turns it off with &lt;code&gt;enableTelemetry: false&lt;/code&gt;. What the SDK itself transmits is covered by Presage's terms and privacy policy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI services&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;None. The observations are fixed rules over your saved numbers, and the music is generated procedurally on your device.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Not medical&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LIFEFORM is not a medical device. It makes no diagnosis or treatment claims and supports no medical decisions. Observations only describe what the numbers did ("your average pulse in this session was lower than your usual"), never what they mean for your health or mood.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Simulation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Development builds include a simulator so I could work without spending credits. It is always labelled "Simulated data · not a camera reading", and simulated sessions are never mixed with real ones. The demo video uses real SDK readings.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
      <category>typescript</category>
      <category>electron</category>
    </item>
    <item>
      <title>ghost terminal</title>
      <dc:creator>Priyanshu Purohit</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:27:20 +0000</pubDate>
      <link>https://dev.to/purohitpriyanshu20/ghost-terminal-4jen</link>
      <guid>https://dev.to/purohitpriyanshu20/ghost-terminal-4jen</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: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

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

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

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

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

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

&lt;h2&gt;
  
  
  The Spirit of It
&lt;/h2&gt;

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

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>Digital Archaeologist: Rediscovering Forgotten Files with Open AI</title>
      <dc:creator>Priyanshu Purohit</dc:creator>
      <pubDate>Sat, 24 Oct 2026 14:02:19 +0000</pubDate>
      <link>https://dev.to/purohitpriyanshu20/digital-archaeologist-rediscovering-forgotten-files-with-open-ai-3a9b</link>
      <guid>https://dev.to/purohitpriyanshu20/digital-archaeologist-rediscovering-forgotten-files-with-open-ai-3a9b</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: Slow and Steady&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Digital Archaeologist&lt;/strong&gt; is a project designed to help people rediscover forgotten information hidden in their digital files.&lt;/p&gt;

&lt;p&gt;Over time, we collect PDFs, notes, research documents, code snippets, and project ideas. Finding one specific detail months later can mean searching through countless folders and opening files one by one.&lt;/p&gt;

&lt;p&gt;Digital Archaeologist aims to simplify this process. The goal is to let users search their documents, discover related information, and ask questions about their digital archive.&lt;/p&gt;

&lt;p&gt;Think of it as an archaeologist for your digital life: instead of digging through the ground to uncover the past, it searches through forgotten files to uncover useful ideas.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Current status:&lt;/strong&gt;&lt;/p&gt;

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

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

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

&lt;p&gt;I want Digital Archaeologist to be lightweight, accessible, and affordable to run, even for developers without powerful computers or a budget for paid AI services.&lt;/p&gt;

&lt;p&gt;My planned technology stack includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;React + Vite:&lt;/strong&gt; To build the user interface.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF.js:&lt;/strong&gt; To extract text from PDF documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IndexedDB:&lt;/strong&gt; To store imported files and metadata in the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MiniSearch:&lt;/strong&gt; To provide fast, lightweight text search.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma:&lt;/strong&gt; An open-weight AI model to summarize documents, understand their contents, and identify connections between notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Colab or another free-tier runtime:&lt;/strong&gt; To experiment with running AI inference without requiring a powerful local machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The basic search functionality is designed to work without AI. The AI layer can then add document summaries and more intelligent answers.&lt;/p&gt;

&lt;p&gt;I will document the final implementation and any limitations of the free-tier services used.&lt;/p&gt;

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

&lt;p&gt;Digital archives can contain personal notes, unfinished projects, research, and sensitive information. Developers should have control over how this information is processed.&lt;/p&gt;

&lt;p&gt;Open-weight models such as Gemma give developers more flexibility to experiment with AI, adapt their applications, and potentially run models on infrastructure they control.&lt;/p&gt;

&lt;p&gt;For Digital Archaeologist, open AI makes it possible to explore document understanding without making a paid, closed AI API the only option.&lt;/p&gt;

&lt;p&gt;Combining open-weight AI with browser-based storage can also help keep documents on the user's device, provided they are not sent to an external inference service.&lt;/p&gt;

&lt;p&gt;Open models do not automatically guarantee privacy, so the application should clearly explain when information leaves the user's device.&lt;/p&gt;

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

&lt;p&gt;The idea is simple: spend less time searching and more time using the information you already have.&lt;/p&gt;

&lt;p&gt;Instead of opening dozens of documents to find an old project idea, a user should be able to search their archive and jump directly to the relevant source.&lt;/p&gt;

&lt;p&gt;I plan to demonstrate this with a small collection of sample documents and measure how easily the application can retrieve a specific piece of forgotten information.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Intended category: Best Use of Gemma&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  I intend to target this category by making Gemma an important part of the document-understanding workflow, rather than simply mentioning the model in the project.
&lt;/h2&gt;

&lt;p&gt;Thanks for checking out Digital Archaeologist!&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Auditly: the shopkeeper talks, the ledger writes itself</title>
      <dc:creator>Priyanshu Purohit</dc:creator>
      <pubDate>Sun, 18 Oct 2026 10:01:14 +0000</pubDate>
      <link>https://dev.to/purohitpriyanshu20/auditly-the-shopkeeper-talks-the-ledger-writes-itself-5f8a</link>
      <guid>https://dev.to/purohitpriyanshu20/auditly-the-shopkeeper-talks-the-ledger-writes-itself-5f8a</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;My local kirana shop keeps its accounts in a paper khata. The owner writes in it twice a day, when the shop is quiet, from memory. Some days he doesn't.&lt;/p&gt;

&lt;p&gt;He has a smartphone. He has tried two accounting apps. Both wanted him to tap through four screens to record one sale of sugar — slower than the sale itself — and both assumed he reads English comfortably. So the khata stays paper, and at the end of the month nobody really knows what the shop made.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auditly removes the typing.&lt;/strong&gt; He presses one button and says what happened, in Hindi or Hinglish, the way he'd say it to a person:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"paanch kilo cheeni bechi do sau rupaye kilo, aur bijli ka bill bhara baarah sau rupaye"
 (sold five kilos of sugar at two hundred a kilo, and paid the electricity bill, twelve hundred)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Two records appear on screen:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Qty&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Bikri&lt;/strong&gt; (sale)&lt;/td&gt;
&lt;td&gt;Cheeni&lt;/td&gt;
&lt;td&gt;5 kg&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;₹1,000&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Kharch&lt;/strong&gt; (expense)&lt;/td&gt;
&lt;td&gt;Bijli ka bill&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;₹1,200&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note the ₹1,000. He said "two hundred rupees a &lt;em&gt;kilo&lt;/em&gt;" — a rate, not a total. Getting that wrong is the difference between a useful ledger and a worthless one, and it is the single thing I spent the most time on.&lt;/p&gt;

&lt;p&gt;He checks the two rows, fixes anything wrong, saves. Stock moves. And then the app reads his day back to him, out loud, in Hindi:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;नमस्ते। आज की बिक्री 1400 रुपये। खर्च 1700 रुपये। आज 300 रुपये ज़्यादा खर्च हुए।&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The whole loop is voice, in both directions. Someone who reads slowly can still run their books.&lt;/p&gt;
&lt;h3&gt;
  
  
  Who would pay for this
&lt;/h3&gt;

&lt;p&gt;The shopkeeper, directly. A kirana owner will not pay for "business intelligence". He will pay a small monthly fee to stop losing an hour a day and to stop guessing whether this month was better than last. The pitch is one sentence: &lt;em&gt;bolo, hisaab ho gaya&lt;/em&gt; — speak, and it's done.&lt;/p&gt;

&lt;p&gt;There's a second, larger buyer behind that: distributors and FMCG brands pay real money for retail demand data they currently have to infer. But that only works if the shopkeeper trusts the app enough to use it daily, which is why I spent my time on trust rather than dashboards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Being straight with you: I have not charged anyone yet, and I haven't put it in a real shop.&lt;/strong&gt; That's the next thing I do, and it's the part that would actually tell me if any of the above is true.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;Try it: &lt;a href="https://auditly-rosy.vercel.app/" rel="noopener noreferrer"&gt;https://auditly-rosy.vercel.app/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open it on a phone if you can.&lt;/strong&gt; It's built for one hand behind a counter, and the&lt;br&gt;
microphone needs HTTPS — which the deployed version has.&lt;/p&gt;

&lt;p&gt;Thirty seconds to see the whole thing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Press the green mic and say &lt;em&gt;"paanch kilo cheeni bechi do sau rupaye kilo"&lt;/em&gt; — in
Hindi, Hinglish, or English. No signup, nothing to configure.&lt;/li&gt;
&lt;li&gt;Watch the review screen. Two things to notice: the transcript comes back in
Devanagari, and the amount is &lt;strong&gt;₹1,000&lt;/strong&gt;, not ₹200 — it worked out the rate.&lt;/li&gt;
&lt;li&gt;Change something, to see that you always get the last word. Then save.&lt;/li&gt;
&lt;li&gt;Press the dark speaker button and it reads your day back in Hindi.&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;Purane records&lt;/strong&gt; and press &lt;em&gt;Theek karein&lt;/em&gt; on any row. Change the amount and
save — the original stays, struck through, with the new one beside it.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;It's a shared public demo, so you may well find somebody else's sugar in the ledger.&lt;br&gt;
That seemed more useful than hiding it behind a login.&lt;/p&gt;
&lt;/blockquote&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/priyanshu-purohit" rel="noopener noreferrer"&gt;
        priyanshu-purohit
      &lt;/a&gt; / &lt;a href="https://github.com/priyanshu-purohit/auditly" rel="noopener noreferrer"&gt;
        auditly
      &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;Auditly&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;A shopkeeper speaks. Auditly keeps the books.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Small shopkeepers in India keep their accounts in a paper khata, or not at all. Typing
every sale into an app is slower than the sale itself, and most shop software assumes
you read English comfortably. So the books don't get kept.&lt;/p&gt;
&lt;p&gt;Auditly removes the typing. The shopkeeper says what happened, in Hindi or Hinglish
and the day's records write themselves.&lt;/p&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;Shopkeeper: "paanch kilo cheeni bechi do sau rupaye kilo, aur bijli ka bill bhara baarah sau rupaye"

Auditly:    Bikri   Cheeni          5 kg    ₹1,000     ← 5 × 200, worked out
            Kharch  Bijli ka bill           ₹1,200
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then it reads the day back out loud:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;नमस्ते। आज की बिक्री 1400 रुपये। खर्च 1700 रुपये। आज 300 रुपये ज़्यादा खर्च हुए।&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So the whole loop — in and out — is voice. A shopkeeper who reads slowly can still run
their books.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/priyanshu-purohit/auditly" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


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



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    A["Shopkeeper speaks&amp;lt;br/&amp;gt;Hindi / Hinglish"] --&amp;gt; B["ElevenLabs Scribe v2&amp;lt;br/&amp;gt;speech → text"]
    B --&amp;gt; C["gpt-oss-120b&amp;lt;br/&amp;gt;OPEN-WEIGHT MODEL&amp;lt;br/&amp;gt;text → structured records"]
    C --&amp;gt; D["Review screen&amp;lt;br/&amp;gt;correct it before it is saved"]
    D --&amp;gt; E[("MongoDB Atlas&amp;lt;br/&amp;gt;shops · products · transactions")]
    E --&amp;gt; F["Home&amp;lt;br/&amp;gt;cash in / out · stock"]
    E --&amp;gt; G["ElevenLabs TTS&amp;lt;br/&amp;gt;reads the day in Hindi"]
    G --&amp;gt; A&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  The open-weight model is the brain
&lt;/h3&gt;

&lt;p&gt;The part that actually makes Auditly work is &lt;strong&gt;&lt;code&gt;gpt-oss-120b&lt;/code&gt;&lt;/strong&gt;, an open-weight model whose weights are published for anyone to download and self-host. I serve it through Groq's OpenAI-compatible endpoint for speed, but nothing about my code is tied to Groq: the request is a standard &lt;code&gt;chat/completions&lt;/code&gt; call, so pointing it at a local Ollama instance is a change to &lt;strong&gt;one constant&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Its whole job is turning a sentence into rows. The prompt is ~60 lines of plain instruction, and it does four things a generic parser can't:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rate vs total.&lt;/strong&gt; &lt;code&gt;"do sau rupaye kilo"&lt;/code&gt; × 5 kg → ₹1,000. &lt;code&gt;"hazaar rupaye ki"&lt;/code&gt; → ₹1,000 flat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spoken Hindi numbers.&lt;/strong&gt; &lt;code&gt;dhai&lt;/code&gt; → 2.5 · &lt;code&gt;do sau&lt;/code&gt; → 200 · &lt;code&gt;baarah sau&lt;/code&gt; → 1200 · &lt;code&gt;aadha&lt;/code&gt; → 0.5&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Either script, or both at once.&lt;/strong&gt; &lt;code&gt;पाँच किलो चीनी&lt;/code&gt;, &lt;code&gt;paanch kilo cheeni&lt;/code&gt;, and &lt;code&gt;5 किलो cheeni&lt;/code&gt; all parse. Product names always come back romanised so the UI stays consistent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Knowing when nothing happened.&lt;/strong&gt; &lt;code&gt;"namaste bhai kaise ho"&lt;/code&gt; returns zero records instead of inventing a sale.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I don't trust it blindly. The model is asked for JSON at the API level, and then every field is re-validated in my own code — type, name, amount, quantity, unit. Small mistakes get repaired (a number where a string belonged, an unrecognised unit). Anything unusable returns an empty list and the shopkeeper types the row instead. A retry loop would cost him time; a text box costs him five seconds.&lt;/p&gt;

&lt;p&gt;There are &lt;strong&gt;8 automated checks&lt;/strong&gt; for exactly these cases, and they run for free.&lt;/p&gt;

&lt;h3&gt;
  
  
  Voice in and out: ElevenLabs
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Scribe v2&lt;/strong&gt; does speech-to-text and &lt;strong&gt;&lt;code&gt;eleven_multilingual_v2&lt;/code&gt;&lt;/strong&gt; does the speaking. This is the one closed piece in the stack, and I'd rather say that plainly than dress it up. I'm entering the ElevenLabs category because the voice quality is genuinely why the round trip feels like talking to a person instead of operating a machine.&lt;/p&gt;

&lt;p&gt;The spoken summary is composed in &lt;strong&gt;Devanagari&lt;/strong&gt;, deliberately, even though the buttons are in Latin script. Given &lt;code&gt;आज की बिक्री&lt;/code&gt;, the multilingual model produces real Hindi; given &lt;code&gt;aaj ki bikri&lt;/code&gt; it reads English phonetics and sounds wrong.&lt;/p&gt;

&lt;p&gt;Two things I built around the free tier, which gives 10,000 credits a month:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spending is off by default.&lt;/strong&gt; Both voice features need an explicit &lt;code&gt;false&lt;/code&gt; in the environment &lt;em&gt;and&lt;/em&gt; a valid key before a single credit is used. Development runs on a saved transcript and the browser's own voice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/api/speak&lt;/code&gt; takes no text.&lt;/strong&gt; It composes the sentence server-side from the database. An endpoint that voices whatever you POST to it is a free way for a stranger to drain your month.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A detail worth writing down for anyone else hitting it: on the free plan, ElevenLabs &lt;strong&gt;refuses "library" voices over the API with &lt;code&gt;HTTP 402&lt;/code&gt; but allows "premade" ones&lt;/strong&gt;. I burned an afternoon on that error message before a 7-character test call told me the real rule.&lt;/p&gt;

&lt;h3&gt;
  
  
  Storage: MongoDB Atlas
&lt;/h3&gt;

&lt;p&gt;Three collections — &lt;code&gt;shops&lt;/code&gt;, &lt;code&gt;products&lt;/code&gt;, &lt;code&gt;transactions&lt;/code&gt; — on the free tier, via Mongoose.&lt;/p&gt;

&lt;p&gt;Four decisions I'd defend in a code review:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Money is integer paise.&lt;/strong&gt; ₹1,000 is stored as &lt;code&gt;100000&lt;/code&gt;. Money never touches a float, so rounding can never quietly accumulate across a year of sales.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stock is calculated, not stored.&lt;/strong&gt; Current stock = opening + everything bought − everything sold. There's no counter to drift out of sync with reality.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The catalogue builds itself.&lt;/strong&gt; Say "cheeni" and the product is created. Say &lt;code&gt;"  Cheeni "&lt;/code&gt; next week and a lowercase key matches it to the same product instead of making a second one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing is ever deleted or overwritten.&lt;/strong&gt; Correcting a record inserts a new row and marks the old one &lt;code&gt;corrected&lt;/code&gt;, pointing at its replacement. Both stay visible in History, the old one struck through. The replacement keeps the &lt;em&gt;original&lt;/em&gt; date, so fixing yesterday's sale doesn't move the money into today's takings. Day totals count the replacement only.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That last one is the feature I'm proudest of, and it isn't technically impressive — it's just a decision. A shopkeeper has spent his life with a paper book nobody can secretly edit. If my app can quietly change yesterday's numbers, it is worth less to him than the paper. &lt;strong&gt;20 automated checks&lt;/strong&gt; exist purely to prove the original survives a correction.&lt;/p&gt;

&lt;h3&gt;
  
  
  One more honest detail
&lt;/h3&gt;

&lt;p&gt;The summary card says &lt;strong&gt;"Aaj ka cash"&lt;/strong&gt; and never "profit", with a line underneath: &lt;em&gt;yeh profit nahi hai&lt;/em&gt; — this is not profit. Cost of goods sold isn't tracked yet, so calling cash-in-minus-cash-out "profit" would mislead the one person relying on it. I'd rather ship a smaller true number than a bigger false one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; Next.js 16 (App Router, Cache Components) · TypeScript · Tailwind v4 · MongoDB Atlas · Mongoose · gpt-oss-120b on Groq · ElevenLabs Scribe v2 + multilingual v2 · 42 automated checks · &lt;strong&gt;₹0/month to run&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Four reasons, specific to this build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The business only exists at zero marginal cost.&lt;/strong&gt; A kirana shop runs on thin margins. If every spoken sentence cost me a few paise through a closed API, I'd have to charge enough to cover a per-call fee on something a shopkeeper does fifty times a day — and at that price he goes back to paper. Open weights on a free tier, or on hardware I already own, mean the cost of one more record is effectively nothing. That isn't a nice-to-have; it is the entire reason the product can be cheap enough to adopt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. His data can stay in his shop.&lt;/strong&gt; Right now the transcript goes to an API. But because the weights are &lt;em&gt;published&lt;/em&gt;, the understanding step can run on a laptop in the back of the shop with no internet involved — the same model, the same prompt, a different base URL. I cannot offer that with a closed model at any price, because I can't download it. For someone whose turnover is his most sensitive number, "it never leaves this room" is a real feature, and open weights are the only way I can ever promise it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Hinglish is a long tail nobody else will fix for me.&lt;/strong&gt; &lt;code&gt;dhai&lt;/code&gt;, &lt;code&gt;baarah sau&lt;/code&gt;, &lt;code&gt;paav&lt;/code&gt;, code-switching mid-sentence, and the regional vocabulary that changes between two districts. A general-purpose closed API handles this acceptably and will never handle it &lt;em&gt;well&lt;/em&gt;, because my users are a rounding error in its training priorities. With open weights I can fine-tune on Hinglish shop-talk. Today I'm doing it with prompt engineering because that was what fit in a week; the path to doing it properly exists only because the model is open.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. No pricing lock-in on infrastructure I don't control.&lt;/strong&gt; My entire dependency on the model is a URL constant and a text prompt. If Groq's free tier changes tomorrow I move to another host, or to my own machine, and the prompt comes with me. Had I built the core on a proprietary model, a pricing page I don't control would sit between my users and their own accounts.&lt;/p&gt;

&lt;p&gt;And the honest counterweight: &lt;strong&gt;the voice layer is closed today.&lt;/strong&gt; ElevenLabs does the listening and the speaking, and it's good enough that I'd miss it. But the app already ships a fully-open fallback — the browser's built-in speech synthesis reads the summary when ElevenLabs isn't configured, free and offline. The open path works; the closed one just sounds better. If the economics ever force the choice, the app keeps running.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5hg57hsm04lca51a81ua.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%2F5hg57hsm04lca51a81ua.png" alt=" " width="799" height="523"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhyquooa4x4oeqqj826hw.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%2Fhyquooa4x4oeqqj826hw.png" alt=" " width="799" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs&lt;/strong&gt; — speech-to-text for Hindi/Hinglish input, and text-to-speech reading the day's figures back in Devanagari Hindi. Both directions of the core loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of MongoDB Atlas&lt;/strong&gt; — three collections modelling an append-only ledger: integer paise, derived stock, and corrections that supersede rather than overwrite.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built between 13 and 18 October 2026. Free tiers only, start to finish.&lt;/em&gt;&lt;/p&gt;

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