<?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: Afreen Hossain</title>
    <description>The latest articles on DEV Community by Afreen Hossain (@afreenorbit).</description>
    <link>https://dev.to/afreenorbit</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%2F3886529%2F15dbe522-8406-45da-9f29-bea028cbffc2.png</url>
      <title>DEV Community: Afreen Hossain</title>
      <link>https://dev.to/afreenorbit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afreenorbit"/>
    <language>en</language>
    <item>
      <title>Pinlight: I was too lazy to read a 40-page datasheet, so I built an interactive electronics tutor</title>
      <dc:creator>Afreen Hossain</dc:creator>
      <pubDate>Sun, 25 Oct 2026 10:19:59 +0000</pubDate>
      <link>https://dev.to/afreenorbit/pinlight-i-was-too-lazy-to-read-a-40-page-datasheet-so-i-built-an-interactive-electronics-tutor-46ff</link>
      <guid>https://dev.to/afreenorbit/pinlight-i-was-too-lazy-to-read-a-40-page-datasheet-so-i-built-an-interactive-electronics-tutor-46ff</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;“Connect GPIO17 to the LED.”&lt;/p&gt;

&lt;p&gt;That sounds simple until you ask: which physical pin is GPIO17, where does ground go, and why is there a resistor in the diagram?&lt;/p&gt;

&lt;p&gt;I wanted those answers beside the board, with one small thing to do next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pinlight is an interactive learning desk for electronics.&lt;/strong&gt; It brings a 3D board, guided activities, a source-linked AI tutor and your progress into one workspace. Raspberry Pi 5 and Arduino Uno R3 have prepared lessons; uploaded electronics PDFs get a separate journey built around their source pages.&lt;/p&gt;

&lt;p&gt;The chat sits on the left, the board in the middle, and the lesson trail on the right. Select a component and it lights up while the rest fades back. Ask about it, follow its source, or move to the next step.&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%2Fgf9b8v2ystjg2hfcsrn2.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%2Fgf9b8v2ystjg2hfcsrn2.png" alt="The Pinlight learning desk: chat, 3D board and guided trail" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Explore, ask and make something
&lt;/h4&gt;

&lt;p&gt;You can rotate and zoom the board, show component labels, and inspect the Pi's 40-pin header. Physical positions and BCM GPIO names are shown separately, so GPIO17 does not get confused with physical pin 17.&lt;/p&gt;

&lt;p&gt;Both boards have five activities, each with four guided steps:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Activity&lt;/th&gt;
&lt;th&gt;What you can try&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Blink an LED&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Change the timing and watch the signal switch on and off.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Read a button&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Press or release the virtual button and observe its input state.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mix an RGB LED&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Adjust red, green and blue independently and see the resulting colour.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Play a buzzer&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Change its pitch and timing, with sound you can turn on or mute.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Move a servo&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Set an angle, hold a position or sweep back and forth.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The preview shows the relevant pins, connections and control values. Reference code updates with your settings: Python for Raspberry Pi and an Arduino sketch for Uno. You can open it, follow highlighted lines and copy it.&lt;/p&gt;

&lt;p&gt;These are &lt;strong&gt;on-screen teaching previews&lt;/strong&gt;, not measurements from connected hardware. The code highlighting illustrates the prepared program; it does not execute arbitrary Python or C++ in your browser.&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%2Fwai36p6xlfrrpwi3h4tn.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%2Fwai36p6xlfrrpwi3h4tn.png" alt="Following the signal through the wire, resistor and LED" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  One chat, including voice
&lt;/h4&gt;

&lt;p&gt;Ask “Why does the LED need a resistor?” and the tutor answers using the lesson's sources. You can also say “next step,” “show the pin map,” “zoom in,” “open the code,” or “make something” to control the desk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speak&lt;/strong&gt; enables spoken replies in the chat. &lt;strong&gt;Wispr Flow&lt;/strong&gt; puts dictation into the text field, with optional auto-send. &lt;strong&gt;Bolna&lt;/strong&gt; delivers the replies using &lt;strong&gt;ElevenLabs&lt;/strong&gt; for English or &lt;strong&gt;Sarvam&lt;/strong&gt; for Hindi.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stop dictation&lt;/strong&gt; switches to continuous Bolna listening, where &lt;strong&gt;Deepgram&lt;/strong&gt; transcribes your speech. Those requests use the same chat handler, so a spoken command can change the scene and a question can reach the tutor. Say “stop listening” to finish. Continuous sessions are consented, last up to three minutes and require the desk tab to stay open.&lt;/p&gt;

&lt;h4&gt;
  
  
  Turn a PDF into a journey
&lt;/h4&gt;

&lt;p&gt;Upload an electronics PDF and follow its progress as Pinlight reads the pages, extracts device details and builds the journey. Scanned pages can go through local OCR—text recognition for pages that are images.&lt;/p&gt;

&lt;p&gt;The workspace includes source passages, a search within each lesson, the original PDF reader, learning notes and a self-check before continuing. Where the document supports it, a device-review panel shows package variants, pin names, dimensions, electrical characteristics and missing information. Selecting a source-linked component or citation opens the original page.&lt;/p&gt;

