<?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: Kanchan Ghosh</title>
    <description>The latest articles on DEV Community by Kanchan Ghosh (@kanchan_ghosh_ab4fceafe66).</description>
    <link>https://dev.to/kanchan_ghosh_ab4fceafe66</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%2F3498545%2F3426f667-a820-4182-85e3-e7a07a3c4aaf.jpg</url>
      <title>DEV Community: Kanchan Ghosh</title>
      <link>https://dev.to/kanchan_ghosh_ab4fceafe66</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kanchan_ghosh_ab4fceafe66"/>
    <language>en</language>
    <item>
      <title>I Built an AI That Roasts You (But Actually Cares)</title>
      <dc:creator>Kanchan Ghosh</dc:creator>
      <pubDate>Fri, 10 Apr 2026 07:54:57 +0000</pubDate>
      <link>https://dev.to/kanchan_ghosh_ab4fceafe66/i-built-an-ai-that-roasts-you-but-actually-cares-4c3l</link>
      <guid>https://dev.to/kanchan_ghosh_ab4fceafe66/i-built-an-ai-that-roasts-you-but-actually-cares-4c3l</guid>
      <description>&lt;p&gt;This is a submission for the DEV April Fools Challenge&lt;/p&gt;

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

&lt;p&gt;MATE — Mostly Annoying, Technically Empathetic.&lt;br&gt;
A voicebot that roasts everything you say. Makes terrible puns. Talks absolute nonsense. Occasionally shares fake facts about otters.&lt;br&gt;
But here's the thing nobody asked for: it actually cares about you.&lt;br&gt;
If you mention you're stressed, tired, struggling, or having a bad day — MATE will still roast you for it. Obviously. But the punchline lands somewhere warm. You won't see it coming, which is exactly the point.&lt;br&gt;
It's a wellness check disguised as a chaos bot. A therapist that would be struck off immediately. A best mate who takes the mick but never lets you drown.&lt;br&gt;
Zero real-world value. Possibly the most useful thing I've built.&lt;/p&gt;

&lt;p&gt;Demo&lt;/p&gt;

&lt;p&gt;🔗 [Live on Cloud Run] &lt;a href="https://mate-451954006366.europe-west1.run.app/" rel="noopener noreferrer"&gt;https://mate-451954006366.europe-west1.run.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Heads up: requires Chrome on desktop or Android — Web Speech API isn't supported in Firefox or Safari. If it works in your browser, great. If it doesn't, MATE would like you to know that's entirely your fault.&lt;/p&gt;

&lt;p&gt;Code&lt;/p&gt;

&lt;p&gt;Directly deployed using GCloud CLI&lt;/p&gt;

&lt;p&gt;Core files:&lt;/p&gt;

&lt;p&gt;app.py — Flask server, Gemini API integration, the system prompt that does all the actual work&lt;br&gt;
templates/index.html — Frontend: Web Speech API, animated face states, SpeechSynthesis output&lt;br&gt;
Dockerfile — Cloud Run deployment&lt;/p&gt;

&lt;p&gt;How I Built It&lt;br&gt;
Stack:&lt;/p&gt;

&lt;p&gt;Gemini 2.0 Flash via the Gemini API — handles the roasting and the hidden empathy&lt;br&gt;
Google Cloud Run — deployed the Flask app as a container&lt;br&gt;
Web Speech API — browser-native speech recognition, no third-party STT needed&lt;br&gt;
SpeechSynthesis API — browser-native TTS, prefers UK English voice if available&lt;br&gt;
Flask — lightweight backend that proxies requests to Gemini and keeps the API key server-side&lt;/p&gt;

&lt;p&gt;The interesting bit is the system prompt.&lt;br&gt;
MATE has two layers baked into a single prompt. On the surface: roast mode. Terrible puns, absurd non-sequiturs, fake facts, chaos. Underneath: a detection layer. If the user's words contain stress, sadness, failure, loneliness, or burnout — MATE still roasts it — but the response ends somewhere genuinely warm, hidden inside the absurdity.&lt;br&gt;
The model never announces the switch. It just does it.&lt;br&gt;
Example:&lt;/p&gt;

&lt;p&gt;You: "I'm really stressed about everything"&lt;br&gt;
MATE: "Stressed? Your body's basically LARPing as a disaster. But here's the thing — you've survived every hard day that's come at you so far. That's a flawless record. Suspicious, given your choices, but there it is."&lt;/p&gt;

&lt;p&gt;That's Gemini 2.0 Flash. One call. No fine-tuning. Just a system prompt that takes the joke seriously.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Category
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Best Google AI Usage
&lt;/h2&gt;

&lt;p&gt;Gemini 2.0 Flash runs the entire conversation layer. The model handles both the comedy and the emotional intelligence in a single inference — there's no separate sentiment classifier, no second API call, no post-processing. The dual-layer personality (chaotic surface, genuine care underneath) is entirely prompt-engineered, which I think is an underrated use of what Gemini can actually do.&lt;br&gt;
Deployed on Cloud Run with the API key as an env var, so nothing sensitive touches the frontend.&lt;br&gt;
The Google AI Studio was used during development to iterate on the system prompt — testing how the model handled different emotional inputs before locking it in.&lt;/p&gt;

