<?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: Dhruv Jani</title>
    <description>The latest articles on DEV Community by Dhruv Jani (@dj29).</description>
    <link>https://dev.to/dj29</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%2F3743406%2F227d53d3-1443-4ceb-9fb8-98c02ff9e60f.jpg</url>
      <title>DEV Community: Dhruv Jani</title>
      <link>https://dev.to/dj29</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dj29"/>
    <language>en</language>
    <item>
      <title>The Imitation Game — A Reverse Turing Test Set on June 21, 1952</title>
      <dc:creator>Dhruv Jani</dc:creator>
      <pubDate>Fri, 12 Jun 2026 20:15:00 +0000</pubDate>
      <link>https://dev.to/dj29/the-imitation-game-a-reverse-turing-test-set-on-june-21-1952-4dl2</link>
      <guid>https://dev.to/dj29/the-imitation-game-a-reverse-turing-test-set-on-june-21-1952-4dl2</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/june-game-jam-2026-06-03"&gt;June Solstice Game Jam&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I propose to consider the question: Can machines think?"&lt;/em&gt;&lt;br&gt;
— Alan Turing, 1950&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;June 21, 1952. Wilmslow, Cheshire, England.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alan Turing — the man who broke the Enigma code, shortened World War II by an estimated two years, and laid the foundation for every computer that exists today — is at home, awaiting sentencing. His crime? Being gay.&lt;/p&gt;

&lt;p&gt;That same year, he had already published the paper that defines our age. In it, he proposed &lt;strong&gt;The Imitation Game&lt;/strong&gt;: a test to determine whether a machine can convincingly imitate a human. We now call it the Turing Test.&lt;/p&gt;

&lt;p&gt;This game turns that test on you.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;&lt;a href="https://the-imitation-game-dj29.vercel.app" rel="noopener noreferrer"&gt;▶ Play The Imitation Game&lt;/a&gt;&lt;/strong&gt; ← &lt;em&gt;Desktop + headphones recommended&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Imitation Game: Operation Imitation&lt;/strong&gt; is a tense, atmospheric terminal game set on June 21, 1952 — the summer solstice, the longest day of the year, and the day Alan Turing awaited his sentence.&lt;/p&gt;

&lt;p&gt;You play as a GCHQ analyst. Three signals come through on a classified channel. One is a real human operative. The other two are AI entities attempting to pass as human — powered in real time by the &lt;strong&gt;Gemini API&lt;/strong&gt;. You have five transmissions per round, a countdown timer, and three clearance levels before the operation is terminated.&lt;/p&gt;

&lt;p&gt;It's a reverse Turing Test. Instead of asking whether a machine can fool a human, the game asks whether &lt;em&gt;you&lt;/em&gt; can spot the machine. Every response is live Gemini inference. No scripts. No pre-written answers. The AI suspects actually think, respond, and try to fool you.&lt;/p&gt;

&lt;h3&gt;
  
  
  How it connects to the theme
&lt;/h3&gt;