&lt;p&gt;Known boards use their prepared models. Other documents can produce &lt;strong&gt;approximate package scenes&lt;/strong&gt; from recognized information; Pinlight does not promise an accurate replica of every uploaded board. Unknown pins and missing specifications stay unknown.&lt;/p&gt;

&lt;p&gt;Suitable journeys also offer example voltage-divider or RC charging activities. You can change component values and inspect calculated outputs or a charging curve. These are separate teaching circuits, not automatic simulations of the uploaded device.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SerpApi&lt;/strong&gt; adds manufacturer-reference search. Its results remain links to inspect, rather than becoming accepted device facts automatically.&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%2Fdghv8zuggb6birvh12xl.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%2Fdghv8zuggb6birvh12xl.png" alt="An uploaded PDF beside its learning journey and source reader" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Return to your own desk
&lt;/h4&gt;

&lt;p&gt;Sign in with &lt;strong&gt;Auth0&lt;/strong&gt; to keep board-specific chats, uploaded PDFs, journey notes and progress in &lt;strong&gt;My desk&lt;/strong&gt;. Items are grouped into boards, chips, modules and other documents, with their own conversations. You can reopen or remove saved items and chats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supabase&lt;/strong&gt; stores the signed-in learning data and private PDFs. Ownership checks keep saved material scoped to the right account. Prepared lessons remain available without signing in.&lt;/p&gt;

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

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ColZkYVXZwY" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it:&lt;/strong&gt; &lt;a href="https://pinlight.afreenorbit.tech/learn" rel="noopener noreferrer"&gt;pinlight.afreenorbit.tech/learn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A quick route: explore the Pi's pin map, open &lt;strong&gt;Blink an LED&lt;/strong&gt;, change its timing, ask why the resistor is there, then switch to Arduino or upload a PDF. Sign in to revisit your chat and progress later.&lt;/p&gt;

&lt;p&gt;The API may take a moment to wake up after being idle.&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/afreenorbit" rel="noopener noreferrer"&gt;
        afreenorbit
      &lt;/a&gt; / &lt;a href="https://github.com/afreenorbit/pinlight" rel="noopener noreferrer"&gt;
        pinlight
      &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;Pinlight&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Understand the board. Follow the connection. See what changes.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pinlight turns electronics PDFs into source-linked learning journeys, alongside prepared Raspberry Pi 5 and Arduino Uno R3 lessons. It brings a selectable 3D board, guided circuit activities, reference code, a source-linked AI tutor and a consent-gated voice tutor into one workspace.&lt;/p&gt;
&lt;p&gt;Built for the &lt;a href="https://dev.to/challenges/hacktoberfest-week3-2026-10-19" rel="nofollow"&gt;Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://pinlight.afreenorbit.tech/learn" rel="nofollow noopener noreferrer"&gt;Explore Pinlight&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/afreenorbit/pinlight/docs/blog/s2-trail-focus.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fafreenorbit%2Fpinlight%2FHEAD%2Fdocs%2Fblog%2Fs2-trail-focus.png" alt="Pinlight learning desk with tutor chat, an interactive board and a guided trail"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why it matters&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;A beginner's first circuit can mean switching between a datasheet, a pinout, wiring instructions and a code example. Pinlight keeps those pieces together: select a part, inspect its pins, follow a connection and ask why it works. The goal is to make starting electronics more approachable and let learners spend their effort understanding the circuit.&lt;/p&gt;
&lt;p&gt;Today, the catalogue includes &lt;strong&gt;2 boards, 5 experiment types per board and 20 guided experiment steps per board&lt;/strong&gt;. The Pi has 18 selectable board stops…&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/afreenorbit/pinlight" 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;p&gt;The tutor uses &lt;strong&gt;Mastra&lt;/strong&gt; with &lt;strong&gt;&lt;code&gt;openai/gpt-oss-120b&lt;/code&gt;&lt;/strong&gt;, an open-weight model served through &lt;strong&gt;Groq&lt;/strong&gt;. The open model handles questions; prepared lessons and small command handlers keep navigation predictable.&lt;/p&gt;

&lt;p&gt;When you ask a question:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The server gathers the current board, lesson, selected part and source excerpts.&lt;/li&gt;
&lt;li&gt;Mastra asks the model for an answer, its source references and an optional component to focus.&lt;/li&gt;
&lt;li&gt;Pinlight checks that those references and component names exist in the lesson.&lt;/li&gt;
&lt;li&gt;The desk displays the explanation, links its sources and focuses the relevant part.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Those checks catch invalid references and targets; they cannot prove every sentence correct. If the model is unavailable, a labelled local guide can answer from prepared material.&lt;/p&gt;