&lt;p&gt;Built in a day. Submitted before the deadline. MATE would say that's the least impressive thing about you. And then check you're alright.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>418challenge</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Let's Make a Deal: AI-Powered Deal Finder for Budget-Conscious UK Families</title>
      <dc:creator>Kanchan Ghosh</dc:creator>
      <pubDate>Sun, 08 Feb 2026 11:57:02 +0000</pubDate>
      <link>https://dev.to/kanchan_ghosh_ab4fceafe66/lets-make-a-deal-ai-powered-deal-finder-for-budget-conscious-uk-families-4k5a</link>
      <guid>https://dev.to/kanchan_ghosh_ab4fceafe66/lets-make-a-deal-ai-powered-deal-finder-for-budget-conscious-uk-families-4k5a</guid>
      <description>&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;br&gt;
She is Sarah. Single mum. Two kids. £50 a week.&lt;/p&gt;

&lt;p&gt;She moved to Leeds with nothing. No family nearby. No idea where the cheapest shop is. No one to ask.&lt;/p&gt;

&lt;p&gt;Every week she sits at the kitchen table at midnight. Lily finally asleep. Scrolling through Tesco, Asda, Aldi, Lidl — five different apps — comparing prices on the same pack of nappies. The same loaf of bread. The same tin of formula.&lt;/p&gt;

&lt;p&gt;Some weeks she manages. Some weeks it's toast for dinner again.&lt;/p&gt;

&lt;p&gt;There are 14.4 million people in the UK living like Sarah. Families spending hours comparing prices just to stretch a weekly budget that was never enough to begin with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I Built&lt;/strong&gt;&lt;br&gt;
🤝 Let's Make a Deal — a conversational deal-finding assistant that does the work for them.&lt;/p&gt;

&lt;p&gt;One conversation. Tell it your postcode, your budget, what you need. It finds the cheapest real deals — locally and online.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live App: &lt;a href="https://cute-jelly-4af391.netlify.app/" rel="noopener noreferrer"&gt;https://cute-jelly-4af391.netlify.app/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How It Works&lt;br&gt;
Sarah types "cheapest nappies near me" and it tells her:&lt;/p&gt;

&lt;p&gt;🏪 Aldi, Roundhay Road — £2.49&lt;br&gt;
🏪 Lidl, York Road — £2.29&lt;br&gt;
📦 Amazon — bulk pack, cheaper per nappy&lt;br&gt;
She types "kids school shoes under £15" and it finds:&lt;/p&gt;

&lt;p&gt;👟 Shoe Zone — £12.99&lt;br&gt;
👟 George at Asda — £14.00&lt;br&gt;
She doesn't have to walk into six shops with a toddler on her hip.&lt;/p&gt;

&lt;p&gt;But the thing that really matters — she types "free food near me" and discovers:&lt;/p&gt;

&lt;p&gt;🥫 Community fridge — two streets away&lt;br&gt;
📱 Olio app — free surplus food nearby&lt;br&gt;
⛪ St. Vincent's church — food parcel every Thursday&lt;br&gt;
Nobody tells you these things when you're new somewhere. This agent does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features&lt;/strong&gt;&lt;br&gt;
🍞 Budget-first — never recommends above the user's stated budget&lt;br&gt;
📍 Location-aware — finds deals within 10 miles + online options&lt;br&gt;
🏪 Real retailers — Tesco, Asda, Aldi, Lidl, Argos, B&amp;amp;M, Poundland, Home Bargains, Amazon UK, eBay UK&lt;br&gt;
🆓 Free options — food banks, Olio, Freecycle, community fridges&lt;br&gt;
💬 Conversational — no forms, no filters, just type what you need&lt;br&gt;
📱 Mobile-friendly — works on any phone, no app to download&lt;br&gt;
How I Used Algolia Agent Studio&lt;br&gt;
Agent Configuration&lt;br&gt;
The agent lives inside Algolia's dashboard with a specialised system prompt that:&lt;/p&gt;

