<?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: LC3045</title>
    <description>The latest articles on DEV Community by LC3045 (@lc3045).</description>
    <link>https://dev.to/lc3045</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%2F3824963%2F1ca90ab6-df87-45b0-9e10-58dce112981c.png</url>
      <title>DEV Community: LC3045</title>
      <link>https://dev.to/lc3045</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lc3045"/>
    <language>en</language>
    <item>
      <title>Building SgStudyPal: Multimodal AI Tutoring with Gemini 2.5 Flash &amp; Google Cloud Run</title>
      <dc:creator>LC3045</dc:creator>
      <pubDate>Sun, 15 Mar 2026 06:41:12 +0000</pubDate>
      <link>https://dev.to/lc3045/building-sgstudypal-multimodal-ai-tutoring-with-gemini-25-flash-google-cloud-run-5872</link>
      <guid>https://dev.to/lc3045/building-sgstudypal-multimodal-ai-tutoring-with-gemini-25-flash-google-cloud-run-5872</guid>
      <description>&lt;p&gt;For the Gemini Live Agent Challenge, I wanted to solve a real-world problem: making homework engaging and accessible for students in Singapore. The result is &lt;strong&gt;SgStudyPal&lt;/strong&gt;, an AI-powered tutoring platform that utilizes both real-time voice and multimodal image recognition to act as a personalized tutor.&lt;/p&gt;

&lt;p&gt;Here is a breakdown of how I built the infrastructure using Google's ecosystem.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Next.js 14 (App Router), Tailwind CSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Node.js, Vercel AI SDK&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Models:&lt;/strong&gt; Google Gemini 2.5 Flash (Multimodal) &amp;amp; Gemini Live (WebSockets)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth &amp;amp; DB:&lt;/strong&gt; Firebase Authentication &amp;amp; Firestore&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure:&lt;/strong&gt; Google Cloud Run (Docker)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Architecture &amp;amp; Google Cloud Integration
&lt;/h3&gt;

&lt;p&gt;To ensure a highly scalable, stateful environment, I opted out of standard serverless edge functions and built a strict &lt;strong&gt;Multi-Stage Docker container&lt;/strong&gt; deployed on &lt;strong&gt;Google Cloud Run&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Homework Help:&lt;/strong&gt; Students can upload a photo of a complex math worksheet. The Next.js backend parses the image into a binary buffer and streams it securely to the &lt;code&gt;gemini-2.5-flash&lt;/code&gt; model. By utilizing strict prompt engineering, the AI bypasses standard chat pleasantries and immediately breaks down the visual math problem step-by-step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-Time Video Tutor (Gwen):&lt;/strong&gt; Using WebSockets, the app connects directly to the Gemini Live API, allowing students to have fluid, interruptible, low-latency audio/video conversations with their AI tutor.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Overcoming Deployment Challenges
&lt;/h3&gt;

&lt;p&gt;Deploying a Turborepo Next.js app to Cloud Run requires careful environment variable management. To ensure Firebase client variables (&lt;code&gt;NEXT_PUBLIC_&lt;/code&gt;) were securely baked into the production bundle while keeping Gemini API keys strictly isolated as runtime secrets, I implemented a 3-stage Docker build process (&lt;code&gt;deps&lt;/code&gt;, &lt;code&gt;builder&lt;/code&gt;, &lt;code&gt;runner&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;By combining the low latency of Google Cloud Run with the incredible multimodal capabilities of Gemini 2.5 Flash, SgStudyPal transforms static worksheets into interactive, real-time learning experiences.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gemini</category>
      <category>googlecloud</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