&lt;h4&gt;
  
  
  What each tool contributes
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;React + Vite&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The interface, chat, controls and account pages.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Three.js + Hugeicons&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The 3D scenes and the interface icons.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Node.js + SQLite&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The API, document records, processing jobs and cached results.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mastra + gpt-oss-120b on Groq&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The open-model tutor and its structured answers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;PDF.js + Tesseract.js&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reading PDF text, displaying source pages and recognizing text in scans.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Auth0 + Supabase&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sign-in, private file storage, saved chats and progress.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Wispr Flow&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Desktop dictation into the focused chat input.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bolna + Deepgram&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Browser voice sessions and continuous speech transcription.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ElevenLabs + Sarvam&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;English and Hindi speech, respectively, through Bolna.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SerpApi&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manufacturer-reference search.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vercel + Render&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Hosting the frontend and API, respectively. Groq hosts model inference.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;.tech&lt;/code&gt; domain&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The public desk and API addresses.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Supporting tools include &lt;strong&gt;Zod&lt;/strong&gt; for data checks, &lt;strong&gt;jose&lt;/strong&gt; for verifying sign-in tokens, and &lt;strong&gt;&lt;code&gt;@napi-rs/canvas&lt;/code&gt;&lt;/strong&gt; for rendering PDF pages on the server. Node's test runner checks workflows; &lt;strong&gt;pdf-lib&lt;/strong&gt; creates PDF test fixtures, and &lt;strong&gt;pg&lt;/strong&gt; supports database migrations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docling&lt;/strong&gt; is an optional local table-reading worker. &lt;strong&gt;Groq-assisted PDF extraction&lt;/strong&gt; is also optional and can use selected page images when a vision model is configured. The local extraction path remains available. Wispr works through its desktop app; Pinlight does not embed a Wispr recognition API.&lt;/p&gt;

&lt;p&gt;PDF processing has a few practical safeguards: file and page limits, duplicate detection, a queue with visible stages, saved results and checks against the source. Search results are cached. Provider keys stay on the server, and requests that spend credits are limited.&lt;/p&gt;

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

&lt;p&gt;I want teachers and learners to be able to adapt the experience: change the lessons, inspect how answers are assembled, or try another model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mastra&lt;/strong&gt; makes the tutor workflow inspectable. An &lt;strong&gt;open-weight model&lt;/strong&gt; leaves room to change inference providers or investigate self-hosting on suitable hardware. &lt;strong&gt;PDF.js, Tesseract and Three.js&lt;/strong&gt; provide open building blocks for reading documents and explaining them visually.&lt;/p&gt;

&lt;p&gt;That flexibility matters for learners working with limited equipment and moving between Hindi and English. It gives the project room to adapt its cost, language and teaching approach.&lt;/p&gt;

&lt;p&gt;Pinlight currently uses hosted inference, which has costs and needs internet access. Local OCR keeps that reading step on the API server; it does not make the whole app offline.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Impact I Want
&lt;/h4&gt;

&lt;p&gt;A beginner should be able to point to the right pin, explain why the resistor is there, and predict what changing a control will do. Pinlight puts the diagram, explanation, example code and next step together to support that process.&lt;/p&gt;

&lt;p&gt;Voice could also reduce trips back to the mouse when someone's hands are occupied with a breadboard. A teacher could reuse the same guided trail instead of rebuilding an explanation for each learner.&lt;/p&gt;

&lt;p&gt;I have not measured learning improvement or time saved yet. My first learner test will ask beginners to identify a pin, explain the resistor and predict LED timing, then record accuracy, completion time and their explanations. Those results will be more useful than an invented percentage.&lt;/p&gt;

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

&lt;p&gt;These are planned extensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Camera lessons:&lt;/strong&gt; identify a compatible camera and connector, follow setup, capture a first image and explore basic image processing. An optional camera view for discussing a physical setup would need consent and clear limits on what an image can establish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A small rover:&lt;/strong&gt; combine a controller, motor driver, power source and sensor through short lessons. Start with an on-screen preview, then test physical hardware before offering deployment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;More experiments:&lt;/strong&gt; analogue sensors, motor-speed control and simple I²C/SPI peripherals, each with board-specific wiring, sources and reference code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Better learning checks:&lt;/strong&gt; ask learners to predict, observe and explain, then test the lessons with beginners. I also want a clearer contribution format for adding board packages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The next step is to verify the current activities on hardware and with learners, then build toward those larger projects.&lt;/p&gt;

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

&lt;p&gt;For &lt;strong&gt;Slow and Steady&lt;/strong&gt;, I wanted to automate the repeated work around learning: finding the relevant passage, matching it to a visible part, locating an example and recovering your place.&lt;/p&gt;