&lt;p&gt;The game hits every theme this jam is about — not as decoration, but as the actual structure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;June Solstice&lt;/strong&gt; — The game takes place across five rounds tracking June 21st from 06:00 AM to 09:00 PM. The CRT terminal shifts color temperature with the sun — warm amber at dawn, classic green at midday, cold blue at nightfall. The longest day of the year is your playing field.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pride&lt;/strong&gt; — Turing was prosecuted for being gay. The game doesn't soften this. Classified dossier briefings between rounds tell his real story — his conviction, his forced chemical castration, his death at 41. The game's central question — &lt;em&gt;who gets to be considered human?&lt;/em&gt; — is the Turing Test, and it's also what Pride has always been asking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Light and Darkness&lt;/strong&gt; — A day of maximum light that ends in darkness. Mechanically and metaphorically, that's the game.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Video Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/oVWAlqr_K5s"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/JaniDhruv" rel="noopener noreferrer"&gt;
        JaniDhruv
      &lt;/a&gt; / &lt;a href="https://github.com/JaniDhruv/the-imitation-game" rel="noopener noreferrer"&gt;
        the-imitation-game
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Can you tell human from machine? Interrogate three Cold War-era signals across 5 rounds and find the human — if there is one. A Turing Test game powered by Gemini AI. June 21, 1952. The longest day.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/JaniDhruv/the-imitation-game/public/og-banner.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FJaniDhruv%2Fthe-imitation-game%2FHEAD%2Fpublic%2Fog-banner.png" alt="The Imitation Game — Operation Imitation" width="480"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/1e4514393d612d6f8931af153eb3199e771f2412fca0e2abfed11c95f1ede9fd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a554e452532303231253243253230313935322d5448452532304c4f4e474553542532304441592d3333666630303f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d306130663061"&gt;&lt;img src="https://camo.githubusercontent.com/1e4514393d612d6f8931af153eb3199e771f2412fca0e2abfed11c95f1ede9fd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a554e452532303231253243253230313935322d5448452532304c4f4e474553542532304441592d3333666630303f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d306130663061" alt="June 21, 1952"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/46743d4a4b6d3c2fa3b321c41d1531297fef51f223812c03da9068754e4d621d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504f574552454425323042592d47454d494e4925323041492d3432383546343f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d306130663061"&gt;&lt;img src="https://camo.githubusercontent.com/46743d4a4b6d3c2fa3b321c41d1531297fef51f223812c03da9068754e4d621d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504f574552454425323042592d47454d494e4925323041492d3432383546343f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d306130663061" alt="Gemini AI"&gt;&lt;/a&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/642465583c976f2333e2632bb2cb5cd1fdaf909ac1e2ac42ef945d0d555b6b21/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5354415455532d4f5045524154494f4e414c2d3333666630303f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d306130663061"&gt;&lt;img src="https://camo.githubusercontent.com/642465583c976f2333e2632bb2cb5cd1fdaf909ac1e2ac42ef945d0d555b6b21/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5354415455532d4f5045524154494f4e414c2d3333666630303f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d306130663061" alt="Status: Operational"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;THE IMITATION GAME&lt;/h1&gt;
&lt;/div&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;⬛ OPERATION IMITATION — CLASSIFICATION: ULTRA ⬛&lt;/h3&gt;
&lt;/div&gt;



&lt;p&gt;
  &lt;strong&gt;Three signals. One human. Five transmissions. The clock is running.&lt;/strong&gt;&lt;br&gt;
  &lt;em&gt;Can you tell the difference — or will the machines tell the difference for you?&lt;/em&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;a href="https://the-imitation-game-dj29.vercel.app" rel="nofollow noopener noreferrer"&gt;&lt;strong&gt;▶ &amp;nbsp;INITIATE TERMINAL SESSION&lt;/strong&gt;&lt;/a&gt;
  &amp;nbsp;•&amp;nbsp;
  &lt;a href="https://github.com/JaniDhruv/the-imitation-game#-the-concept" rel="noopener noreferrer"&gt;The Concept&lt;/a&gt;
  &amp;nbsp;•&amp;nbsp;
  &lt;a href="https://github.com/JaniDhruv/the-imitation-game#-features" rel="noopener noreferrer"&gt;Features&lt;/a&gt;
  &amp;nbsp;•&amp;nbsp;
  &lt;a href="https://github.com/JaniDhruv/the-imitation-game#-technical-deep-dive" rel="noopener noreferrer"&gt;Tech Deep Dive&lt;/a&gt;
  &amp;nbsp;•&amp;nbsp;
  &lt;a href="https://github.com/JaniDhruv/the-imitation-game#-setup" rel="noopener noreferrer"&gt;Setup&lt;/a&gt;
&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I propose to consider the question: Can machines think?"&lt;/em&gt;
— Alan Turing, &lt;strong&gt;Computing Machinery and Intelligence&lt;/strong&gt;, 1950&lt;/p&gt;
&lt;/blockquote&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;▋ The Concept&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;June 21, 1952. Wilmslow, Cheshire, England.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alan Turing — the man who broke the Enigma code, shortened World War II by an estimated two years, saved millions of lives, and laid the foundation for every computer that exists today — is at home, awaiting sentencing. His crime? Being gay.&lt;/p&gt;

&lt;p&gt;That same year, he had already published the paper that defines our age. In it, he proposed &lt;strong&gt;The Imitation Game&lt;/strong&gt;: a test to determine whether a machine can convincingly…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JaniDhruv/the-imitation-game" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Core Loop
&lt;/h3&gt;