&lt;p&gt;Collects the user's postcode, budget, and family size upfront&lt;br&gt;
Searches for real UK deals from budget retailers&lt;br&gt;
Formats results with prices, store names, distances, and savings&lt;br&gt;
Surfaces free alternatives when relevant&lt;br&gt;
Includes money-saving tips with every search&lt;br&gt;
Frontend Integration&lt;br&gt;
Built with React using Algolia's official react-instantsearch Chat widget:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;jsx import { liteClient as algoliasearch } from 'algoliasearch/lite'; import { InstantSearch, Chat } from 'react-instantsearch'; import 'instantsearch.css/components/chat.css'; const searchClient = algoliasearch( process.env.REACT_APP_ALGOLIA_APP_ID, process.env.REACT_APP_ALGOLIA_API_KEY ); export function App() { return ( ); }&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The Chat widget handles all communication with Agent Studio. No custom API calls. No proxy functions. No CORS issues. Clean and simple.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Algolia Makes This Work&lt;/strong&gt;&lt;br&gt;
What    Why It Matters&lt;br&gt;
Sub-50ms retrieval  Budget families don't have time to wait&lt;br&gt;
Contextual search   Grounds responses in real data, no hallucinated prices&lt;br&gt;
Conversational UX   InstantSearch Chat widget — polished, mobile-first&lt;br&gt;
Zero friction   No sign-ups, no downloads, just type and find&lt;br&gt;
Tech Stack&lt;br&gt;
Layer   Technology&lt;br&gt;
Frontend    React + Algolia InstantSearch Chat Widget&lt;br&gt;
Agent   Algolia Agent Studio&lt;br&gt;
Deployment  Netlify&lt;br&gt;
Styling Custom dark theme, CSS overrides&lt;br&gt;
The Real Impact&lt;br&gt;
Last week Lily got a cold. Sarah needed Calpol. She typed "cheapest Calpol near LS8" — Boots had it for £3.59. Asda two streets further had it for £2.10.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Same medicine. Same dose. £1.49 saved.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That doesn't sound like much. But when you're counting coins at the self-checkout, hoping the card doesn't decline —&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;£1.49 is tomorrow's bread.&lt;/strong&gt;&lt;br&gt;
"This isn't a tech demo. 1 in 5 UK families are in fuel or food poverty. Every penny saved is a decision they didn't have to make — heating or eating, new shoes or new coat. This agent doesn't judge. It just finds the best deal."&lt;br&gt;
🤝 Let's Make a Deal — One conversation. Real prices. Real shops. Every penny counts.&lt;/p&gt;

&lt;p&gt;🔗 Live App: &lt;a href="https://cute-jelly-4af391.netlify.app/" rel="noopener noreferrer"&gt;https://cute-jelly-4af391.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📺 Demo Video: &lt;a href="https://youtu.be/huvIjJJoBqM" rel="noopener noreferrer"&gt;https://youtu.be/huvIjJJoBqM&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Linkedin Post: &lt;a href="https://www.linkedin.com/posts/kanchan-ghosh-269b0465_149-is-tomorrows-bread-an-ai-deal-finder-activity-7426231950195068928-Ep3p?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAAA3eMHEBgO2S-ZNQOK9KWTMVaZrA-qnqyUY" rel="noopener noreferrer"&gt;https://www.linkedin.com/posts/kanchan-ghosh-269b0465_149-is-tomorrows-bread-an-ai-deal-finder-activity-7426231950195068928-Ep3p?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAAA3eMHEBgO2S-ZNQOK9KWTMVaZrA-qnqyUY&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algoliachallenge</category>
      <category>ai</category>
      <category>agents</category>
    </item>
    <item>
      <title>Stellar Portfolio: Where Python Apps Become Constellations</title>
      <dc:creator>Kanchan Ghosh</dc:creator>
      <pubDate>Sat, 31 Jan 2026 17:01:49 +0000</pubDate>
      <link>https://dev.to/kanchan_ghosh_ab4fceafe66/stellar-portfolio-where-python-apps-become-constellations-h3</link>
      <guid>https://dev.to/kanchan_ghosh_ab4fceafe66/stellar-portfolio-where-python-apps-become-constellations-h3</guid>
      <description>&lt;p&gt;This is a submission for the New Year, New You Portfolio Challenge Presented by Google AI&lt;br&gt;
About Me&lt;br&gt;
I'm Kanchan Ghosh, an independent AI developer based in Leeds, UK with 16+ years in software development. Since 2023, I've built 8+ production AI applications across healthcare, travel, compliance, and fintech—all centred on a privacy-first architecture I call "The Vault." My work includes applications under NHS Digital evaluation and tools used by real care homes and travellers.&lt;br&gt;
I wanted my portfolio to feel like discovering a universe of interconnected projects—not a static list of links.&lt;br&gt;
Portfolio&lt;br&gt;


&lt;/p&gt;
&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://stellar-portfolio-reveal-251452687370.us-west1.run.app"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;


&lt;br&gt;
How I Built It&lt;br&gt;
Concept: A cinematic reveal experience. You start in darkness, click a single button, and get pulled through a Star Trek-style warp sequence into a constellation where four stars represent my four live products.&lt;br&gt;
Tech Stack:

&lt;p&gt;Gemini AI for generating animation sequences, particle systems, and interactive state logic&lt;br&gt;
HTML5 Canvas for rendering the starfield and warp effects&lt;br&gt;
CSS animations for the breathing button and glow effects&lt;br&gt;
Vanilla JavaScript for interaction handling&lt;br&gt;
Google Cloud Run for deployment&lt;/p&gt;

&lt;p&gt;Design Decisions:&lt;/p&gt;

