DEV Community

CJ
CJ

Posted on

The Passion Autopsy: A Compassionate Case File for the Hobbies We Let Go

DEV Weekend Challenge: Passion Edition Submission

This is a submission for Weekend Challenge: Passion Edition

What I Built

The Passion Autopsy is a small web app for a passion no one ever talks about: the ones we quietly let die.

Most "passion" projects celebrate the fire — the fandom, the rivalry, the obsession still burning. I wanted to build something for the other side of that: the guitar in the closet, the half-finished novel, the sport you gave up somewhere between adulthood and exhaustion. Instead of guilt-tripping you about quitting, the app generates a compassionate, literary autopsy report for your lost passion — written by the fictional Chief Examiner at the Department of Lost Passions — exploring what happened to it, and whether it could realistically come back.

You type in what you used to love, roughly when it faded, and a sentence or two of context. The examiner returns a full case file: a status (Deceased / Dormant / Critical / Missing), a cause of death, contributing factors, a fragment of "recovered evidence" quoted from your own words, the examiner's findings, and an honest read on whether revival is possible — closing on a single line meant to read like the last words on a museum plaque.

Demo

Live app: https://passion-autopsy.vercel.app/
GitHub repo: https://github.com/zennmarieee/passion-autopsy

Home Page

Home Page

Passion Report

Report1

How I Built It

Stack: Next.js (App Router) + TypeScript + Tailwind CSS, deployed on Vercel. No database, no authentication — the entire experience lives in a single page, backed by one serverless API route.

The persona is the product. The whole app hinges on Gemini staying in character as a forensic examiner rather than slipping into generic AI or self-help language. I spent real time on the prompt: it explicitly forbids clichés like "it's never too late" or "follow your dreams," frames the passion itself (not the person) as the "patient" under examination, and asks for a closing line written like a museum plaque inscription rather than a motivational quote. Getting that tone right mattered more to me than any single feature.

Structured output, validated end-to-end. Gemini returns strict JSON (status, cause_of_death, contributing_factors, recovered_evidence, autopsy_findings, resurrection_possibility, case_closing_statement), which I validate against a schema server-side before it ever reaches the client — so a malformed AI response fails loudly on the server instead of quietly breaking the UI.

Prompt-injection guard. Since three form fields get dropped directly into the prompt, I explicitly delimit user input as <case_intake> data, with an instruction telling Gemini to treat anything that looks like an embedded instruction as a strange detail about the passion, not a command to obey.

The hardest bug wasn't the AI — it was the screenshot. The "Download as Image" export (built with html2canvas) came out looking completely washed out for a while. Turned out to be two separate issues stacked on top of each other: Tailwind's CSS-variable-based color system doesn't always survive html2canvas's DOM cloning, and the card's fade-in animation — which starts at opacity: 0 — was restarting on the clone and getting rasterized before it finished. The fix was to have html2canvas copy already-resolved computed colors onto the clone and explicitly force animation: none; opacity: 1 before rasterizing. Small bug, satisfying fix.

Local history, no database. Past cases save to localStorage so you can revisit or re-download old reports — fully client-side, removable anytime, never sent anywhere. Keeps the "no backend" constraint honest while still giving the experience some persistence.

Guardrails for a public demo. A lightweight per-IP rate limit and an origin check on the API route keep the (very finite) Gemini quota from being drained by casual abuse, since this is a publicly shared link with no login.

Prize Categories

Best Use of Google AI — Gemini (gemini-3.1-flash-lite) is the entire reasoning engine behind this project, not a bolted-on summarizer. It's doing structured persona-driven creative writing under a hard JSON schema: sustaining a consistent fictional voice, reasoning about why a passion plausibly faded from sparse user input, and reconstructing a specific "evidence" detail grounded only in what the user actually said — while explicitly avoiding cliché and staying in character across every generation.

Thanks for reading — and for anyone who's ever had a passion quietly go dormant: no judgment. Just data.

Top comments (0)