๐Ÿพ PawSense AI โ€” Your Dogโ€™s AI Companion & Canine Translator

์ž‘์„ฑ์ž

์นดํ…Œ๊ณ ๋ฆฌ:

โ† ํ”ผ๋“œ๋กœ
DEV Community ยท MakendranG ยท 2026-08-16 ๊ฐœ๋ฐœ(SW)

This is a submission for Weekend Challenge: Dog Days Edition

What I Built

PawSense AI is an interactive, full-stack AI application designed to celebrate the unique bond between humans and their dogs. By simply uploading a photo, capturing a live webcam shot, or picking from a curated pack of sample pups, Google Geminiโ€™s multimodal vision transforms that single image into an entertaining, comprehensive canine profile.

PawSense AI delivers:

  • ๐Ÿงฌ Multimodal Breed & Lineage Analysis: Identifies primary breed matches with confidence scoring and estimated mixed-breed lineage percentages.
  • ๐Ÿ” Morphology & Physical Traits: Analyzes coat patterns, ear and eye structure, distinguishing markings, and estimates life stages (Puppy, Young Adult, Adult, Senior) using observable visual cues.
  • ๐ŸŽญ Playful Personality Archetypes & Radar Stats: Assigns custom canine archetypes (e.g., “The Velveteen Snuggle Monster”, “Chief Operations Zoomer”), calculates energy scores (1โ€“10), superpowers, kryptonite nemesis, spirit elements, love languages, and funny quirks.
  • ๐Ÿ’ญ Canine Brainwave Translator (“Dog Thoughts”): Translates what the dog is thinking in real timeโ€”with hilarious stances on humans, mail carriers, and cheese wrappersโ€”featuring Web Speech text-to-speech audio playback.
  • ๐Ÿ“… Personalized Daily Routine & Enrichment Schedule: Generates a 5-part daily schedule (Morning, Midday, Afternoon, Evening, Bedtime) with checkable care milestones and breed-tailored mental/physical games.
  • ๐Ÿชช Collectible PawPortโ„ข ID Card: Generates an official Canine Registry Passport and trading card with rarity tiers and high-resolution PNG export for instant downloading and sharing.
  • ๐Ÿ’ฌ Interactive “Chat with Your Dog”: Real-time conversational interface where Gemini adopts your dog’s exact personality, complete with voice recognition input, cute simulated canine actions (tail wags frantically), and spoken audio replies.

The goal was to build far more than a basic breed classifier โ€” to create a delightful, deeply personal AI experience centered around the joy of dog companionship.

Demo

๐Ÿš€ Live Web Application:
https://aistudio.google.com/apps/7c426e35-1292-4dc9-93d5-06117d4b365c?showPreview=true&project=gen-lang-client-0556648492&showAssistant=true&fullscreenApplet=true

๐Ÿ”— Google AI Studio App Workspace:
https://ai.studio/apps/7c426e35-1292-4dc9-93d5-06117d4b365c

Code

The application is built as a production-ready full-stack application:

  • Frontend: React 19, TypeScript, Tailwind CSS, Motion animations, Lucide Icons, Canvas Confetti, and native Web Audio / Speech Synthesis APIs.
  • Backend API: Node.js & Express server with @google/genai SDK.
  • Persistence: Browser IndexedDB (PawSenseDB) with client-side image compression for fast, persistent storage of scanned dog packs without storage quota limits.
  • Resilience: Automatic retry with exponential backoff and a model fallback chain (gemini-3.7-flash โž” gemini-flash-latest โž” gemini-2.5-flash) to ensure continuous uptime during high-demand traffic spikes.

How I Built It

1. Central Multimodal Gemini Intelligence

Google Gemini is the core engine powering the entire experience:

  1. When a photo is uploaded, the image is sent securely to the backend /api/analyze-dog endpoint.
  2. Gemini evaluates the photo using multimodal vision understanding, extracting breed taxonomy, morphological characteristics, life stage clues, personality archetypes, and routine suggestions.
  3. The response is strictly validated against a typed JSON schema (responseMimeType: "application/json", responseSchema), guaranteeing clean, structured data for the frontend in a single pass.

2. Conversational Dog Persona Engine

The /api/chat-dog endpoint injects the generated breed traits, quirks, fears, and relationship dynamics into the model’s system instructions. Gemini assumes the dog’s first-person perspective, reacting with authentic dog logic (obsessions with treats, squeaky toys, belly scritches, and naps) alongside expressive action markers.

3. Interactive Web Audio & Canvas Exporting

  • Sound Effects: Synthesized using the Web Audio API (happy yips, tail thumps, camera clicks) and Web Speech API for voice playback.
  • PawPort Card Generator: Renders high-definition collectible trading cards dynamically onto HTML5 Canvas with custom badges, QR verification stamps, and direct image download support.

4. Robust Local Persistence with IndexedDB

To handle multiple dog photo uploads without exceeding standard browser storage limits, the app employs an asynchronous IndexedDB storage layer (PawSenseDB) alongside client-side image optimization.

Prize Categories

๐Ÿ† Best Use of Google AI

PawSense AI is submitted for the Best Use of Google AI category.

Rather than using AI as a simple chatbot widget, Google Gemini powers the foundational architecture of the application:

  • Multimodal Image Analysis: Deep morphological visual understanding of dog breeds, age cues, and physical traits.
  • Structured Schema Synthesis: Generating structured JSON profiles spanning genetics, behavioral traits, and custom care routines.
  • Roleplay & Dynamic Chat: Conversational AI grounded in each dog’s unique persona.
  • Spontaneous Creative Generation: Real-time translation of canine inner monologues and thoughts.

๐Ÿ• Built for dogs. Powered by Gemini. Inspired by the bond between humans and their best friends.

์›๋ฌธ์—์„œ ๊ณ„์† โ†—

์ถ”์ถœ ๋ณธ๋ฌธ ยท ์ถœ์ฒ˜: dev.to ยท https://dev.to/makendrang/pawsense-ai-your-dogs-ai-sidekick-powered-by-gemini-4e5f