&lt;p&gt;The entire game runs on live Gemini inference. Each of the three suspects per round is a distinct Gemini model instance with its own system context. When you send a transmission, it hits a Vercel serverless function (&lt;code&gt;api/transmit.js&lt;/code&gt;) which calls the Gemini API with the full conversation history and returns the response. No caching. No pre-generation. Every response is real.&lt;/p&gt;

&lt;h3&gt;
  
  
  The AI Persona System
&lt;/h3&gt;

&lt;p&gt;Seven AI personas are in play across the game. Each one has a &lt;strong&gt;hidden behavioral tell&lt;/strong&gt; — a pattern baked into their system prompt that they cannot fully suppress:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Codename&lt;/th&gt;
&lt;th&gt;Hidden Tell&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CIPHER&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cannot answer questions about fear. Always deflects.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ORACLE&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Structures every response as a sequence: &lt;em&gt;"First… Second…"&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MARLOWE&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Every answer involves sensory detail — smell, taste, texture.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;STATIC&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Echoes an unusual word from your message back at you.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;WREN&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Never uses the word "I" in any form. Ever.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ARGUS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Responds to every question with a question.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ECHO&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Mirrors your vocabulary, tone, and sentence length exactly.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Alongside them: five fully realized 1952 British human characters — each with their own backstory, speech patterns, and emotional triggers that crack under the right pressure. They have no idea they're being tested.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt Engineering as Game Design
&lt;/h3&gt;

&lt;p&gt;The real design work in this project lives in the system prompts. Each persona's instructions had to be a precisely balanced act: convincing enough to deceive a careless player, but with an embedded behavioral signature subtle enough to reward a careful one.&lt;/p&gt;

&lt;p&gt;The difficulty system is fundamentally a prompt engineering system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easy&lt;/strong&gt; — Lean into the tell. Make it obvious.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium&lt;/strong&gt; — Standard behavioral patterns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard&lt;/strong&gt; — Suppress the tell. Controlled imperfection only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nightmare&lt;/strong&gt; — Full suppression + active mimicry of human inconsistency. Rules not disclosed.
On harder difficulties, AI personas also receive additional behavioral instructions that change how they react to direct questioning — making them actively work against you, not just passively hide.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Technical Stack
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;React 19 + Vite / React Router v7
Google Gemini API (@google/genai)
Vercel serverless functions
Web Audio API — 100% procedural sound synthesis
Vanilla CSS — full CRT design system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The CRT Aesthetic
&lt;/h3&gt;

&lt;p&gt;The entire terminal is built in vanilla CSS with zero external UI libraries. Scanline overlay, screen vignette, CRT curvature simulation, phosphor text glow with dynamic color temperature, chromatic aberration glitch effects on wrong answers, and typewriter character-by-character text reveal on every incoming transmission. The screen literally flickers more as the night progresses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Procedural Audio
&lt;/h3&gt;

&lt;p&gt;Zero audio files. Every sound is synthesized in real time using the Web Audio API — from the 50Hz CRT ambient hum with brown noise, to mechanical typewriter clicks on every keystroke, to the heartbeat pulse in the final 30 seconds, to the klaxon alarm when you get it wrong. The &lt;code&gt;SoundEngine.js&lt;/code&gt; singleton builds everything from oscillators, noise buffers, biquad filters, and gain envelopes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fallback Architecture
&lt;/h3&gt;

&lt;p&gt;If Gemini API quota is exhausted (which can happen when multiple people play simultaneously during judging), the system silently fails over to an OpenAI-compatible endpoint running &lt;strong&gt;Meta's LLaMA 3.1 8B Instruct&lt;/strong&gt; via NVIDIA NIM. Full persona rules are maintained. The game never crashes.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Solstice Day/Night Cycle
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Round 1 — 06:00 AM — DAWN      — Warm amber phosphor
Round 2 — 10:00 AM — MORNING   — Classic green CRT
Round 3 — 02:00 PM — ZENITH    — Peak brightness, golden tint
Round 4 — 06:00 PM — DUSK      — Sunset amber/orange
Round 5 — 09:00 PM — NIGHTFALL — Cold, dark blue-green
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;useSolsticeTheme&lt;/code&gt; hook manages CSS custom property injection across the five phases, creating a visual arc that mirrors the actual solstice.&lt;/p&gt;




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

