<?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: Michael Abaniwo</title>
    <description>The latest articles on DEV Community by Michael Abaniwo (@mikeabaniwo).</description>
    <link>https://dev.to/mikeabaniwo</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F745040%2Fbcc2b9f6-8bfd-41c5-bb3f-8565253248ce.jpeg</url>
      <title>DEV Community: Michael Abaniwo</title>
      <link>https://dev.to/mikeabaniwo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mikeabaniwo"/>
    <language>en</language>
    <item>
      <title>Your smart AI Teaching companion</title>
      <dc:creator>Michael Abaniwo</dc:creator>
      <pubDate>Wed, 15 Jul 2026 10:31:00 +0000</pubDate>
      <link>https://dev.to/mikeabaniwo/your-smart-ai-teaching-companion-43g6</link>
      <guid>https://dev.to/mikeabaniwo/your-smart-ai-teaching-companion-43g6</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/mikeabaniwo/quizzo-the-smart-teaching-assistant-1e61" class="crayons-story__hidden-navigation-link"&gt;Quizzo - The Smart Teaching Assistant&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/mikeabaniwo" class="crayons-avatar  crayons-avatar--l  "&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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F745040%2Fbcc2b9f6-8bfd-41c5-bb3f-8565253248ce.jpeg" alt="mikeabaniwo profile" class="crayons-avatar__image" width="427" height="553"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/mikeabaniwo" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Michael Abaniwo
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Michael Abaniwo
                
              
              &lt;div id="story-author-preview-content-4149490" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/mikeabaniwo" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F745040%2Fbcc2b9f6-8bfd-41c5-bb3f-8565253248ce.jpeg" class="crayons-avatar__image" alt="" width="427" height="553"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Michael Abaniwo&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/mikeabaniwo/quizzo-the-smart-teaching-assistant-1e61" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 15&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/mikeabaniwo/quizzo-the-smart-teaching-assistant-1e61" id="article-link-4149490"&gt;
          Quizzo - The Smart Teaching Assistant
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/tutorial"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;tutorial&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/mikeabaniwo/quizzo-the-smart-teaching-assistant-1e61" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt;&amp;nbsp;reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/mikeabaniwo/quizzo-the-smart-teaching-assistant-1e61#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            5 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success crayons-icon c-btn__icon"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>education</category>
      <category>learning</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Quizzo - The Smart Teaching Assistant</title>
      <dc:creator>Michael Abaniwo</dc:creator>
      <pubDate>Wed, 15 Jul 2026 10:28:45 +0000</pubDate>
      <link>https://dev.to/mikeabaniwo/quizzo-the-smart-teaching-assistant-1e61</link>
      <guid>https://dev.to/mikeabaniwo/quizzo-the-smart-teaching-assistant-1e61</guid>
      <description>&lt;p&gt;&lt;a href="https://quizzo-teacher-assistant.netlify.app/" rel="noopener noreferrer"&gt;Quizzo Deployed link&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Comprehensive Build Guide &amp;amp; Interview Prep
&lt;/h2&gt;

&lt;p&gt;This document serves as a complete walkthrough of how the Quizzo Teacher Assistant application was built. It is designed to help you understand the architecture, explain your technical decisions during an interview, and confidently discuss how all the pieces fit together.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. High-Level Architecture Overview
&lt;/h2&gt;

&lt;p&gt;Quizzo is a &lt;strong&gt;Full-Stack AI Application&lt;/strong&gt; separated into two distinct repositories (or folders):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Frontend (Client):&lt;/strong&gt; Built with Next.js (React) and TypeScript. It handles the user interface, authentication state, and the chat window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend (Server):&lt;/strong&gt; Built with Node.js, Express, and TypeScript. It handles user authentication, session management, and securely communicates with the Google Gemini AI.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Why did we separate the frontend and backend?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; We must never expose our &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; to the browser. By keeping an Express backend, the frontend simply asks the backend for a chat response, and the backend securely talks to Google.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; The backend can handle complex AI logic, database connections, and long-running tasks without slowing down the user's browser.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Step-by-Step Implementation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Phase 1: The Backend Foundation (Node &amp;amp; Express)
&lt;/h3&gt;

