<?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: yashmitb</title>
    <description>The latest articles on DEV Community by yashmitb (@yashmitb).</description>
    <link>https://dev.to/yashmitb</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%2F3982157%2Fffa33ce6-53ee-445c-aa61-9995a65cb388.jpeg</url>
      <title>DEV Community: yashmitb</title>
      <link>https://dev.to/yashmitb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yashmitb"/>
    <language>en</language>
    <item>
      <title>I built a "what do I need on my final" calculator with AI auto-fill (Next.js 16 + Gemini)</title>
      <dc:creator>yashmitb</dc:creator>
      <pubDate>Sat, 13 Jun 2026 04:35:14 +0000</pubDate>
      <link>https://dev.to/yashmitb/i-built-a-what-do-i-need-on-my-final-calculator-with-ai-auto-fill-nextjs-16-gemini-899</link>
      <guid>https://dev.to/yashmitb/i-built-a-what-do-i-need-on-my-final-calculator-with-ai-auto-fill-nextjs-16-gemini-899</guid>
      <description>&lt;p&gt;Every finals season I'd end up doing the same algebra on a notes app: "I have a 91% in homework (20%), 84% on the midterm (30%)... what do I need on the final (50%) to get an A-?" So I built GradeHQ to do it for me — and then kept adding to it until it became a real side project.&lt;/p&gt;

&lt;p&gt;Live: gradehq.vercel.app&lt;br&gt;
Code: github.com/yashmitb/gradecalc (MIT)&lt;/p&gt;

&lt;p&gt;What it does&lt;br&gt;
Add your courses with weighted categories (homework, midterms, final, etc.)&lt;br&gt;
Enter scores as you get them back&lt;br&gt;
Pick a target letter grade and it solves for exactly what you need on whatever's left&lt;br&gt;
Optional AI auto-fill: drop in a syllabus PDF and/or a screenshot (or PDF) of your Canvas grades, and it extracts your categories, weights, and scores for you&lt;br&gt;
Everything is local-first — courses are stored in localStorage, nothing's saved server-side except the file you choose to auto-fill, which is sent once to Gemini and discarded.&lt;/p&gt;

&lt;p&gt;Stack&lt;br&gt;
Next.js 16 (App Router, Turbopack)&lt;br&gt;
TypeScript&lt;br&gt;
Tailwind v4&lt;br&gt;
Framer Motion for the animations/transitions&lt;br&gt;
Gemini 2.5 Flash for the auto-fill parsing&lt;br&gt;
No backend database — just one API route (/api/parse) that proxies to Gemini&lt;br&gt;
The auto-fill flow&lt;br&gt;
This was the fun part. The /api/parse route takes the uploaded files (PDF/PNG/JPG, up to 4), sends them to Gemini with a prompt asking it to extract { name, categories: [{ name, weight, score }], flags: [] }.&lt;/p&gt;

&lt;p&gt;A few things I had to handle:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Uncertain extractions shouldn't be silently guessed. If Gemini can't confidently read a score or weight, it returns a flags array explaining what it left blank and why. The UI shows these to the user before importing, so they can fill them in themselves instead of getting a wrong number with no explanation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shared vs. personal API keys. The app ships with an optional shared/free Gemini key (server-side env var) so most users don't need to do any setup. If that key hits its daily quota, the API returns a server-busy code and the UI lets the user paste their own free key inline to retry — saved only in their browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Making a 10-20 second wait feel okay. Gemini calls on multi-page PDFs can take a while. Instead of a static "Loading...", the extract button cycles through short status messages ("Reading files…", "Scanning syllabus…", "Matching scores…", etc.) every ~1.3s, tailored to whether you uploaded a PDF, an image, or both. "Almost done…" only shows up after the cycle has looped through twice — so it doesn't lie to you on a request that just started.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What's next&lt;br&gt;
More grading scale presets (currently a standard A+ through F scale)&lt;br&gt;
Better handling of edge cases in syllabus formats&lt;br&gt;
Probably a dark/light theme toggle since right now it's dark-only&lt;br&gt;
Repo's open source and PRs are welcome — especially around the parsing prompt, since LMS export formats vary a ton between schools. Feedback appreciated!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
