DEV Community

Cover image for Good Boy Dossier: I Made Gemini Write Detective Case Files for Dogs
Raheel Nazir
Raheel Nazir

Posted on

Good Boy Dossier: I Made Gemini Write Detective Case Files for Dogs

DEV Weekend Challenge: Dog Days Edition Submission πŸ•

This is a submission for [Weekend Challenge: Dog Days Edition] https://dev.to/devteam/join-our-dev-weekend-challenge-dog-days-edition-1000-in-prizes-across-five-winners-submissions-1g4i

What I Built

Good Boy Dossier turns a photo of your dog into a fully-generated "detective case file" a noir-style dossier written by AI. Upload a photo, and it produces a codename, an invented backstory, a deadpan "mood read," a confession of imagined mischief, an Instagram bio written in the dog's own voice, and a "Good Boy Score" with a witty rationale.

Breed identifiers felt like the obvious angle for a dog-themed challenge, so I wanted to build something that treats the photo as a jumping-off point for a story instead of a classification problem. The goal was less "what breed is this" and more "what's this dog's deal" something genuinely fun to share, not just informative.

Demo

πŸ”— Live app:

Code

πŸ•΅οΈ Good Boy Dossier

Upload a photo of your dog. Get back a noir detective case file.

Good Boy Dossier hands your pet's photo to Google Gemini, which opens an official file on them: a codename, an invented case history, a deadpan read on their current expression, a confession to recent crimes, a bio in their own voice, and a legally meaningless Good Boy Score out of 100.

Then you download the whole thing as a shareable card.

Case No. GBD-4417-K9 β€” THE VELVET SNOOT "One left slipper, relocated under the sofa at 0400 hours. The subject maintains the slipper walked there on its own." Good Boy Score: 87 / 100 β€” Would be a clean ninety if the mud on that left paw matched the mud in the hallway.


Why this exists

Built for DEV's Weekend Challenge: "Dog Days".

The brief was dogs, and the interesting constraint in…

How I Built It

The app is a Next.js 14 + TypeScript + Tailwind project, fully client-driven with a single server-side API route.

When a photo is uploaded, it's sent to an API route that calls Google's Gemini API with a multimodal prompt the image plus instructions to return structured JSON (codename, backstory, mood read, confession, bio, score, and rationale). Gemini's vision capabilities do the actual "reading" of the photo, and its generation handles the creative writing for each field, which is really the core of the app the personality of the output depends entirely on Gemini actually looking at the image and reacting to it, not a canned template.

A few decisions worth calling out:

  • I asked Gemini for strict JSON back so I could render it into a designed card instead of dumping raw text this meant handling occasional malformed responses (stripping markdown fences, retrying once) so the app doesn't break on an off-format reply.
  • The result renders as a shareable "case file" graphic (photo + typed dossier styled like a redacted government file), downloadable as a PNG I wanted the output to be something people would actually want to post, not just read once and close the tab.
  • Kept it fully client-session based, no database the app doesn't need to remember anything between visits.

Prize Categories

Submitting for Best Use of Google AI Gemini isn't a bolted-on feature here, it's the entire product: the multimodal read of the photo and the generated writing are what the app actually is.

Top comments (2)

Collapse
 
ahmed_ali_faeff905045e300 profile image
Ahmed Ali

Hey man ! This is a very interesting idea and well executed !

Easily among Top 5 i guess

Collapse
 
raheelnaziir profile image
Raheel Nazir

thanks man i am hoping for the best !

really need a win rn