<?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 (@afreen_hossain_16f9999ebc).</description>
    <link>https://dev.to/afreen_hossain_16f9999ebc</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3886529%2Fc562ecf0-67fe-477b-b5b7-932b1d274110.png</url>
      <title>DEV Community: Afreen Hossain</title>
      <link>https://dev.to/afreen_hossain_16f9999ebc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afreen_hossain_16f9999ebc"/>
    <language>en</language>
    <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/afreen_hossain_16f9999ebc/energy-leak-scout-find-the-waste-cut-the-bill-21ka</link>
      <guid>https://dev.to/afreen_hossain_16f9999ebc/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>
