<?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: Mason</title>
    <description>The latest articles on DEV Community by Mason (@m_caoo).</description>
    <link>https://dev.to/m_caoo</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%2F3850034%2F8ed8d4e8-db93-41f7-a509-d684fde9010f.png</url>
      <title>DEV Community: Mason</title>
      <link>https://dev.to/m_caoo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/m_caoo"/>
    <language>en</language>
    <item>
      <title>Repair Oracle: AI-Powered Assessor for Broken Household Items</title>
      <dc:creator>Mason</dc:creator>
      <pubDate>Mon, 20 Apr 2026 03:26:58 +0000</pubDate>
      <link>https://dev.to/m_caoo/repair-oracle-ai-powered-assessor-for-broken-household-items-2c4j</link>
      <guid>https://dev.to/m_caoo/repair-oracle-ai-powered-assessor-for-broken-household-items-2c4j</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;We've all been there: a household item breaks, and it's usually easier to just toss it in the trash than figure out how to fix it. I built &lt;strong&gt;Repair Oracle&lt;/strong&gt; to change that. &lt;/p&gt;

&lt;p&gt;It’s an AI-powered diagnostic web app designed to keep broken items out of the landfill. You just upload a photo and describe what’s wrong. The app analyzes the damage and generates a structured field guide with one of four actionable paths: &lt;strong&gt;Repair it&lt;/strong&gt;, &lt;strong&gt;Salvage for parts&lt;/strong&gt;, &lt;strong&gt;Recycle responsibly&lt;/strong&gt;, or &lt;strong&gt;Replace thoughtfully&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;To hit the Earth Day theme, every diagnosis includes a running environmental ledger. It estimates the kilograms of CO₂e avoided (versus buying new) and the mass of material diverted from the landfill. It also calls out specific safety hazards (like lithium batteries) and tells you exactly which material stream to use for recycling.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Video Walkthrough:&lt;/strong&gt; [&lt;a href="https://youtu.be/yPyhUS4Dd4g" rel="noopener noreferrer"&gt;https://youtu.be/yPyhUS4Dd4g&lt;/a&gt;]
&lt;em&gt;(Want to run it locally? Clone the repo, add your &lt;code&gt;GOOGLE_GENERATIVE_AI_API_KEY&lt;/code&gt; to &lt;code&gt;.env.local&lt;/code&gt;, and run &lt;code&gt;npm run dev&lt;/code&gt; on &lt;code&gt;localhost:3000&lt;/code&gt;.)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

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


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mason-cao" rel="noopener noreferrer"&gt;
        mason-cao
      &lt;/a&gt; / &lt;a href="https://github.com/mason-cao/repair-oracle" rel="noopener noreferrer"&gt;
        repair-oracle
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An AI repair assistant that helps users identify faults, assess repairability, and avoid unnecessary waste. Built for DEV Weekend Challenge: Earth Day Edition.
    &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;Repair Oracle&lt;/h1&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;Before you throw it away, ask the Oracle.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Repair Oracle is an AI-powered repair diagnosis web app for broken household
items. Upload a photo, describe the failure, and receive a structured field
guide: repair it, salvage it, recycle it, or replace it only as a last resort
Each verdict includes repair steps, parts, tools, safety flags, cost vs
replacement, CO2e avoided, and landfill material diverted.&lt;/p&gt;
&lt;p&gt;Built for an Earth Day 2026 hackathon.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Earth Day Criteria&lt;/h2&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repair-first impact:&lt;/strong&gt; The model is instructed to prefer repair when it is
safe, affordable, and realistic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Waste diversion:&lt;/strong&gt; Every result estimates CO2e avoided and material kept out
of landfill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsible fallback:&lt;/strong&gt; Salvage and recycling routes name material streams
such as e-waste, battery, textile, metal, wood, glass, ceramic, or plastic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety-aware guidance:&lt;/strong&gt; Hazardous work such as mains wiring, gas
pressurized systems, or lithium cell repair is flagged as pro-only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-friction behavior change:&lt;/strong&gt; No account…&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/mason-cao/repair-oracle" 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 wanted a fast, reliable diagnostic tool—not a generic chatbot. Here’s how I pulled it off:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Core Stack:&lt;/strong&gt; Next.js 16 (App Router), React 19, and the new Tailwind CSS 4. I used &lt;code&gt;framer-motion&lt;/code&gt; and &lt;code&gt;lucide-react&lt;/code&gt; for a clean "glassmorphism" UI that keeps the repair steps easy to read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Brains:&lt;/strong&gt; I used the Vercel AI SDK (&lt;code&gt;@ai-sdk/google&lt;/code&gt;) to hook up &lt;strong&gt;Gemini 2.5 Flash&lt;/strong&gt;. The user’s image and text are passed directly to the multimodal vision model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Taming the AI with Zod:&lt;/strong&gt; Instead of freeform text, I used &lt;code&gt;generateObject&lt;/code&gt; alongside a strict Zod schema (&lt;code&gt;DiagnosisSchema&lt;/code&gt;). This forces Gemini to output a highly structured JSON object, guaranteeing a definitive verdict, 3-7 step repair instructions, cost estimates, and the Earth Day math every single time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Engineering:&lt;/strong&gt; The system prompt strictly forces the AI to recommend "repair" &lt;em&gt;only&lt;/em&gt; when it's safe and economical. It also forces the model to name specific recycling streams and flag dangerous DIY work (like mains wiring) as "pro-only."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-Friction Ledger:&lt;/strong&gt; There’s no login or database. All diagnosis history and running carbon/landfill totals are saved locally on your device via &lt;code&gt;localStorage&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Best Use of Google Gemini&lt;/strong&gt; Repair Oracle's entire core loop relies on Gemini 2.5 Flash. It uses multimodal vision to assess the physical damage of real-world items (even dropping its confidence score if the photo is blurry). By combining this vision with strict JSON generation, Gemini transforms a basic upload form into a reliable, safety-aware sustainability tool.&lt;/p&gt;




&lt;p&gt;Thanks for checking out the project! Let me know if you end up using it to fix something around the house. Happy Earth Day! 🌍&lt;/p&gt;

&lt;p&gt;Made solo by me: m_caoo&lt;/p&gt;

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