&lt;p&gt;Open the LED trail, follow the highlighted connection, ask your question and try a change. The learner still does the thinking; Pinlight keeps the supporting material within reach.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Mastra:&lt;/strong&gt; an open-source agent framework runs the tutor over an open-weight model, with source and component checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render:&lt;/strong&gt; the live API runs the tutor workflow, document processing, reference search and voice bridge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Auth0 for AI Agents:&lt;/strong&gt; sign-in connects the learning assistant to each user's private saved desk and documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of SerpApi:&lt;/strong&gt; manufacturer-reference search helps learners find further documentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs:&lt;/strong&gt; English replies give the tutor a voice through Bolna; Hindi uses Sarvam.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of a .tech Domain:&lt;/strong&gt; the desk is live at &lt;a href="https://pinlight.afreenorbit.tech" rel="noopener noreferrer"&gt;pinlight.afreenorbit.tech&lt;/a&gt;, with its API at &lt;code&gt;api.afreenorbit.tech&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Raspberry Pi and Arduino names belong to their owners. Pinlight is not affiliated with either organization.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>electronics</category>
      <category>ai</category>
    </item>
    <item>
      <title>Gemma 4 at the Edge</title>
      <dc:creator>Afreen Hossain</dc:creator>
      <pubDate>Sun, 24 May 2026 07:43:54 +0000</pubDate>
      <link>https://dev.to/afreenorbit/gemma-4-at-the-edge-365g</link>
      <guid>https://dev.to/afreenorbit/gemma-4-at-the-edge-365g</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Write About Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  A Developer's Guide to Privacy-First, Multimodal, and Multi-Scale Local AI
&lt;/h1&gt;

&lt;p&gt;For years, the developer path to building AI-powered software followed a predictable, rigid pattern: sign up for a cloud service, get an API key, write some prompt orchestration, and hope the pricing tiers or model deprecation schedules don't break your app. &lt;/p&gt;

&lt;p&gt;But this "black-box API" paradigm is hitting serious roadblocks. Developers are increasingly building for environments where &lt;strong&gt;data privacy is non-negotiable, internet connection is unreliable, and external data storage is a compliance nightmare&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Google’s native &lt;strong&gt;Gemma 4&lt;/strong&gt; lineup marks a massive shift in developer sovereignty. It is a family of highly capable, open-weight models that can be run entirely locally. &lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Imperative of Privacy-First, Offline AI
&lt;/h2&gt;

&lt;p&gt;The most common hurdle in traditional AI development is trust. When building applications that handle highly personal or proprietary data, sending user logs to a third-party cloud server is often a dealbreaker. &lt;/p&gt;

&lt;p&gt;Consider these real-world development scenarios:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Healthcare Assistants&lt;/strong&gt;: Summarizing medical logs or patient journals where HIPAA compliance is critical.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal Enterprise Docs&lt;/strong&gt;: Indexing sensitive codebase repositories, private financial charts, or confidential intellectual property.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Student Tools&lt;/strong&gt;: Educational tools built to run in remote areas, offline classrooms, or regions with high internet latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Personal Journaling Apps&lt;/strong&gt;: Giving users a digital second-brain where thoughts are analyzed for sentiment, completely local to the device.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By utilizing Gemma 4, developers can achieve &lt;strong&gt;100% offline autonomy&lt;/strong&gt;. There are no API calls, no third-party logs, and zero data leakage. Your user's information stays exactly where it belongs: on their physical device.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Choosing the Right Model: E2B vs. E4B vs. 31B Dense
&lt;/h2&gt;

&lt;p&gt;Gemma 4 is not a single model,it is a family of architectures tailored to different compute budgets. Picking the right variant is key to balancing user experience, latency, and hardware constraints.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model Variant&lt;/th&gt;
&lt;th&gt;Reasoning Depth&lt;/th&gt;
&lt;th&gt;Average Latency&lt;/th&gt;
&lt;th&gt;Memory Profile&lt;/th&gt;
&lt;th&gt;Best Suited For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Gemma 4 E2B&lt;/strong&gt; &lt;em&gt;(Edge-to-Boundary)&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Lightweight/Stable&lt;/strong&gt;&lt;br&gt;Excels at single-turn instructions, classification, and simple extraction.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Extremely Fast&lt;/strong&gt;&lt;br&gt;(Sub-second to 2s)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Ultra-Low&lt;/strong&gt;&lt;br&gt;Runs smoothly on 8GB RAM laptops and mobile hardware.&lt;/td&gt;
&lt;td&gt;Offline CLI assistants, on-device text parsing, fast keyword mapping, and simple agents.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemma 4 E4B&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Balanced&lt;/strong&gt;&lt;br&gt;Strong semantic understanding, RAG-friendly formatting, and structured outputs.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Moderate&lt;/strong&gt;&lt;br&gt;(2s to 5s)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Medium&lt;/strong&gt;&lt;br&gt;Optimized for 8GB–16GB developer setups.&lt;/td&gt;
&lt;td&gt;Local RAG pipelines, intermediate summarization, multi-turn chat applications, and schema validation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemma 4 31B Dense&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Enterprise Grade&lt;/strong&gt;&lt;br&gt;Superior coding assistance, multi-step logical planning, and heavy mathematical reasoning.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Variable/High&lt;/strong&gt;&lt;br&gt;(8s to 12s on local edge)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High&lt;/strong&gt;&lt;br&gt;Requires 24GB+ VRAM or unified Apple Silicon memory.&lt;/td&gt;
&lt;td&gt;Complex code generation, intricate multi-agent systems, deep document analysis, and cloud hosting.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Selecting Your Variant
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use E2B&lt;/strong&gt; when latency and memory are your tightest bottlenecks. It is designed to act as a fast, high-speed, local utility.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use E4B&lt;/strong&gt; for standard text-processing applications where you need the model to follow complex formatting instructions (like returning clean JSON or structured markdown summaries) without a high latency penalty.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use 31B Dense&lt;/strong&gt; when you are building analytical systems, writing advanced code synthesis engines, or running batch processing workloads where reasoning depth overrides speed.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Beyond Text: Practical Multimodal Workflows
&lt;/h2&gt;