&lt;p&gt;Black void start: Forces curiosity. One barely-visible button. No noise.&lt;br&gt;
Warp transition: The user isn't just navigating—they're travelling. It sets the tone that these aren't side projects; they're destinations.&lt;br&gt;
Constellation navigation: Four stars, four colours, four domains: Travel (orange), Care (teal), Health (blue), Money (gold). Each click reveals that project's story.&lt;/p&gt;

&lt;p&gt;Gemini Usage:&lt;br&gt;
I used Gemini to generate the detailed animation choreography—timing curves, particle behaviours, colour transitions, and the interactive hover states. The prompt engineering for the warp sequence alone was 50+ lines specifying exact visual phases.&lt;br&gt;
What I'm Most Proud Of&lt;br&gt;
The emotional arc. Most portfolios are catalogues. This one has a beginning (darkness), a journey (warp), and a destination (your choice of star).&lt;br&gt;
Each project reveal isn't just text—it's an animated scene: The Vault's door swings open with light pouring out. loveUAD shows a phone pulsing with automated check-in calls. HomeRule visualises evidence connecting to answers. FindingUrWay spins a globe with travel routes.&lt;br&gt;
Also proud that every star links to a real, live, revenue-generating or NHS-evaluated product—not mockups.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>portfolio</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Multi-Disciplinary AI: Bridging Code, Culture, and Care --labels dev-tutorial=devnewyear2026</title>
      <dc:creator>Kanchan Ghosh</dc:creator>
      <pubDate>Fri, 30 Jan 2026 05:41:36 +0000</pubDate>
      <link>https://dev.to/kanchan_ghosh_ab4fceafe66/multi-disciplinary-ai-bridging-code-culture-and-care-labels-dev-tutorialdevnewyear2026-fj6</link>
      <guid>https://dev.to/kanchan_ghosh_ab4fceafe66/multi-disciplinary-ai-bridging-code-culture-and-care-labels-dev-tutorialdevnewyear2026-fj6</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/new-year-new-you-google-ai-2025-12-31"&gt;New Year, New You Portfolio Challenge Presented by Google AI&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;About Me&lt;br&gt;
I am a developer and researcher specializing in privacy-first AI systems. This portfolio serves as a high-performance central hub designed to showcase the intersection of my technical development projects (loveUAD, HomeRule, FindingUrWay), my literary works, and my published research. I built this to prove that a professional identity involving regulated industry solutions and creative arts can be unified through a single, secure cloud-native deployment.&lt;/p&gt;

&lt;p&gt;Portfolio&lt;br&gt;


&lt;/p&gt;
&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://ai-powered-developer-portfolio-2026-251452687370.us-west1.run.app"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;




&lt;p&gt;How I Built It&lt;br&gt;
The portfolio was built to be a lightweight, lightning-fast gateway to my ecosystem.&lt;/p&gt;

&lt;p&gt;The Build Process:&lt;/p&gt;

&lt;p&gt;Frontend Logic: I utilized a clean, responsive HTML/CSS architecture to ensure that the visual assets—specifically the real-world logos from my live sites and book covers from Amazon—load instantly without layout shift.&lt;/p&gt;

&lt;p&gt;AI Integration: I used Google AI Studio to programmatically generate the concise, high-impact summaries for my four apps, four books, and two research papers. By leveraging Gemini 1.5 Flash, I converted technical documentation into scannable portfolio cards that maintain professional tone and accuracy.&lt;/p&gt;

&lt;p&gt;Cloud Run Deployment: The site is deployed on Google Cloud Run in the us-west1 region. This allowed me to bypass the "quota exceeded" errors common in higher-traffic regions while ensuring a serverless execution environment that scales to zero when not in use.&lt;/p&gt;

&lt;p&gt;What I'm Most Proud Of&lt;br&gt;
I am most proud of the deployment efficiency. Successfully moving from a local environment to a live Cloud Run instance while managing the "quota exceeds" error required deep-diving into Google Cloud’s resource allocation. I am also proud of the content synthesis; using Google AI to distill a decade of diverse work—ranging from CQC compliance tools to published novels—into a single, cohesive user interface that a recruiter or peer can navigate in seconds.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>portfolio</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Building Client-Side PII Protection for LLMs Using Chrome's Built-in AI</title>
      <dc:creator>Kanchan Ghosh</dc:creator>
      <pubDate>Wed, 29 Oct 2025 22:23:40 +0000</pubDate>
      <link>https://dev.to/kanchan_ghosh_ab4fceafe66/building-client-side-pii-protection-for-llms-using-chromes-built-in-ai-l3p</link>
      <guid>https://dev.to/kanchan_ghosh_ab4fceafe66/building-client-side-pii-protection-for-llms-using-chromes-built-in-ai-l3p</guid>
      <description>&lt;p&gt;TL;DR: I built PII Shield, a Chrome extension that automatically detects and masks sensitive information before you send it to ChatGPT, Claude, or any LLM. Everything runs locally using Chrome's Prompt API and Gemini Nano. Zero server costs, complete privacy, works offline.&lt;br&gt;
Built for: Google Chrome Built-in AI Challenge 2025&lt;/p&gt;

