DEV Community

Cover image for VarCouch — I Built an AI Therapist for Your Code Variables (They Need It)
Yash Kumar Saini
Yash Kumar Saini Subscriber

Posted on

VarCouch — I Built an AI Therapist for Your Code Variables (They Need It)

April Fools Challenge Submission ☕️🤡

This is a submission for the DEV April Fools Challenge

What I Built

Your variables have been through a lot. The endless renaming. The silent judgment from code reviewers. That one time someone called temp2 a "perfectly fine name." They deserve better. They deserve a couch.

VarCouch is the world's first AI-powered therapy platform for emotionally neglected code variables. You paste your code, and Dr. VarCouch — a licensed Variable Therapist with a PhD in Computational Psycholinguistics from MIT (the Massachusetts Institute of Transpilation) — conducts a full psychological assessment of every identifier.

No, it doesn't solve any real problem. Yes, I'm very serious about it.

VarCouch homepage with the tagline

Every variable gets:

  • A clinical diagnosis (e.g., "Chronic Hoisting-Induced Dissociative Fugue")
  • A distress level from 1 to 10 with a color-coded progress bar
  • A backstory explaining the trauma that led it here
  • Session notes that type out like the therapist is writing in real time
  • A therapist's recommendation for emotional recovery
  • Coping mechanisms the variable has developed over the years
  • A downloadable PDF clinical discharge report that looks disturbingly official

The whole thing is wrapped in a warm, dark-gold theme because therapy should feel cozy, even for code.

Therapy results showing variable cards with clinical diagnoses, distress levels, and typewriter session notes

The Teapot Protocol

This wouldn't be a proper 418 Challenge entry without paying respect to Larry Masinter and RFC 2324.

If any of your variables are named teapot, coffee, brew, espresso, latte, cappuccino, chai, mocha, or kettle, Dr. VarCouch flags them as falling under HTCPCP jurisdiction. They get a special golden glow, an "RFC 2324 Certified" badge, and a note that they need to be referred to a qualified barista-therapist — because Dr. VarCouch is not licensed to treat beverages.

There's also a dedicated /api/teapot endpoint that returns a proper HTTP 418 with custom headers:

{
  "status": 418,
  "error": "I'm a teapot",
  "drNote": "Dr. VarCouch cannot treat teapots. Please consult a qualified barista-therapist.",
  "protocol": "HTCPCP/1.0",
  "prescription": "Two shots of espresso and a code review in the morning."
}
Enter fullscreen mode Exit fullscreen mode

With headers X-Teapot-Status: short-and-stout and X-Masinter-Protocol: HTCPCP/1.0, because if you're going to implement a joke protocol, you should commit to it.

A teapot-flagged variable with RFC 2324 badge and golden glow treatment

The PDF Discharge Report

You can download a clinical discharge report for each variable — a real PDF that looks like it came from an actual therapist's office. Gold letterhead reading "VarCouch Therapeutic Services, LLC", color-coded distress levels, the attending physician listed as "Dr. VarCouch, PhD (Computational Psycholinguistics, MIT — Massachusetts Institute of Transpilation)", and a footer disclaimer: "No actual variables were harmed in the making of this report."

It's HIPAA-adjacent. Not HIPAA-compliant.

PDF discharge report with gold letterhead and clinical formatting

Demo

Live: varcouch.vercel.app

Demo GIF showing the complete therapy flow from code paste to results

Code

DEV April Fools 2026 Challenge

DEV April Fools 2026 Challenge

VarCouch

License PRs Welcome Next.js Gemini DEV Challenge

AI-powered therapy for emotionally neglected code variables.

Your variables have feelings. We have a couch.

Live Demo · Report Bug · Request Feature

VarCouch demo showing code input and therapy session output

This project is a submission for the DEV April Fools 2026 Challenge -- a challenge to build something completely useless or silly that solves zero real-world problems.

Prize categories targeted:

  • Best Google AI Usage -- Powered by Google Gemini 3 Flash with structured JSON output, variable-aware system prompts, and schema-enforced therapy sessions
  • Best Ode to Larry Masinter -- Features a dedicated /api/teapot endpoint returning HTTP 418, RFC 2324 (HTCPCP) references throughout, and automatic detection of teapot/coffee variable names for specialized barista-therapist referrals

About The Project

VarCouch is the world's first AI-powered mental wellness platform for emotionally neglected code variables. Paste your code, and Dr. VarCouch -- a licensed Variable Therapist with 20 years of clinical experience -- will conduct a deep…

How I Built It

The stack is honestly overkill for something this useless, and I wouldn't have it any other way.

Frontend:

  • Next.js 16 with App Router and React 19
  • Tailwind CSS 4 with a custom warm dark theme — aurora gradient background, glassmorphism cards, animated grain texture
  • Fraunces variable font for headings (it has a "WONK" axis, which felt appropriate for a therapy app)
  • Monaco Editor for the code input — your variables deserve a proper IDE, even on the couch
  • Framer Motion for page transitions, typewriter effects, floating code symbols during loading

Backend & AI:

  • Google Gemini 3 Flash with structured JSON output and a schema-enforced response format
  • A system prompt that never breaks character — Dr. VarCouch has 20 years of clinical experience and takes this very seriously
  • Input validation, size limits, rate limit handling, and prompt injection defense (even joke apps deserve good security)

Other bits:

  • jsPDF for client-side PDF generation with proper page-break handling
  • Regex-based variable extraction for 5 languages (JavaScript, TypeScript, Python, Go, Rust)
  • A hand-crafted loading screen where code symbols ({, }, ;, =, ()) float around the therapy couch

The Gemini integration uses structured output with a full JSON schema, so every therapy session comes back with the exact same shape — diagnosis, distress level, backstory, session notes, recommendation, coping mechanisms. No hoping the AI returns something parseable. It either matches the schema or it doesn't.

Loading animation with floating couch and code symbols

What I Learned

Building something deliberately useless taught me a few things:

  1. Structured AI output is underrated. Gemini's JSON schema mode meant I never had to parse free-text AI responses. Every field was guaranteed. This is genuinely useful knowledge I'll take to real projects.

  2. Committing to the bit makes everything better. The PDF discharge report, the RFC 2324 references, the "Massachusetts Institute of Transpilation" — none of these are necessary, but they make the whole thing feel like a complete world rather than a half-baked joke.

  3. Dark themes with warm colors feel really good. The gold-on-black palette with aurora gradients and glassmorphism came together better than any "serious" UI I've designed. Turns out removing the pressure of building something useful frees you up to actually experiment with design.

Prize Category

I'm submitting for two categories:

Best Google AI Usage — VarCouch uses Google Gemini 3 Flash with structured JSON output, a character-committed system prompt, schema-enforced response validation, and differentiated error handling for rate limits, safety filters, and API failures. The AI never breaks character and every response is type-safe.

Best Ode to Larry Masinter — Dedicated /api/teapot endpoint with HTTP 418 and HTCPCP headers, automatic teapot variable detection, RFC 2324 badges on flagged variables, and Larry Masinter's wisdom preserved in the footer of every page. Because any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot."


In loving memory of RFC 2324 (HTCPCP) and all the teapots that just wanted to brew coffee.

"Remember: there are no bad variables, only misunderstood identifiers." — Dr. VarCouch

Top comments (1)

Collapse
 
yatendra1247 profile image
Info Comment hidden by post author - thread only accessible via permalink
Arvind kumar

Works really great Nice build 👍️

Some comments have been hidden by the post's author - find out more