&lt;p&gt;Chatbots are only a tiny sliver of the AI landscape. In real-world software engineering, raw user inputs are rarely formatted as clean text. Instead, users provide blurry phone photos, receipt scans, metro ticket images, or system screenshots.&lt;/p&gt;

&lt;p&gt;Gemma 4's multimodal capabilities make it exceptionally powerful at grounding natural language reasoning in raw visual context. &lt;/p&gt;

&lt;h2&gt;
  
  
  4. Reclaiming Developer Sovereignty
&lt;/h2&gt;

&lt;p&gt;When you build with closed APIs, you are at the mercy of black-box model changes. A prompt that works flawlessly today might break tomorrow due to upstream model drift. You cannot inspect the raw weights, you cannot benchmark changes deterministically, and you cannot verify how your data is being handled.&lt;/p&gt;

&lt;p&gt;With Gemma 4:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You Can Inspect&lt;/strong&gt;: Study how the model handles tokenization boundaries and inspect active attention behaviors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You Can Quantize&lt;/strong&gt;: Compile custom, highly compressed runtime profiles (such as setting Ollama context boundaries like &lt;code&gt;num_ctx 128&lt;/code&gt; or &lt;code&gt;num_predict 64&lt;/code&gt; for E2B) to fit specific hardware targets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You Can Reproduce&lt;/strong&gt;: Ensure your application behaves identically every single time, completely immune to cloud drift or API outages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You Can Adapt&lt;/strong&gt;: Fine-tune the weights on domain-specific medical, legal, or transit databases, creating a highly specialized system that operates entirely under your control.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Gemma 4 proves that open-source models aren't just toys for hobbyists,they are the core building blocks for resilient, private, and highly customized modern software architectures.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;How are you planning to deploy Gemma 4 in your next project? Are you optimizing E2B for on-device edge workflows or building local RAG pipelines with E4B?&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>Find Your Route</title>
      <dc:creator>Afreen Hossain</dc:creator>
      <pubDate>Sun, 24 May 2026 07:30:29 +0000</pubDate>
      <link>https://dev.to/afreen007/find-your-route-2mc9</link>
      <guid>https://dev.to/afreen007/find-your-route-2mc9</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Find-Your-Route&lt;/strong&gt; is an edge-aligned, high-throughput civic transit co-pilot and real-time ecological impact dashboard built with an &lt;strong&gt;extreme focus on backend architectural optimization, low-latency pipeline performance, and offline resilience&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;By applying production-grade backend engineering principles, such as &lt;strong&gt;semantic Redis caching, upstream rate-limiting protection, and decoupled micro-pipelines&lt;/strong&gt;, the system bridges the gap between raw physical tickets and immediate, intelligent transit routing. Commuters upload a photo of a physical paper ticket and receive custom-tailored travel itineraries alongside visual greenhouse gas offsets in under two seconds.&lt;/p&gt;

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

&lt;p&gt;Most AI-driven transit or navigation solutions suffer from three fundamental bottlenecks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Unacceptable Latency&lt;/strong&gt;: Running raw images through heavy multimodal vision models takes upwards of 80 seconds, which is completely non-viable for commuters moving through busy metro turnstiles. Uploading the same ticket at different times would call the API again, which increases latency and wastes computation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connectivity &amp;amp; Availability Drops&lt;/strong&gt;: Cloud-only APIs fail completely inside deep underground transit corridors or under heavy API rate-congestions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redundant Computation&lt;/strong&gt;: Re-running costly LLM queries for the same common commuter routes drives up latency and API expenses.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Solution: An Optimized Backend Architecture
&lt;/h3&gt;