&lt;p&gt;Demo Video: &lt;a href="https://youtu.be/QvCY2sPC4YU" rel="noopener noreferrer"&gt;https://youtu.be/QvCY2sPC4YU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Problem Nobody Talks About&lt;br&gt;
You're at work. You need to draft an email using ChatGPT. You type:&lt;/p&gt;

&lt;p&gt;"Draft an email to &lt;a href="mailto:john.smith@acme.com"&gt;john.smith@acme.com&lt;/a&gt; about employee ID EMP-12345's performance review. CC &lt;a href="mailto:sarah.jones@acme.com"&gt;sarah.jones@acme.com&lt;/a&gt;"&lt;/p&gt;

&lt;p&gt;You just sent three pieces of PII to an external AI service. Your compliance team would not be happy.&lt;br&gt;
This happens thousands of times daily in companies worldwide. Employees use LLMs for legitimate work, but accidentally expose:&lt;/p&gt;

&lt;p&gt;Employee names and IDs&lt;br&gt;
Customer emails and phone numbers&lt;br&gt;
Company confidential data&lt;br&gt;
Protected health information&lt;br&gt;
Financial account numbers&lt;/p&gt;

&lt;p&gt;Traditional Data Loss Prevention (DLP) solutions cost $50,000+ annually, require server infrastructure, and often break web applications. Small companies can't afford them. Larger companies struggle to enforce them across all AI tools.&lt;br&gt;
There had to be a better way.&lt;/p&gt;

&lt;p&gt;The Solution: Edge AI for Privacy&lt;br&gt;
What if we could scan text for PII before it leaves your device? No servers, no costs, no data transmission risks.&lt;br&gt;
Chrome's new built-in AI capabilities make this possible.&lt;br&gt;
Architecture&lt;br&gt;
User types message&lt;br&gt;
    ↓&lt;br&gt;
Content script intercepts&lt;br&gt;
    ↓&lt;br&gt;
Prompt API analyzes (LOCAL - never sent anywhere)&lt;br&gt;
    ↓&lt;br&gt;
PII detected and masked with ######&lt;br&gt;
    ↓&lt;br&gt;
Safe message sent to LLM&lt;br&gt;
The key insight: Chrome's Prompt API with Gemini Nano runs entirely on your device. This means:&lt;/p&gt;

&lt;p&gt;Zero API costs - No per-request fees or quotas&lt;br&gt;
Complete privacy - Your data never leaves your computer&lt;br&gt;
Works offline - No internet required after setup&lt;br&gt;
Real-time performance - Local processing is fast&lt;/p&gt;

&lt;p&gt;How It Works&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detection Pipeline
Primary Method: AI-Powered
I use Chrome's Prompt API to configure Gemini Nano with a system prompt:
javascriptconst session = await ai.languageModel.create({
systemPrompt: "You are a PII detector. Analyze text and identify emails, names, phone numbers, IDs, and addresses. Return JSON with exact positions."
});&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;const result = await session.prompt(userText);&lt;br&gt;
Fallback Method: Regex Patterns&lt;br&gt;
For reliability, I maintain regex patterns for:&lt;/p&gt;

&lt;p&gt;Email addresses (RFC 5322 compliant)&lt;br&gt;
Phone numbers (international formats)&lt;br&gt;
Social Security Numbers&lt;br&gt;
Credit card numbers&lt;br&gt;
Employee/Account IDs&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Masking Strategy
Detected PII is replaced with hash characters:
Original: "Contact &lt;a href="mailto:john.smith@company.com"&gt;john.smith@company.com&lt;/a&gt;"
Masked:   "Contact ########################"
This preserves:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sentence structure&lt;br&gt;
Message context&lt;br&gt;
Readability&lt;br&gt;
Clear indication that data was removed&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Universal Integration
The extension works on any LLM interface:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;ChatGPT&lt;br&gt;
Claude&lt;br&gt;
Gemini&lt;br&gt;
Microsoft Copilot&lt;br&gt;
Any web-based AI chat&lt;/p&gt;

&lt;p&gt;It intercepts:&lt;/p&gt;

&lt;p&gt;Paste events (bulk text)&lt;br&gt;
Keyboard events (Enter key)&lt;br&gt;
Button clicks (Send buttons)&lt;br&gt;
Text input changes&lt;/p&gt;