&lt;p&gt;We started by creating a REST API using Express and TypeScript.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;In-Memory Store:&lt;/strong&gt; To keep things lightweight for the initial build, we used an in-memory array (&lt;code&gt;memoryStore.ts&lt;/code&gt;) to store Users and Chat Sessions. &lt;em&gt;(Interview Tip: Mention that in a real production app, this would be replaced by a database like PostgreSQL or MongoDB).&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication:&lt;/strong&gt; 

&lt;ul&gt;
&lt;li&gt;We built &lt;code&gt;/api/auth/register&lt;/code&gt; and &lt;code&gt;/api/auth/login&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;We used &lt;code&gt;bcrypt&lt;/code&gt; to securely hash user passwords before saving them.&lt;/li&gt;
&lt;li&gt;We used &lt;code&gt;jsonwebtoken&lt;/code&gt; (JWT) to generate a secure token when a user logs in.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth Middleware:&lt;/strong&gt; We created &lt;code&gt;auth.middleware.ts&lt;/code&gt; to protect our chat routes. This intercepts requests, checks if the user has a valid JWT in their &lt;code&gt;Authorization&lt;/code&gt; header, and rejects unauthorized access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 2: Integrating Google Gemini AI
&lt;/h3&gt;

&lt;p&gt;This is the "brain" of the application. We used the &lt;code&gt;@google/generative-ai&lt;/code&gt; SDK.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Configuration (&lt;code&gt;gemini.ts&lt;/code&gt;):&lt;/strong&gt; We initialized the AI client using our secret &lt;code&gt;GEMINI_API_KEY&lt;/code&gt;. We also implemented a &lt;strong&gt;Fallback Model Strategy&lt;/strong&gt;, meaning if our primary model (&lt;code&gt;gemini-3.5-flash&lt;/code&gt;) goes down or hits a rate limit, the system automatically tries secondary models to ensure the app stays online.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service Layer (&lt;code&gt;gemini.service.ts&lt;/code&gt;):&lt;/strong&gt; We created a &lt;code&gt;handleChat&lt;/code&gt; function that takes the user's message and their past conversation history, sends it to Gemini, and returns the response.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Function Calling / Tools:&lt;/strong&gt; This is the most advanced part of the AI integration. We didn't just build a chatbot; we gave the AI "Tools" it can execute.

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;generate_quiz&lt;/code&gt;: The AI can output a structured quiz based on a topic.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;grade_response&lt;/code&gt;: The AI can compare a student's answer against a rubric and grade it.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;summarize_performance&lt;/code&gt;: The AI can aggregate grades and provide a class summary.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;How it works:&lt;/em&gt; The AI detects when a user asks for a quiz. Instead of just replying with text, it tells our backend "Execute the &lt;code&gt;generate_quiz&lt;/code&gt; tool". Our backend runs the tool, hands the data back to the AI, and the AI presents it to the user.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 3: The Frontend Experience (Next.js)
&lt;/h3&gt;

&lt;p&gt;We built the user interface using Next.js.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AuthContext:&lt;/strong&gt; We used React's Context API to manage global state. When a user logs in, &lt;code&gt;AuthContext&lt;/code&gt; saves their JWT token to &lt;code&gt;localStorage&lt;/code&gt; so they stay logged in even if they refresh the page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Service (&lt;code&gt;api.ts&lt;/code&gt;):&lt;/strong&gt; We centralized all our backend &lt;code&gt;fetch&lt;/code&gt; requests here. It dynamically reads &lt;code&gt;process.env.NEXT_PUBLIC_API_URL&lt;/code&gt; so it knows whether to talk to &lt;code&gt;localhost&lt;/code&gt; or the live deployed backend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The UI:&lt;/strong&gt; We built a clean Login and Register page, highlighting our tagline: &lt;em&gt;"The Smart Teaching Assistant"&lt;/em&gt;. We then built a dynamic chat interface that updates instantly when the user sends a message, handling loading states while waiting for the AI to respond.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 4: Testing &amp;amp; Quality Assurance
&lt;/h3&gt;