&lt;p&gt;To solve this, we designed &lt;strong&gt;Find-Your-Route&lt;/strong&gt; around a modular, decoupled backend built to deliver lightning-fast responses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One-Command Containerized Deployment&lt;/strong&gt;: The entire backend ecosystem (FastAPI, EasyOCR pipelines, and the Redis cache) is fully Dockerized. A single command (&lt;code&gt;docker compose up --build&lt;/code&gt;) spins up the entire stack on any machine, making deployment instant and reproducible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Decoupled Ingest Pipeline&lt;/strong&gt;: Rather than relying on cloud vision APIs, a local, high-speed &lt;strong&gt;EasyOCR&lt;/strong&gt; pipeline extracts raw ticket text, which is parsed by regex-based station tokenizers in &lt;strong&gt;~1.6 seconds&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-Performance Redis Caching&lt;/strong&gt;: Commuters traveling the same routes hit a canonical &lt;code&gt;source:destination&lt;/code&gt; key in memory. The system retrieves pre-computed route insights in &lt;strong&gt;under 1ms&lt;/strong&gt;, yielding a blazing-fast warm-cache API response of &lt;strong&gt;~1.8 seconds&lt;/strong&gt; (completely bypassing LLM latency).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual-Model Edge Fallback &amp;amp; API Protection&lt;/strong&gt;: If cloud APIs face rate limits or latency spikes, the backend automatically fails over in &lt;strong&gt;less than 500ms&lt;/strong&gt; to a local Ollama instance running &lt;strong&gt;Gemma 4 E2B&lt;/strong&gt; on edge infrastructure, ensuring transit guidance is never disrupted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-Memory Profile Optimization&lt;/strong&gt;: By utilizing customized Ollama runtime parameters, the local &lt;strong&gt;Gemma 4 E2B&lt;/strong&gt; model runs smoothly on standard development laptops and low-memory profiles, making offline edge-deployment highly viable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vibrant Eco-Analytics Dashboard&lt;/strong&gt;: Frontend React Native elements consume rapid, clean JSON payloads to render interactive, SVG-based ecological footprint metrics (trees saved, carbon saved), upcoming metro timings and carriage crowding heatmaps.&lt;/li&gt;
&lt;/ul&gt;

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


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://drive.google.com/file/d/12-OXjNdV7-GgyCoG7o_yAutJ3GszuCVj/view?usp=sharing" rel="noopener noreferrer" class="c-link"&gt;
            gemma4-challenge.mp4 - Google Drive
          &lt;/a&gt;
        &lt;/h2&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fssl.gstatic.com%2Fimages%2Fbranding%2Fproduct%2F1x%2Fdrive_2020q4_32dp.png" width="32" height="32"&gt;
          drive.google.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&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/AfreenInnovates" rel="noopener noreferrer"&gt;
        AfreenInnovates
      &lt;/a&gt; / &lt;a href="https://github.com/AfreenInnovates/gemma4-e2b" rel="noopener noreferrer"&gt;
        gemma4-e2b
      &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;Find-Your-Route&lt;/h1&gt;
&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;&lt;em&gt;AI-Powered Multimodal Civic Transit Co-Pilot &amp;amp; Eco-Impact Dashboard&lt;/em&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://dev.to/devteam/join-the-gemma-4-challenge-3000-prize-pool-for-ten-winners-23in" rel="nofollow"&gt;&lt;img src="https://camo.githubusercontent.com/f1b81eea70db60a32e38743ab3b40f6f69a22afdddcd3652480444a3308a0a93/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4445562e746f2d47656d6d615f345f4368616c6c656e67652d626c756576696f6c65743f7374796c653d666f722d7468652d6261646765" alt="Gemma 4 Challenge"&gt;&lt;/a&gt;
&lt;a href="https://opensource.org/licenses/MIT" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/c7b487c51a946680acb2c3ccee8a2f2bad7e409d6c7098ed2971a7a7ce339d8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d7465616c2e7376673f7374796c653d666f722d7468652d6261646765" alt="License: MIT"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Find-Your-Route&lt;/strong&gt; is a civic transit co-pilot for ticket OCR, route guidance, caching, and eco-impact comparison. It uses Google's &lt;strong&gt;Gemma 4&lt;/strong&gt; models, Redis-backed caching, and a responsive dashboard.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Scan a physical ticket image.&lt;/li&gt;
&lt;li&gt;Extract and normalize station details with OCR preprocessing.&lt;/li&gt;
&lt;li&gt;Generate route guidance with &lt;strong&gt;Gemma 4&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Compare carbon impact and travel cost against other transport options.&lt;/li&gt;
&lt;li&gt;Use local Ollama fallback when online API access is unavailable.&lt;/li&gt;
&lt;/ul&gt;

  &lt;div class="js-render-enrichment-target"&gt;
    &lt;div class="render-plaintext-hidden"&gt;
      &lt;pre&gt;graph TD
    A[Physical Ticket Upload] --&amp;gt;|react-native-image-picker| B[OCR Extraction Pipeline]
    B --&amp;gt;|FastAPI Preprocessing| C[Station Extractor / Normalization]
    C --&amp;gt;|Check Redis Cache| D{Cache Hit?}
    D --&amp;gt;|Yes: sub-second| E[Render UI Response]
    D --&amp;gt;|No: Cache Miss| F[Gemma 4 31B Dense Primary]
    F --&amp;gt;|API Congestion/Failure| G[Gemma 4 e2b Local Fallback]
    F --&amp;gt;|Generate Route Markdown| H[Store in Redis Cache]
    G --&amp;gt;|Generate Route Markdown| H
    H --&amp;gt; E
&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;span class="js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full"&gt;
    &lt;span&gt;
      &lt;span class="sr-only"&gt;Loading&lt;/span&gt;
&lt;/span&gt;
  &lt;/span&gt;


&lt;p&gt;&lt;strong&gt;Quick Start&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prerequisites: Docker, Docker Compose, and either an…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AfreenInnovates/gemma4-e2b" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Used Gemma 4
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Architectures We Chose &amp;amp; Why
&lt;/h3&gt;

