Firebase + Gemini Code Assist: Web Architecture & Implementation Guide A Google Developer Expert for Firebase published a hands-on implementation guide for Firebase AI Logic, a service that lets web and mobile clients call Gemini and Imagen models through the Firebase Web SDK while keeping API credentials off the wire, enforcing Firebase App Check, and centralizing prompt templates server-side. The guide pairs the SDK with Firebase Remote Config feature flags and project spend caps so teams can swap prompts or models without redeploying a Next.js or Astro frontend, and notes that Gemini Code Assist for individuals ships with 6,000 code completions and 240 chat interactions per day at no cost. Original: https://codingcat.dev/post/firebase-2025-03-gemini-code-assist https://codingcat.dev/post/firebase-2025-03-gemini-code-assist Calling frontier multimodal models directly from a web or mobile client is a security minefield if you expose raw API keys or hardcode brittle system prompts in your frontend bundle. Following the announcement of Firebase + Gemini Code Assist by Nathan Yim on the Official Firebase Blog https://firebase.blog/posts/2025/03/gemini-code-assist/ 2025-02-25 , here is our hands-on CodingCat.dev breakdown of what actually shipped, how it works under the hood, and how we wire it into production TypeScript, Next.js, Astro, SvelteKit, React, and Angular applications. The Firebase team announced the availability of Gemini Code Assist for individuals at no cost and with high usage limits to support most daily use. Now in addition to no-cost AI assistance provided by Gemini in Firebase, you can get AI assistance in your IDE to build Firebase applications with higher velocity and quality - with 6,000 code completions and 240 chat interactions daily. As a Google Developer Expert GDE for Firebase and Senior Solutions Engineer at CodingCat.dev, I evaluate every Firebase update through one lens: does it reduce boilerplate while keeping our runtime security and cloud bills predictable? Firebase AI Logic lets you invoke Gemini and Imagen models from client and edge apps using the Firebase Web SDK while keeping your API credentials off the wire, enforcing Firebase App Check, and managing server-side prompt templates centrally. AJ Pro-Tip from Alex: Combine Firebase AI Logic with server prompt templates, Firebase Remote Config feature flags, and project spend caps so you can iterate on prompts or swap Gemini models instantly without redeploying your Next.js or Astro frontend. Last year, we introduced https://firebase.blog/posts/2024/05/gemini-in-firebase/ Gemini in Firebase to provide targeted assistance for Firebase developers in the Firebase console. Built on Gemini for Google Cloud https://cloud.google.com/products/gemini and using a customized version of the Gemini model, Gemini in Firebase helps you: However, we know you’re not always working in the console. For your work in the IDE, Gemini Code Assist completes your code as you write, generates code blocks and functions on demand, and gives you chat assistance using Gemini 2.0, optimized for coding use cases and context from your local codebase to offer relevant answers. Gemini Code Assist is available in many popular IDEs, such as Visual Studio Code, JetBrains IDEs IntelliJ, PyCharm, GoLand, WebStorm, and more , Cloud Workstations, and Cloud Shell Editor. It also supports many programming languages, including Java, Kotlin, Swift, JavaScript, Dart, C++, C , Python, Go, and more. Code creation is one step to getting code to production, and the next step is usually code reviews With Gemini Code Assist for GitHub, which is now a GitHub app, you can get code reviews on pull requests for bugs and stylistic errors. Paired with AI assistance in Firebase, you get a continuous, AI-powered loop of productivity, reducing context switching and streamlining the entire Firebase development lifecycle, all at no cost. Here is the production baseline pattern we use at CodingCat.dev when wiring Firebase + Gemini Code Assist into a modern TypeScript web application: js import { initializeApp } from "firebase/app"; import { getAI, getGenerativeModel, GoogleAIBackend } from "firebase/ai"; import { initializeAppCheck, ReCaptchaEnterpriseProvider } from "firebase/app-check"; const app = initializeApp { apiKey: process.env.NEXT PUBLIC FIREBASE API KEY, projectId: process.env.NEXT PUBLIC FIREBASE PROJECT ID, } ; // Protect AI endpoints in web apps with Firebase App Check if typeof window == "undefined" { initializeAppCheck app, { provider: new ReCaptchaEnterpriseProvider process.env.NEXT PUBLIC RECAPTCHA SITE KEY , isTokenAutoRefreshEnabled: true, } ; } const ai = getAI app, { backend: new GoogleAIBackend } ; export const geminiModel = getGenerativeModel ai, { model: "gemini-2.5-flash" } ; Whether we are deploying on Firebase App Hosting https://firebase.google.com/docs/app-hosting , Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers: Accelerate your full-stack web and AI development by pairing Firebase + Gemini Code Assist with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on X @CodingCatDev https://x.com/CodingCatDev and LinkedIn CodingCat.dev https://www.linkedin.com/company/codingcatdev how you are using Firebase in your stack, and subscribe to the CodingCat.dev YouTube Channel https://www.youtube.com/@CodingCatDev?sub confirmation=1 so you don't miss what we build next Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session Firebase SQL with Data Connect https://youtu.be/N25khadfUag below, and make sure to Subscribe to CodingCat.dev on YouTube https://www.youtube.com/@CodingCatDev?sub confirmation=1 for weekly full-stack web and AI deep dives: Firebase + Gemini Code Assist announced 2025-02-25 by the Firebase team enhances the platform for Firebase, Google Cloud, Web Dev, AI, TypeScript workloads. The Firebase team announced the availability of Gemini Code Assist for individuals at no cost and with high usage limits to support most daily use. Now in addition to no-cost AI assistance provided by Gemini in Firebase, you can get AI assistance in your IDE to build Firebase applications with higher velocity and quality - with 6,000 code completions and 240 chat interactions daily. Developers can review the primary announcement on the Firebase Blog https://firebase.blog/posts/2025/03/gemini-code-assist/ alongside our implementation patterns and production checklist above. Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and Firebase App Hosting https://firebase.google.com/docs/app-hosting . Always pair client-side SDK initialization with Firebase App Check and strict Security Rules, and test locally with the Firebase Local Emulator Suite before deploying. You can watch our hands-on Firebase video walkthroughs on the CodingCat.dev YouTube Channel https://www.youtube.com/@CodingCatDev?sub confirmation=1 , including Firebase SQL with Data Connect https://youtu.be/N25khadfUag , and follow us on X @CodingCatDev https://x.com/CodingCatDev for weekly full-stack tutorials.