&lt;p&gt;Technical Implementation&lt;br&gt;
Chrome Extension Architecture&lt;br&gt;
Manifest V3 Structure:&lt;br&gt;
json{&lt;br&gt;
  "manifest_version": 3,&lt;br&gt;
  "name": "PII Shield",&lt;br&gt;
  "permissions": [&lt;br&gt;
    "storage",&lt;br&gt;
    "activeTab",&lt;br&gt;
    "aiLanguageModelOriginTrial"&lt;br&gt;
  ],&lt;br&gt;
  "content_scripts": [{&lt;br&gt;
    "matches": ["&lt;a href="https://chatgpt.com/*" rel="noopener noreferrer"&gt;https://chatgpt.com/*&lt;/a&gt;", "&lt;a href="https://claude.ai/*%22" rel="noopener noreferrer"&gt;https://claude.ai/*"&lt;/a&gt;],&lt;br&gt;
    "js": ["content.js"]&lt;br&gt;
  }],&lt;br&gt;
  "background": {&lt;br&gt;
    "service_worker": "background.js"&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Content Script (Simplified):&lt;br&gt;
javascript// Detect PII using Prompt API or regex&lt;br&gt;
function detectPII(text) {&lt;br&gt;
  // Try AI detection first&lt;br&gt;
  if (ai?.languageModel) {&lt;br&gt;
    return detectWithAI(text);&lt;br&gt;
  }&lt;br&gt;
  // Fallback to regex&lt;br&gt;
  return detectWithRegex(text);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;// Mask detected PII&lt;br&gt;
function maskText(text, piiItems) {&lt;br&gt;
  let masked = text;&lt;br&gt;
  piiItems.forEach(item =&amp;gt; {&lt;br&gt;
    const mask = '#'.repeat(item.length);&lt;br&gt;
    masked = masked.replace(item.value, mask);&lt;br&gt;
  });&lt;br&gt;
  return masked;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;// Monitor all text input&lt;br&gt;
document.addEventListener('paste', async (e) =&amp;gt; {&lt;br&gt;
  const text = e.clipboardData.getData('text');&lt;br&gt;
  const pii = detectPII(text);&lt;/p&gt;

&lt;p&gt;if (pii.length &amp;gt; 0) {&lt;br&gt;
    e.preventDefault();&lt;br&gt;
    const masked = maskText(text, pii);&lt;br&gt;
    insertMaskedText(masked);&lt;br&gt;
    showNotification(&lt;code&gt;Masked ${pii.length} PII items&lt;/code&gt;);&lt;br&gt;
  }&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;Why Chrome Built-in AI Changes Everything&lt;br&gt;
Traditional Cloud-Based Approach&lt;br&gt;
❌ User → Network → Cloud API → Processing → Response&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Costs money per request&lt;/li&gt;
&lt;li&gt;Data exposed during transmission&lt;/li&gt;
&lt;li&gt;Requires internet&lt;/li&gt;
&lt;li&gt;Privacy concerns&lt;/li&gt;
&lt;li&gt;API rate limits
Chrome Built-in AI Approach
✅ User → Local Processing → Response&lt;/li&gt;
&lt;li&gt;Zero cost&lt;/li&gt;
&lt;li&gt;Data never leaves device&lt;/li&gt;
&lt;li&gt;Works offline&lt;/li&gt;
&lt;li&gt;Complete privacy&lt;/li&gt;
&lt;li&gt;No quotas
This is a paradigm shift for privacy-critical applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Current Limitations (Being Honest)&lt;br&gt;
What Works:&lt;br&gt;
✅ Typed text detection&lt;br&gt;
✅ Pasted text masking&lt;br&gt;
✅ Real-time processing&lt;br&gt;
✅ Multi-platform support&lt;br&gt;
What Doesn't Work Yet:&lt;br&gt;
❌ File uploads - Can't scan PDF/DOCX files users upload&lt;br&gt;
❌ Images - No OCR for text in screenshots&lt;br&gt;
❌ Audio - No speech-to-text PII scanning&lt;br&gt;
❌ Context awareness - May flag legitimate business terms&lt;br&gt;
These are future enhancements. For now, it's a proof-of-concept that shows what's possible.&lt;/p&gt;

&lt;p&gt;Proposed Use Cases&lt;br&gt;
Healthcare&lt;br&gt;
Could protect HIPAA-compliant patient data when using AI for medical research or documentation.&lt;br&gt;
Legal Services&lt;br&gt;
Could ensure client confidentiality during AI-assisted legal research.&lt;br&gt;
Financial Services&lt;br&gt;
Could prevent exposure of customer account numbers and financial data.&lt;br&gt;
Enterprise&lt;br&gt;
Could maintain corporate data policies across all employee AI usage without blocking access.&lt;br&gt;
Note: These are potential applications. Production deployment would require thorough testing and compliance validation.&lt;/p&gt;

&lt;p&gt;Performance Characteristics&lt;br&gt;
Latency:&lt;/p&gt;

&lt;p&gt;AI detection: Local processing with Gemini Nano&lt;br&gt;
Regex fallback: Near-instantaneous&lt;br&gt;
User-perceived delay: Minimal (asynchronous)&lt;/p&gt;

&lt;p&gt;Resource Usage:&lt;/p&gt;

&lt;p&gt;Lightweight Chrome extension&lt;br&gt;
Minimal CPU (burst processing only)&lt;br&gt;
Small storage footprint&lt;/p&gt;

&lt;p&gt;Performance depends on device capabilities and whether Gemini Nano model is downloaded.&lt;/p&gt;

&lt;p&gt;Comparison with Existing Solutions&lt;br&gt;
FeatureEnterprise DLPCloud ScannerPII ShieldCost$50,000+/year$10,000+/year$0PrivacyProxy accessCloud processingOn-device onlySetup3-6 months1-2 monthsUnder 5 minutesLatencyNetwork-dependentNetwork-dependentMinimalOfflineNoNoYesQuotasLicense-basedAPI limitsNone&lt;/p&gt;

&lt;p&gt;What I Learned Building This&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Chrome's Prompt API is Powerful
Being able to run Gemini Nano locally with custom system prompts is game-changing. You can build sophisticated AI features without any cloud dependency.&lt;/li&gt;
&lt;li&gt;Edge AI Enables New Applications
Applications that were impossible due to privacy or cost constraints are now feasible. Think:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Medical AI processing health data locally&lt;br&gt;
Financial AI analyzing sensitive transactions on-device&lt;br&gt;
Personal AI assistants with true privacy&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User Experience Matters
The extension had to be completely transparent. Users shouldn't need to change their workflow. It just works silently in the background.&lt;/li&gt;
&lt;li&gt;Fallback Systems are Critical
Not everyone has Gemini Nano downloaded. Having regex fallback ensures the extension provides value immediately while AI capabilities enhance it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Technical Challenges Solved&lt;br&gt;
Problem 1: Gemini's React Components&lt;br&gt;
Gemini uses complex React components, not standard textareas. Standard document.execCommand didn't work.&lt;br&gt;
Solution: Multi-method text insertion with fallbacks:&lt;br&gt;
javascript// Try multiple insertion methods&lt;br&gt;
if (target.tagName === 'TEXTAREA') {&lt;br&gt;
  target.value = maskedText;&lt;br&gt;
} else if (target.isContentEditable) {&lt;br&gt;
  document.execCommand('insertText', false, maskedText);&lt;br&gt;
} else {&lt;br&gt;
  // Find any editable element on page&lt;br&gt;
  const editables = document.querySelectorAll('[contenteditable="true"]');&lt;br&gt;
  editables[editables.length - 1].textContent = maskedText;&lt;br&gt;
}&lt;br&gt;
Problem 2: Paste Event Timing&lt;br&gt;
Needed to intercept paste events before React processes them.&lt;br&gt;
Solution: Capture phase with proper event handling:&lt;br&gt;
javascriptdocument.addEventListener('paste', handler, true); // Capture phase&lt;br&gt;
e.preventDefault();&lt;br&gt;
e.stopPropagation();&lt;br&gt;
Problem 3: Stats Persistence&lt;br&gt;
Chrome extensions can't use localStorage reliably across sessions.&lt;br&gt;
Solution: Chrome Storage API with daily reset logic:&lt;br&gt;
javascriptconst result = await chrome.storage.local.get(['maskedToday', 'lastReset']);&lt;br&gt;
const today = new Date().toDateString();&lt;/p&gt;

&lt;p&gt;if (result.lastReset !== today) {&lt;br&gt;
  await chrome.storage.local.set({ maskedToday: 0, lastReset: today });&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Development Context&lt;br&gt;
This project was built for the Google Chrome Built-in AI Challenge 2025, a hackathon showcasing innovative applications of Chrome's built-in AI capabilities.&lt;br&gt;
The challenge provided access to:&lt;/p&gt;

&lt;p&gt;Prompt API (what I used)&lt;br&gt;
Summarizer API&lt;br&gt;
Writer API&lt;br&gt;
Rewriter API&lt;br&gt;
Translator API&lt;br&gt;
Proofreader API&lt;/p&gt;

&lt;p&gt;My background includes building CareCircle++, a zero-knowledge healthcare coordination platform that attracted NHS Digital interest. That experience with privacy-first architecture directly informed PII Shield's design.&lt;br&gt;
In healthcare, data protection isn't optional - it's legally mandated and ethically critical. Those same principles apply to enterprise AI usage.&lt;/p&gt;

&lt;p&gt;Future Roadmap&lt;br&gt;
If I continue developing this:&lt;br&gt;
Phase 1: Core Improvements&lt;/p&gt;

&lt;p&gt;File upload scanning (PDF, DOCX parsing)&lt;br&gt;
 Whitelist management for approved terms&lt;br&gt;
 Custom regex patterns for company-specific IDs&lt;br&gt;
 Improved context awareness&lt;/p&gt;

&lt;p&gt;Phase 2: Enterprise Features&lt;/p&gt;

&lt;p&gt;Centralized policy management&lt;br&gt;
 Compliance audit reports&lt;br&gt;
 Team deployment tools&lt;br&gt;
 Integration with existing DLP systems&lt;/p&gt;

&lt;p&gt;Phase 3: Advanced AI&lt;/p&gt;

&lt;p&gt;Multimodal support (images, audio)&lt;br&gt;
 Hybrid strategy with Firebase AI Logic&lt;br&gt;
 Machine learning for better detection&lt;br&gt;
 Industry-specific patterns (medical, legal, financial)&lt;/p&gt;

&lt;p&gt;Installation &amp;amp; Testing&lt;br&gt;
Requirements:&lt;/p&gt;

&lt;p&gt;Chrome 127 or later&lt;br&gt;
Enable Chrome Built-in AI flags:&lt;/p&gt;

&lt;p&gt;chrome://flags/#optimization-guide-on-device-model → Enabled&lt;br&gt;
chrome://flags/#prompt-api-for-gemini-nano → Enabled&lt;br&gt;
Restart Chrome&lt;/p&gt;

&lt;p&gt;Installation:&lt;/p&gt;

&lt;p&gt;Download from GitHub (link will be added)&lt;br&gt;
Go to chrome://extensions/&lt;br&gt;
Enable "Developer mode"&lt;br&gt;
Click "Load unpacked"&lt;br&gt;
Select the folder&lt;/p&gt;

&lt;p&gt;Testing:&lt;br&gt;
Open the included test.html file with sample PII data, or try it on ChatGPT/Claude.&lt;/p&gt;

&lt;p&gt;Key Takeaways&lt;br&gt;
For Developers:&lt;/p&gt;

&lt;p&gt;Chrome's built-in AI is production-ready for client-side applications&lt;br&gt;
Edge computing enables new privacy paradigms previously impossible&lt;br&gt;
Zero-cost AI inference opens doors for indie developers and startups&lt;br&gt;
Hybrid approaches work - AI primary, regex fallback&lt;/p&gt;

&lt;p&gt;For Companies:&lt;/p&gt;

&lt;p&gt;DLP doesn't have to be expensive - client-side solutions can work&lt;br&gt;
Privacy and productivity aren't opposed - you can have both&lt;br&gt;
Browser extensions can solve enterprise problems without complex infrastructure&lt;br&gt;
AI safety requires new thinking - traditional approaches don't scale&lt;/p&gt;

&lt;p&gt;For Privacy Advocates:&lt;/p&gt;

&lt;p&gt;On-device AI is the future of privacy-preserving applications&lt;br&gt;
Users can be protected transparently without friction&lt;br&gt;
Open source matters - privacy tools should be auditable&lt;br&gt;
Edge computing wins when privacy is critical&lt;/p&gt;

&lt;p&gt;Open Questions&lt;br&gt;
I'm still figuring out:&lt;/p&gt;

&lt;p&gt;File uploads: How to efficiently parse and scan uploaded documents client-side?&lt;br&gt;
Context sensitivity: How to reduce false positives for legitimate business terms?&lt;br&gt;
Enterprise adoption: What features would compliance teams need?&lt;br&gt;
Monetization: Should this be free and open source, or commercial with enterprise features?&lt;/p&gt;

&lt;p&gt;What do you think? Drop your thoughts in the comments.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
PII Shield demonstrates that powerful privacy protection can run entirely on-device using Chrome's built-in AI. No servers, no costs, no compromises.&lt;br&gt;
While this is a proof-of-concept with limitations (especially file uploads), it shows what's possible when AI moves to the edge.&lt;br&gt;
As LLMs become ubiquitous in workplaces, privacy-preserving architectures like this will be essential. The technology exists. Now we need to build it.&lt;br&gt;
The Google Chrome Built-in AI Challenge 2025 showed me that client-side AI isn't just a nice-to-have - it's a fundamental shift in what's possible for privacy-critical applications.&lt;br&gt;
Try it out:&lt;/p&gt;

&lt;p&gt;GitHub: [Link will be added after submission]&lt;br&gt;
Demo Video: [YouTube link will be added]&lt;br&gt;
Feedback: &lt;a href="mailto:kanchan@ikanchan.com"&gt;kanchan@ikanchan.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;About Me&lt;br&gt;
I'm Kanchan, an Independent AI Developer with 16+ years of software development experience. I've built 6+ production AI applications across healthcare, education, real estate, and gaming.&lt;br&gt;
My previous work includes CareCircle++, a privacy-first healthcare platform that attracted NHS Digital interest. I hold an MBA and Google certifications in Gemini and Vertex AI.&lt;br&gt;
Connect with me:&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="http://www.ikanchan.com" rel="noopener noreferrer"&gt;www.ikanchan.com&lt;/a&gt;&lt;br&gt;
Email: &lt;a href="mailto:kanchan@ikanchan.com"&gt;kanchan@ikanchan.com&lt;/a&gt;&lt;br&gt;
GitHub: [Your profile]&lt;/p&gt;

&lt;p&gt;Discussion Questions&lt;/p&gt;

&lt;p&gt;Would you trust a client-side PII scanner in your organization?&lt;br&gt;
What other privacy-critical applications could benefit from edge AI?&lt;br&gt;
Should this be open source or commercial?&lt;br&gt;
What detection features would make this production-ready for your use case?&lt;/p&gt;

&lt;p&gt;Drop your thoughts below!&lt;/p&gt;

&lt;p&gt;Tags: #chrome #ai #privacy #security #webdev #machinelearning #chromeextension #llm #gdpr #compliance&lt;/p&gt;

&lt;p&gt;This article is based on my submission to the Google Chrome Built-in AI Challenge 2025. Full technical white paper available on my website.&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
  </channel>
</rss>