&lt;p&gt;To power our real-time commuter co-pilot, we designed a &lt;strong&gt;Hybrid Intelligent Routing System&lt;/strong&gt; leveraging two primary Gemma 4 architectures:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Primary Brain: Gemma 4 31B Dense&lt;/strong&gt; (&lt;code&gt;google/gemma-4-31b-it:free&lt;/code&gt;)

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role&lt;/strong&gt;: High-throughput Cloud Reasoning Engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it fits&lt;/strong&gt;: Crafting navigation itineraries requires highly accurate multi-step reasoning. Gemma 4 31B Dense excels at reading raw JSON databases of train lines, understanding platform interconnections, and formatting instructions in elegant, bite-sized markdown that is easy for commuters to read on the move.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Fallback: Gemma 4 E2B&lt;/strong&gt; (&lt;code&gt;gemma4:e2b&lt;/code&gt;)

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Role&lt;/strong&gt;: Resilient Edge Deployment via Ollama.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why it fits&lt;/strong&gt;: The &lt;strong&gt;E2B&lt;/strong&gt; model is highly optimized for local/offline deployment on restricted hardware (like station ticketing computers or local server nodes). It offers extremely high reasoning efficiency with a small memory footprint, ensuring that even if public internet connectivity drops in underground terminals, the local fallback is triggered in &lt;strong&gt;less than 500ms&lt;/strong&gt; to guide commuters safely.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Orchestration Pipeline
&lt;/h3&gt;

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

&lt;h2&gt;
  
  
  Engineering Challenges &amp;amp; Breakthroughs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Challenge 1: The Local Memory Bottleneck (8GB RAM Limit)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: During local testing, the system would regularly freeze and throw Out-Of-Memory (OOM) crashes. Ollama would struggle to run Gemma 4 concurrently with Docker, VS Code, and multiple open browser tabs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: We initially had to close all background apps and tabs just to keep Ollama alive. Recognizing that this was a bad user experience, we researched and implemented the &lt;strong&gt;Low-Memory Profile (&lt;code&gt;gemma4-lowmem&lt;/code&gt;)&lt;/strong&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Challenge 2: Docker Container Networking &amp;amp; Redis Configuration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: Orchestrating a FastAPI backend with a Redis cache using Docker Compose caused repeated connection failures, with the backend unable to reach the Redis container during startup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: We initially configured Redis using &lt;code&gt;localhost&lt;/code&gt; / &lt;code&gt;127.0.0.1&lt;/code&gt;, but that did not work because each Docker container runs separately. We fixed it by changing the Redis host to redis (&lt;code&gt;REDIS_HOST=redis&lt;/code&gt;), removed password setting, and updating the Docker setup so the backend could connect to Redis properly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Images of the app!
&lt;/h2&gt;

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

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

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

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

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

&lt;p&gt;&lt;em&gt;Submitted by &lt;a href="https://dev.to/afreen007"&gt;Afreen Hossain&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
    <item>
      <title>Energy Leak Scout: Find the Waste. Cut the Bill.</title>
      <dc:creator>Afreen Hossain</dc:creator>
      <pubDate>Mon, 20 Apr 2026 05:30:29 +0000</pubDate>
      <link>https://dev.to/afreen007/energy-leak-scout-find-the-waste-cut-the-bill-21ka</link>
      <guid>https://dev.to/afreen007/energy-leak-scout-find-the-waste-cut-the-bill-21ka</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/challenges/weekend-2026-04-16"&gt;Weekend Challenge: Earth Day Edition&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Energy Leak Scout: Track Every Watt, Save Every Month.&lt;br&gt;
Energy Leak Scout is a Flutter + Node.js app that helps users understand daily home energy usage and reduce waste.&lt;br&gt;
Users enter appliance runtime (hours/day), view estimated electricity usage and trends, and get AI-generated explanations for high consumption with practical tips.&lt;/p&gt;

&lt;p&gt;My goal was to make Earth Day impact personal and measurable by converting behavior into clear energy, cost, and carbon insights.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://drive.google.com/file/d/14t0fkyhtfS5gYTLxMxi4-22idsQKH7Wq/view?usp=sharing" rel="noopener noreferrer" class="c-link"&gt;
            weekend-challenge.mp4 - Google Drive
          &lt;/a&gt;
        &lt;/h2&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fssl.gstatic.com%2Fimages%2Fbranding%2Fproduct%2F1x%2Fdrive_2020q4_32dp.png" width="32" height="32"&gt;
          drive.google.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&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/AfreenInnovates" rel="noopener noreferrer"&gt;
        AfreenInnovates
      &lt;/a&gt; / &lt;a href="https://github.com/AfreenInnovates/weekend-challenge" rel="noopener noreferrer"&gt;
        weekend-challenge
      &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;Energy Leak Scout&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Energy Leak Scout is an Earth Day themed full-stack app that helps users understand and reduce household electricity use.&lt;/p&gt;