&lt;p&gt;Writing tests proves to interviewers that you care about code quality.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Jest &amp;amp; SWC:&lt;/strong&gt; We set up a test suite using &lt;code&gt;Jest&lt;/code&gt;. We specifically opted for &lt;code&gt;@swc/jest&lt;/code&gt; because the default &lt;code&gt;ts-jest&lt;/code&gt; runner had compatibility issues with our modern version of TypeScript. SWC is written in Rust and compiles tests incredibly fast.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unit Tests:&lt;/strong&gt; We wrote tests for &lt;code&gt;auth.middleware.ts&lt;/code&gt; to ensure it correctly blocks bad tokens and allows good ones. We also tested our AI tool definitions (like &lt;code&gt;grade_response.test.ts&lt;/code&gt;) to ensure they return the expected schemas.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phase 5: Deployment
&lt;/h3&gt;

&lt;p&gt;We deployed the app using two different specialized platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Netlify (Frontend):&lt;/strong&gt; Next.js works flawlessly on Netlify. We provided Netlify with our &lt;code&gt;NEXT_PUBLIC_API_URL&lt;/code&gt; environment variable so it knows how to find our server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render (Backend):&lt;/strong&gt; We deployed the Express server to Render because it is designed for long-running Node.js processes. We added our &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; and &lt;code&gt;JWT_SECRET&lt;/code&gt; securely to Render's environment dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CORS Fix:&lt;/strong&gt; We encountered a CORS error where the backend blocked the frontend. We fixed this in &lt;code&gt;server.ts&lt;/code&gt; by explicitly allowing requests from our Netlify URL.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Common Interview Questions &amp;amp; How to Answer Them
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Q: Why did you use Next.js instead of just standard React?&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Next.js provides an excellent developer experience out of the box. It gives us an intuitive file-based routing system, built-in optimization for fonts and images, and a clear path if we ever wanted to move some of our Express backend logic into Next.js Server Actions or API routes in the future."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Q: How did you secure the application?&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Security was a priority at multiple layers. First, passwords are never stored in plaintext; we salt and hash them using bcrypt. Second, we use stateless JWT authentication, passing tokens via headers. Finally, our Gemini API key is strictly kept on the server and is never exposed to the client bundle."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Q: How do the Gemini AI Tools/Functions work in your app?&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"We implemented 'Function Calling'. We defined a schema of tools (like &lt;code&gt;grade_response&lt;/code&gt;) and passed them to the Gemini model. When a teacher asks a specific question, the AI determines which tool to use, pauses its generation, returns a JSON object with arguments to our backend, our backend executes the javascript logic for that tool, and hands the result back to the AI to format a final answer."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Q: What would you do differently if you were to scale this to 100,000 users?&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Currently, we use an in-memory store for users and chat history. To scale, the immediate first step would be implementing a persistent database like PostgreSQL for relational user data, and perhaps Redis for fast session/chat history retrieval. I would also add rate-limiting to the backend to prevent abuse of our Gemini API quota."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Q: What was the hardest bug you faced and how did you solve it?&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"When deploying, we hit an &lt;code&gt;ERESOLVE&lt;/code&gt; npm error on Render because of a strict peer dependency conflict with an older version of &lt;code&gt;ts-jest&lt;/code&gt; and our modern &lt;code&gt;typescript&lt;/code&gt; version. I diagnosed it by reading the build logs, uninstalled the conflicting package since we had already migrated to the much faster &lt;code&gt;@swc/jest&lt;/code&gt; runner, and pushed the clean &lt;code&gt;package.json&lt;/code&gt; to trigger a successful build. We also navigated a CORS block by configuring our Express middleware to specifically whitelist our live Netlify domain."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

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