&lt;h3&gt;
  
  
  🧠 Best Ode to Alan Turing
&lt;/h3&gt;

&lt;p&gt;This game &lt;em&gt;is&lt;/em&gt; the Turing Test — not inspired by it, not referencing it, but literally instantiating it as an interactive experience.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The title is Turing's own name for his proposed test&lt;/li&gt;
&lt;li&gt;The interrogation format mirrors his exact proposed structure from the 1950 paper&lt;/li&gt;
&lt;li&gt;The AI personas directly embody his central question: &lt;em&gt;can machines deceive?&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;The game is set on June 21, 1952 — the actual day he was awaiting sentencing&lt;/li&gt;
&lt;li&gt;The ending asks the question he asked in 1950 — and after playing the game, the answer lands differently
Turing imagined a machine that could imitate a human well enough to fool an interrogator. This game puts you in the interrogator's chair, facing exactly that machine — powered by the kind of AI he spent his life theorizing about. Every mechanic is a direct reference. The game exists because of him.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🤖 Best Google AI Usage
&lt;/h3&gt;

&lt;p&gt;Google AI is not a feature added to this game. It &lt;em&gt;is&lt;/em&gt; the game.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemini API&lt;/strong&gt; powers the entire core mechanic. Every suspect response across every round is live Gemini inference. The persona system uses carefully engineered system instructions to create 7 distinct behavioral identities with difficulty-adaptive tells. This isn't a chatbot wrapper — it's a game mechanic built entirely through prompt engineering. The prompts &lt;em&gt;are&lt;/em&gt; the game design.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Antigravity&lt;/strong&gt; (Google's agentic AI coding assistant) was used throughout development as a pair programming collaborator — from architecture decisions and component structure to the audio synthesis system and the CRT visual design. The concept, creative direction, persona design, and narrative were human-driven; Antigravity helped execute and iterate at speed.&lt;/p&gt;

&lt;p&gt;The combination of Gemini as the live game engine and Antigravity as the development collaborator makes this, genuinely, a Google AI project at every layer.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The longest day of the year. The shortest distance between human and machine.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In memory of Alan Mathison Turing (23 June 1912 — 7 June 1954)&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gamechallenge</category>
      <category>gamedev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>ShelfTalk — Books Don't Talk. We Do. (A College Project, Revived)</title>
      <dc:creator>Dhruv Jani</dc:creator>
      <pubDate>Sun, 07 Jun 2026 20:13:47 +0000</pubDate>
      <link>https://dev.to/dj29/shelftalk-books-dont-talk-we-do-a-college-project-revived-o4o</link>
      <guid>https://dev.to/dj29/shelftalk-books-dont-talk-we-do-a-college-project-revived-o4o</guid>
      <description>&lt;p&gt;"Books don't talk. We do." — How I Finally Shipped the College Project I Almost Abandoned&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-05-21"&gt;GitHub Finish-Up-A-Thon Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;Semester 5. Advanced Technologies subject. The brief: build a full MERN application from scratch.&lt;/p&gt;

&lt;p&gt;I built ShelfTalk — a social platform for book lovers. Book clubs, real-time chat, live synchronized reading sessions, discovery, profiles. Think Goodreads meets Discord, built solo in a college semester.&lt;/p&gt;

&lt;p&gt;I submitted it. Passed the course. Closed the laptop.&lt;/p&gt;

&lt;p&gt;Then it sat on GitHub for months, untouched, with a tagline nobody ever read and features that half-worked on localhost and nowhere else.&lt;/p&gt;

&lt;p&gt;The GitHub Finish-Up-A-Thon gave me the deadline I'd been avoiding.&lt;/p&gt;

&lt;p&gt;🔗 Live: &lt;a href="https://shelftalk-community.vercel.app" rel="noopener noreferrer"&gt;shelftalk-community.vercel.app&lt;/a&gt;&lt;br&gt;
🐙 GitHub: &lt;a href="https://github.com/JaniDhruv/ShelfTalk" rel="noopener noreferrer"&gt;github.com/JaniDhruv/ShelfTalk&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;



&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/qRF0U1AmdOc"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Create an account and open two tabs — real-time chat and the Live Reading Room are best experienced with a second window.&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Landing Page - Hero Section&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkgxm7e923gplvaqipsx0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkgxm7e923gplvaqipsx0.png" alt="Landing page" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Login Page&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fss7lw5allorxso988zd6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fss7lw5allorxso988zd6.png" alt="Login Page" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Posts Page&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kjjvf6a6wxy9cc1jg56.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kjjvf6a6wxy9cc1jg56.png" alt="Posts Page" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;1-1 Chats&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29ot4h45t6qhgg1e4jef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29ot4h45t6qhgg1e4jef.png" alt="Chat" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Groups Page&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr5fknnjk5g365yx5xk8k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr5fknnjk5g365yx5xk8k.png" alt="Groups Page" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Group Chat&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb128j6r2ui59cn6k0qm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb128j6r2ui59cn6k0qm2.png" alt="Group Chat" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Group Library&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4c482dkyv0ijg08jllm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq4c482dkyv0ijg08jllm.png" alt="Group Library" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Reading Room&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3684c6b9ps8ju8fko8fc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3684c6b9ps8ju8fko8fc.png" alt="Reading Room" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Leaderboard&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgl4ofs3hvbysyznvyw7o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgl4ofs3hvbysyznvyw7o.png" alt="Leaderboard" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(&lt;em&gt;Personal Profile Diary&lt;/em&gt;)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9ha1b8lb8pnwvvftt8e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9ha1b8lb8pnwvvftt8e.png" alt="Personal Profile Diary" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Comeback Story - What Was Broken vs What Ships Now
&lt;/h2&gt;

&lt;p&gt;When I submitted ShelfTalk for my final grade, the codebase was held together by duct tape. It was good enough to pass, but not good enough to ship. Here is how I tore it down and rebuilt it for production:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-Time Chat — rebuilt from scratch&lt;/strong&gt;&lt;br&gt;
Ripped out the REST polling and replaced it with a full Socket.io implementation. Messages now deliver instantly. Presence indicators show who's online. Group chats stay synced across all members without a single refresh.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Reading Rooms — brand new feature&lt;/strong&gt;&lt;br&gt;
This is the one I always wanted to build but ran out of time for. A book club can start a synchronized reading session — members join, update their page in real time, drop spoiler-safe emoji reactions at specific pages, and compete on a leaderboard. A community heatmap shows where everyone is clustered across the book. Built entirely during this revival.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reading Diary — brand new feature&lt;/strong&gt;&lt;br&gt;
A personal daily reading log. Track your reading journey, your streaks, your progress. Something quiet and personal in an otherwise social app.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Push Notifications — brand new feature&lt;/strong&gt;&lt;br&gt;
Native desktop notifications for new messages, group invites, group activity, and reading room events.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everything else that was broken — fixed&lt;/strong&gt;&lt;br&gt;
Local file uploads migrated to MongoDB GridFS. Local MongoDB migrated to MongoDB Atlas. JWT properly implemented across all protected routes. CRA migrated to Vite for dramatically faster builds. The entire app deployed to Vercel and Render — not just running on my laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Engineering Lessons:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;State Consistency&lt;/strong&gt;: Learned how to manage race conditions in real-time WebSockets using acknowledgment callbacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build Optimization&lt;/strong&gt;: Successfully migrated a monolithic CRA build to Vite, reducing HMR times by 80%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Migration&lt;/strong&gt;: Transitioned from a local instance to MongoDB Atlas + GridFS for production-grade file storage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Experience with GitHub Copilot
&lt;/h2&gt;

&lt;p&gt;Copilot was the pair programmer that made this revival possible in a tight timeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Live Reading Rooms&lt;/strong&gt;&lt;br&gt;
The hardest part was synchronizing state across multiple clients without race conditions. I asked Copilot Chat to explain the best Socket.io pattern for this — it walked me through using acknowledgment callbacks on socket emissions to guarantee state consistency when a user joins mid-session. It then scaffolded the initial join_reading_room and page_updated event handlers that became the backbone of the entire feature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reading Diary&lt;/strong&gt;&lt;br&gt;
I knew I wanted a diary but wasn't sure what data actually makes it useful. Copilot Chat helped me brainstorm — daily page counts, reading streaks, mood tags, session duration — then generated the Mongoose schema structure. What would have taken an hour of documentation reading took 10 minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vite Migration&lt;/strong&gt;&lt;br&gt;
Moving from CRA to Vite surfaced a lot of subtle import errors and environment variable differences — process.env everywhere had to become import.meta.env. Copilot's inline suggestions caught most of these automatically as I typed. It knew the Vite conventions and autocompleted the correct patterns before I even looked them up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UI Polish&lt;/strong&gt;&lt;br&gt;
The new chat bubbles, leaderboard ranking cards, reading room ambient gradients — Copilot autocompleted flexbox layouts and suggested responsive breakpoints throughout. Small wins that added up to hours saved.&lt;/p&gt;

&lt;p&gt;Built with ☕ and too many late nights.&lt;br&gt;
&lt;a href="https://shelftalk-community.vercel.app" rel="noopener noreferrer"&gt;shelftalk-community.vercel.app&lt;/a&gt;&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/dj29"&gt;@dj29&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>FinePrint — An AI Pocket Lawyer That Decodes Predatory Contracts Using Gemma 4</title>
      <dc:creator>Dhruv Jani</dc:creator>
      <pubDate>Sun, 24 May 2026 17:40:40 +0000</pubDate>
      <link>https://dev.to/dj29/fineprint-an-ai-pocket-lawyer-that-decodes-predatory-contracts-using-gemma-4-9n6</link>
      <guid>https://dev.to/dj29/fineprint-an-ai-pocket-lawyer-that-decodes-predatory-contracts-using-gemma-4-9n6</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;## What We Built&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Last placement season, a friend came to me with a job offer letter. He was excited — first real offer. I read clause 3. It said if he quit before 3 years, he owed the company ₹2,00,000. He had no idea it was there. He nearly signed it. He would have been locked in for 3 years with no way out. He's a developer. That's his entire early career.&lt;/p&gt;

&lt;p&gt;He's not alone. Every year, thousands of students sign employment bonds, internship agreements, and rental leases without understanding what they're agreeing to. The language is deliberately dense. The penalties are buried in clause 4, clause 7, clause 11. And most people — especially fresh graduates — don't have a lawyer to call.&lt;/p&gt;

&lt;p&gt;That's why we built FinePrint.&lt;/p&gt;

&lt;p&gt;FinePrint is an open-source AI contract protection tool powered by Gemma 4. Upload a photo, PDF, or paste any contract text. FinePrint reads it, finds every trap, and tells you exactly what's dangerous, what to negotiate, and what to never sign.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you get:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔴 &lt;strong&gt;Risk Score (0–100)&lt;/strong&gt; — objective danger level of the contract&lt;/li&gt;
&lt;li&gt;🟡 &lt;strong&gt;Compatibility Score&lt;/strong&gt; — how well the contract matches your personal goals&lt;/li&gt;
&lt;li&gt;⚖️ &lt;strong&gt;Final Verdict&lt;/strong&gt; — ACCEPT / NEGOTIATE / REJECT with direct reasoning&lt;/li&gt;
&lt;li&gt;Plain English explanation of every red flag&lt;/li&gt;
&lt;li&gt;A safer suggested rewrite for every dangerous clause&lt;/li&gt;
&lt;li&gt;Actionable negotiation tips per clause&lt;/li&gt;
&lt;li&gt;A ready-to-send personalized negotiation email&lt;/li&gt;
&lt;li&gt;Shareable report link + downloadable PDF&lt;/li&gt;
&lt;li&gt;Contract comparison — upload v1 and v2, see what changed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't a document reader. It's a contract protection engine. Reading a document tells you what it says. FinePrint tells you what it means for your specific situation, what the company is trying to take from you, and exactly what to say back.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphcb4u11iu8diank9tpe.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fphcb4u11iu8diank9tpe.jpeg" alt="The FinePrint homepage — upload a contract or try a built-in example" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;## Demo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🔗 Live: &lt;a href="https://tarkashlabs-fineprint.vercel.app" rel="noopener noreferrer"&gt;https://tarkashlabs-fineprint.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Want to try it yourself? Go to the live app and click "Campus Bond" under Try an example. Fill in your requirements and hit Analyze.&lt;/p&gt;

&lt;p&gt;Here's what FinePrint returned on a real predatory internship contract:&lt;br&gt;
🔴 Risk Score:        98 / 100  — Dangerous&lt;br&gt;
🔴 Compatibility:     20 / 100  — Low Match&lt;br&gt;&lt;br&gt;
❌ Verdict:           REJECT&lt;/p&gt;

&lt;p&gt;"The contract violates every user requirement — unpaid position, &lt;br&gt;
IP ownership of personal projects, ₹1,00,00,000 bond penalty, &lt;br&gt;
mandatory overtime, and an 18-month non-compete."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdntjayp99qmhw7o20edw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdntjayp99qmhw7o20edw.jpeg" alt="The FinePrint homepage — upload a contract or try a built-in example" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcforgwcxag9tckr5c5at.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcforgwcxag9tckr5c5at.jpeg" alt="Every red flag comes with a plain English explanation, negotiation tip, and a safer clause rewrite with space for asking a follow-up question" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngdewubiq1czp8tfyxqg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngdewubiq1czp8tfyxqg.jpeg" alt="Gemma 4 Dense 31B drafts a personalized negotiation email — ready to send to HR" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FinePrint also has a &lt;strong&gt;Compare Mode&lt;/strong&gt; — upload the original and revised contract, and Gemma 4 tells you exactly what improved, what's still dangerous, and what's new.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bjqkc41xu42rxaeiay2.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7bjqkc41xu42rxaeiay2.jpeg" alt="FinePrint Compare Mode — upload two versions of a contract and see exactly what changed, what was resolved, and what red flags remain" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flkcqqsod208v229wmkvv.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flkcqqsod208v229wmkvv.jpeg" alt="FinePrint Compare Mode — Expanded clause comparison analysis" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;## Code&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;🐙 GitHub: &lt;a href="https://github.com/Tarkash-Labs/FinePrint" rel="noopener noreferrer"&gt;https://github.com/Tarkash-Labs/FinePrint&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Frontend:  React + Vite + Tailwind CSS
Backend:   Python + FastAPI + async SSE streaming  
AI:        Gemma 4 via Google AI Studio
Deploy:    Vercel + Render
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The backend is ~650 lines of async Python. Results stream clause by clause as Gemma 4 processes them — red flags appear in real time, not after a long wait. All report state is preserved in a stateless shareable URL using gzip compression — no database, no server-side storage.&lt;br&gt;
Here's the core of what makes FinePrint work — the prompt that sends both the contract AND the user's personal goals to Gemma 4 simultaneously:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_build_analysis_prompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;contract_label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;focus_areas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;requirements&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="n"&gt;requirements_text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requirements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;None provided.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
You are a ruthless, detail-oriented legal expert specializing in &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;contract_label&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; contracts. Your job is to protect the user.
Analyze this contract and return a JSON with exactly these fields:
{{
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;risk_score&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &amp;lt;integer 0-100&amp;gt;,
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;compatibility_score&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &amp;lt;integer 0-100&amp;gt;,
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;verdict&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ACCEPT&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; | &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;NEGOTIATE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; | &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;REJECT&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;verdict_reason&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;1-2 sentence explanation referencing requirements and clauses&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;requirement_breakdown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: [
    {{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;requirement&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;specific user requirement&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;met&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: true/false, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;explanation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;why it was or wasn&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;t met&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;}}
  ],
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;red_flags&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: [
    {{
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;clause_title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, 
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;clause_text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;EXACT text from the contract&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, 
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;plain_english_explanation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;Briefly state the risk&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, 
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;negotiation_tip&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;Actionable advice on what the user should ask to change&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;suggested_rewrite&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;Provide a safer, alternative 1-2 sentence rewrite for this clause that the user can propose&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;,
      &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;severity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;high|medium|low&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;
    }}
  ],
  &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;safe_clauses&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: [{{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;clause_title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;plain_english_explanation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;}}]
}}

CRITICAL RULES:
1. Return ONLY valid JSON. No preamble. No markdown blocks.
2. DETECT ALL RED FLAGS. Do not summarize them into one. If there are 5 bad clauses, list 5 red flags.
3. You MUST extract the exact original text for &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;clause_text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;. 
4. The &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;risk_score&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; is objective based on standard legal risks. Focus heavily on: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;focus_areas&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.
5. The &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;compatibility_score&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; MUST directly reflect the User Requirements below. If a requirement is completely violated, score drops.

User Requirements to evaluate against:
&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;requirements_text&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;

Verdict guidance:
- ACCEPT when risk &amp;lt;= 30 and compatibility &amp;gt;= 70.
- REJECT when risk &amp;gt;= 61 or compatibility &amp;lt;= 30.
- Otherwise NEGOTIATE.
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This single prompt is why FinePrint's output is personalized and not generic. Gemma 4 reads the contract and the user's life goals at the same time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;## How We Used Gemma 4&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The model routing was a deliberate decision made after real testing — not a default choice.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxkwuzh3p3pqufeg1tmbu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxkwuzh3p3pqufeg1tmbu.png" alt="The Architecture" width="781" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — Gemma 4 MoE → Multimodal OCR&lt;/strong&gt;&lt;br&gt;
When a user uploads a photo or PDF, the MoE model reads the document image directly and extracts the raw text. A user can photograph a physical contract — an actual printed piece of paper — with their phone and upload it. Gemma 4's native multimodal vision handles the rest. No manual copy-paste. No fragile third-party OCR library.&lt;/p&gt;

&lt;p&gt;This step doesn't need legal reasoning. It needs fast, accurate image reading. The MoE architecture is the right fit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Gemma 4 Dense 31B → Everything that requires thinking&lt;/strong&gt;&lt;br&gt;
All legal reasoning runs on the Dense 31B — clause classification, risk scoring, compatibility analysis, plain English explanations, suggested rewrites, negotiation tips, and the personalized negotiation email.&lt;/p&gt;

&lt;p&gt;We explicitly tested the MoE for legal analysis. On a contract with 5 critical violations, it returned 1 generic red flag. The Dense 31B returned all 5 — with exact clause text, severity ratings, negotiation tips, and suggested rewrites.&lt;/p&gt;

&lt;p&gt;Legal reasoning needs the most capable model. We use it where it matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The compatibility score — what makes FinePrint different from every other document AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before analyzing, FinePrint asks for the user's personal requirements — how long they plan to stay, whether they need side projects, minimum compensation, relocation preferences. This goes into the Dense 31B prompt alongside the contract text.&lt;/p&gt;

&lt;p&gt;The model reads both simultaneously and judges alignment. The same IP assignment clause scores very differently for someone planning to leave in 6 months versus someone planning a 5-year career. A rule-based system can't do this. Gemma 4 can.&lt;/p&gt;

&lt;p&gt;The output isn't "this clause is risky." It's "this clause is risky &lt;strong&gt;for you specifically.&lt;/strong&gt;"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem FinePrint is actually solving&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The legal literacy gap is structural. People with money have lawyers. Everyone else signs whatever they're handed.&lt;/p&gt;

&lt;p&gt;Harvey AI proved that LLMs can transform legal analysis — they're valued at $715M serving elite law firms. FinePrint takes that same capability and makes it free for the people those firms will never serve.&lt;/p&gt;

&lt;p&gt;Campus placement bonds in India affect hundreds of thousands of students every year. Most of them have never read a legal document before. Many sign bonds they legally cannot afford to break — and only find out years later when they try to leave a job they hate.&lt;/p&gt;

&lt;p&gt;FinePrint is the first line of defense for people who don't have a lawyer on speed dial. It doesn't replace legal advice — there's a disclaimer at the bottom of every analysis for that reason — but it gives people the awareness they need to ask the right questions before they sign anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's Next&lt;/strong&gt;&lt;br&gt;
FinePrint today protects students and junior developers from predatory contracts. The same Gemma 4 architecture scales to rental leases, freelance NDAs, and VC term sheets — we already support all seven contract types. Long term: a browser extension that flags red flags on any document you open, and an API that other apps can integrate. The legal literacy gap is massive. We're just getting started.&lt;/p&gt;

&lt;p&gt;Built by Tarkash Labs&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/dj29"&gt;@dj29&lt;/a&gt; &amp;amp; &lt;a class="mentioned-user" href="https://dev.to/yug_vasava"&gt;@yug_vasava&lt;/a&gt; &lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