&lt;p&gt;The app lets users log in, enter daily appliance usage (hours/day), and instantly see estimated energy impact in kWh, cost, and CO2. It also provides AI-assisted explanations for high consumption and practical savings recommendations.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;What This App Means&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;This project is about turning abstract energy data into everyday action.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Awareness: makes hidden energy waste visible.&lt;/li&gt;
&lt;li&gt;Action: gives clear recommendations users can follow immediately.&lt;/li&gt;
&lt;li&gt;Impact: links personal behavior to cost savings and lower emissions.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Core Flow&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;User logs in with Auth0.&lt;/li&gt;
&lt;li&gt;User enters appliance usage (hours/day).&lt;/li&gt;
&lt;li&gt;App calculates estimated usage and insights.&lt;/li&gt;
&lt;li&gt;User taps Why high?&lt;/li&gt;
&lt;li&gt;Backend verifies Auth0 token, then asks Cohere for a concise explanation.&lt;/li&gt;
&lt;li&gt;App displays explanation plus practical tips.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Tech Stack&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Flutter (frontend)&lt;/li&gt;
&lt;li&gt;Node.js + Express (backend)&lt;/li&gt;
&lt;li&gt;Auth0 (authentication and API protection)&lt;/li&gt;
&lt;li&gt;Cohere (AI explanation…&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AfreenInnovates/weekend-challenge" 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;p&gt;I designed Energy Leak Scout as a practical user journey, not just a dashboard. The goal was to help a user move from "I think my bill is high" to "I know exactly what to reduce this week."&lt;/p&gt;

&lt;p&gt;Was fun building this, learned about Auth0 and how to integrate/implement it in the project! Though didn't integrate Backboard, did check out its docs and understood how to use it!&lt;/p&gt;

&lt;h3&gt;
  
  
  User Walkthrough
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Open app and authenticate&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user starts in Flutter and signs in with Auth0.&lt;/li&gt;
&lt;li&gt;A secure access token is issued after login.&lt;/li&gt;
&lt;li&gt;That token is stored in app state and attached to backend API calls.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Add appliance usage in simple language&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user enters daily runtime in hours for common appliances like AC, Fan, Fridge, and TV.&lt;/li&gt;
&lt;li&gt;The UI also supports adding custom appliances, so the app works for real homes with different devices.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;View instant energy impact &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;As soon as usage is entered, the app converts hours/day into kWh/day.&lt;/li&gt;
&lt;li&gt;The user sees total consumption, top contributors, and chart-based trends.&lt;/li&gt;
&lt;li&gt;Additional insights include estimated monthly energy use, CO2 impact, and cost signals.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Ask for explanation when usage feels high&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user taps "Why high?" to get a plain-language explanation.&lt;/li&gt;
&lt;li&gt;This triggers a secure backend call (token-protected) that prepares a concise appliance summary and sends it to Cohere.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Receive practical savings actions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The response returns short, actionable tips (for example reducing AC runtime or adjusting setpoint behavior).&lt;/li&gt;
&lt;li&gt;Recommendations are designed to be easy to apply immediately, not generic sustainability advice.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Continue tracking progress&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user can update inputs daily and monitor trend changes.&lt;/li&gt;
&lt;li&gt;This creates a small behavior loop: measure, understand, act, and improve.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Technical Build Details
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Flutter frontend for interactive UI, charts, and appliance usage input.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built the client in Flutter for one codebase across platforms.&lt;/li&gt;
&lt;li&gt;Added chart visualizations and summary cards so users can quickly identify which devices drive most consumption.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Node.js + Express backend for secure API routes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implemented a lightweight Express API with clear endpoints for health, usage, insights, and "why-high" reasoning.&lt;/li&gt;
&lt;li&gt;Added reusable calculation helpers for totals, rankings, category splits, trends, recommendations, and eco score outputs.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Auth0 JWT protection for usage and insights endpoints.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protected key routes with Auth0 JWT validation via JWKS (&lt;code&gt;express-jwt&lt;/code&gt; + &lt;code&gt;jwks-rsa&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Enforced expected audience and issuer so only valid tokens from the configured Auth0 tenant are accepted.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Cohere integration for concise energy explanations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added Cohere chat generation on the backend so prompts and API keys stay server-side.&lt;/li&gt;
&lt;li&gt;Constructed prompts from actual appliance usage totals and top contributors to keep responses grounded in user data.&lt;/li&gt;
&lt;li&gt;Tuned response style for short, practical guidance instead of long-form AI output.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Local fallback logic to keep the app useful even when AI credentials are unavailable.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;COHERE_API_KEY&lt;/code&gt; is missing or the upstream call fails, backend automatically returns a local explanation plus tips.&lt;/li&gt;
&lt;li&gt;Fallback logic is rule-based from appliance usage patterns, so the user still receives meaningful guidance.&lt;/li&gt;
&lt;li&gt;This improves reliability for demos, first-time setup, and offline/dev scenarios.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

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

&lt;p&gt;Best Use of Auth0 for Agents, Best Use of Google Gemini, Best Use of GitHub Copilot&lt;/p&gt;

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