<?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: Alex Patterson</title>
    <description>The latest articles on DEV Community by Alex Patterson (@codercatdev).</description>
    <link>https://dev.to/codercatdev</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%2F135713%2F21606883-4fdb-4d16-b182-759b026c42da.jpeg</url>
      <title>DEV Community: Alex Patterson</title>
      <link>https://dev.to/codercatdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codercatdev"/>
    <language>en</language>
    <item>
      <title>Data Connect: All About Schemas in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 15:01:20 +0000</pubDate>
      <link>https://dev.to/codingcatdev/data-connect-all-about-schemas-in-firebase-web-architecture-implementation-guide-dj9</link>
      <guid>https://dev.to/codingcatdev/data-connect-all-about-schemas-in-firebase-web-architecture-implementation-guide-dj9</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-02-dataconnect-schemas" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-02-dataconnect-schemas&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For years, choosing Firebase meant trading away relational SQL joins, strict foreign keys, and pgvector similarity search in favor of NoSQL document denormalization. Following the announcement of &lt;strong&gt;Data Connect: All About Schemas&lt;/strong&gt; by Andrea Wu on the &lt;a href="https://firebase.blog/posts/2025/02/dataconnect-schemas/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-02-11), 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. Note: Firebase Data Connect has been renamed to SQL Connect. Learn more in the SQL Connect announcement.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Data Connect: All About Schemas Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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 Data Connect bridges that gap by pairing a managed Google Cloud SQL for PostgreSQL instance with a declarative GraphQL schema compiler that automatically generates type-safe TypeScript, React, and Angular SDKs alongside server-enforced &lt;a class="mentioned-user" href="https://dev.to/auth"&gt;@auth&lt;/a&gt; directives.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Keep your authorization logic inside your Data Connect GraphQL operations using &lt;a class="mentioned-user" href="https://dev.to/auth"&gt;@auth&lt;/a&gt;(level: USER) and server-evaluated expressions like auth.uid and request.time rather than trusting client-supplied user IDs in query variables.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;Many apps need to store persistent data, and most of the time, that data needs to be organized in a structured way. With Data Connect, you model your app data using schemas, and this blog post dives into what schemas are and how to use them.&lt;/p&gt;

&lt;p&gt;We’ll use the movie review app example you might already know from the &lt;a href="https://firebase.google.com/docs/data-connect/schemas-queries-mutations#movie-schema-intro" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt; and our previous &lt;a href="https://firebase.blog/posts/2024/10/dataconnect-series-announce" rel="noopener noreferrer"&gt;&lt;strong&gt;deep-dive blog posts&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Declaring a Schema
&lt;/h3&gt;

&lt;p&gt;Firebase Data Connect schemas are &lt;a href="https://firebase.blog/posts/2024/10/dataconnect-graphql" rel="noopener noreferrer"&gt;&lt;strong&gt;defined using GraphQL&lt;/strong&gt;&lt;/a&gt;. The key components of GraphQL schema definitions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@table&lt;/code&gt; directive, which includes the optional arguments of naming convention and key(s)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is an example from the &lt;a href="https://firebase.google.com/codelabs/firebase-dataconnect-web#0" rel="noopener noreferrer"&gt;&lt;strong&gt;movie tracker app&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;type&lt;/code&gt; type definition, letting GraphQL know this is declaring a type (other examples of type definitions are &lt;code&gt;query&lt;/code&gt; and &lt;code&gt;mutation&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A directive &lt;code&gt;@table&lt;/code&gt; which signifies creation of a schema&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Within the &lt;code&gt;@table&lt;/code&gt; directive, there are a few optional fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt;: defines the table name; by default, the table name is the schema name&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;singular&lt;/code&gt;: for implicit queries and mutations, this defines the name that gets used in the query / mutation that requires this table&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;plural&lt;/code&gt;: for implicit mutations, this defines the name that gets used in the mutation that requires this table&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;key&lt;/code&gt;: an optional list for the name of the table’s key(s)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By default, the singular naming convention will be the name of the table with a lower case first letter, and the plural one will be the singular with a “s” at the end. You only need to use &lt;code&gt;singular&lt;/code&gt; or &lt;code&gt;plural&lt;/code&gt; to adjust the name if it is different than the default.&lt;/p&gt;

&lt;p&gt;Similarly, the key by default will be named &lt;code&gt;id&lt;/code&gt;, and you do not need to declare this when you declare a schema.&lt;/p&gt;

&lt;p&gt;Removing all of the defaults, the above declaration can be simplified to:&lt;/p&gt;

&lt;h3&gt;
  
  
  Anatomy of a Schema
&lt;/h3&gt;

&lt;p&gt;Now that you know how to declare a schema, how does a schema in its entirety look like? It is broken down into the following parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Declaration to create a schema, as described in the previous section&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is an example schema for movies, written verbosely with all optional fields present except the schema declaration as covered above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt;
  &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UUID&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;movie_id&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uuidV4()&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;releaseYear&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Int&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;release_year&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;index&lt;/span&gt;
  &lt;span class="nx"&gt;genre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;genre&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dataType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;varchar(30)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;rating&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Int&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rating&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line is the name of a column along with the data type of that column. Any data type followed by&lt;code&gt;!&lt;/code&gt; means this attribute is required. Data Connect supports a wide range of &lt;a href="https://firebase.google.com/docs/data-connect/schemas-queries-mutations#supported_data_types" rel="noopener noreferrer"&gt;&lt;strong&gt;data types&lt;/strong&gt;&lt;/a&gt;, some of which are in this code snippet like &lt;code&gt;UUID&lt;/code&gt;, &lt;code&gt;String&lt;/code&gt;, and &lt;code&gt;Int&lt;/code&gt;. UUID is a special data type that indicates that this is a unique ID, which is useful for keys.&lt;/p&gt;

&lt;p&gt;You will also see &lt;code&gt;@col&lt;/code&gt;, &lt;code&gt;@default&lt;/code&gt;, and &lt;code&gt;@index&lt;/code&gt; directives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@col&lt;/code&gt; explicitly sets column information, including names and data type. The &lt;code&gt;genre&lt;/code&gt; column is named “genre” with the String data type of at most 30 characters. By default, the first word of each line becomes the column name, so you only need &lt;code&gt;@col(name: “...”&lt;/code&gt; if you want a different name.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@default&lt;/code&gt; lets you set default values. In the example above, an &lt;code&gt;id&lt;/code&gt; defaults to a UUID generated by &lt;code&gt;uuidV4()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@index&lt;/code&gt; defines a database index to optimize query performance. To create a single field SQL index, put &lt;code&gt;@index&lt;/code&gt; on a &lt;code&gt;@col&lt;/code&gt; field. You can specify &lt;code&gt;order&lt;/code&gt;, but this doesn’t matter much for single field indexes as they can be scanned in both directions. To define a composite index, You can put &lt;code&gt;@index(fields: [...])&lt;/code&gt; on &lt;code&gt;@table&lt;/code&gt; and define an order for each indexed column, defaulted to ASC. Above, &lt;code&gt;releaseYear&lt;/code&gt; would be ordered in ascending order whereas &lt;code&gt;rating&lt;/code&gt; would be ordered in descending order.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Removing all of the defaults, the above can be simplified to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt;
  &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UUID&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uuidV4()&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
  &lt;span class="nx"&gt;releaseYear&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Int&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;index&lt;/span&gt;
  &lt;span class="nx"&gt;genre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dataType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;varchar(30)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;rating&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Int&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Scalars
&lt;/h3&gt;

&lt;p&gt;For databases optimized for speed, key scalars are an efficient way to identify objects. Data Connect automatically assembles these identifiers from key fields in your schemas, and the resulting scalars provide information about data identity and structure, accessible within a single cell. Key use cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sequential operations: key scalars serve as unique identifiers for new records, simplifying subsequent operations&lt;/li&gt;
&lt;li&gt;relational operations: key scalars provide access to relational keys, enabling more complex data manipulations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Server Values
&lt;/h3&gt;

&lt;p&gt;Sometimes, your app might need server-computed values because the values need to be computed at the time of data creation. You can do this by using server values, where the server dynamically populates fields in your tables using stored or readily-computable values according to particular server-side expressions. For example, you can define a field with a timestamp applied when the field is accessed using the expression &lt;code&gt;createdAt: Timestamp! @default(expr: "request.time")&lt;/code&gt;. This might be used when a user creates their account, so the schema could look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt;
  &lt;span class="c1"&gt;// other fields&lt;/span&gt;
  &lt;span class="nx"&gt;createdAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;request.time&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Relationships Between Tables
&lt;/h3&gt;

&lt;p&gt;A big part of using relational databases is (surprise!): relationships between tables, and Data Connect lets you do that. &lt;a href="https://firebase.blog/posts/2025/01/dataconnect-relationships" rel="noopener noreferrer"&gt;&lt;strong&gt;Here&lt;/strong&gt;&lt;/a&gt; is an in-depth blog post on how to define one-to-one, one-to-many, and many-to-many relationships in your schemas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping SQL features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Data Connect: All About Schemas&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N25khadfUag" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/02/dataconnect-schemas/" rel="noopener noreferrer"&gt;Data Connect: All About Schemas on the Official Firebase Blog&lt;/a&gt; (published 2025-02-11 by Andrea Wu)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-01-dataconnect-relationships" rel="noopener noreferrer"&gt;How Relationships Work in Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-02-announcing-genkit" rel="noopener noreferrer"&gt;Announcing Firebase Genkit 1.0 for Node.js&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Data Connect: All About Schemas?
&lt;/h3&gt;

&lt;p&gt;Data Connect: All About Schemas (announced 2025-02-11 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, SQL workloads. Note: Firebase Data Connect has been renamed to SQL Connect. Learn more in the SQL Connect announcement. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/02/dataconnect-schemas/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Data Connect: All About Schemas with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Firebase A/B Testing is now available for the web: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:52:55 +0000</pubDate>
      <link>https://dev.to/codingcatdev/firebase-ab-testing-is-now-available-for-the-web-web-architecture-implementation-guide-hop</link>
      <guid>https://dev.to/codingcatdev/firebase-ab-testing-is-now-available-for-the-web-web-architecture-implementation-guide-hop</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2026-03-ab-testing-for-web" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2026-03-ab-testing-for-web&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have ever watched an AI coding agent hallucinate deprecated Firebase v8 syntax or deploy wide-open Firestore rules, you know that raw LLM prompts are not enough for production backends. Following the announcement of &lt;strong&gt;Firebase A/B Testing is now available for the web&lt;/strong&gt; by Sumit Chandel, Athira Manu on the &lt;a href="https://firebase.blog/posts/2026/03/ab-testing-for-web/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2026-03-04), 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. In this update, the Firebase team announced that Firebase A/B Testing is now available for the web!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Firebase A/B Testing is now available for the web Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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? Instead of relying on stale training weights, wiring up the Model Context Protocol (MCP) and structured Firebase agent skills gives your IDE or CLI direct, schema-aware tools to provision resources, inspect security rules, and run deterministic CLI deployments.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Never let an autonomous coding agent push Firestore or Data Connect rules straight to production without a gate. Always require the agent to run your test suite against the Firebase Local Emulator Suite first, and audit every generated rule for strict request.auth.uid ownership checks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;Firebase has long offered a simple way to run A/B tests for mobile apps, and now, powered by &lt;a href="https://g.dev/firebase/analytics-for-firebase" rel="noopener noreferrer"&gt;&lt;strong&gt;Google Analytics&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://g.dev/firebase/remote-config-web" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Remote Config&lt;/strong&gt;&lt;/a&gt;, Firebase is bringing that same functionality to the web. This means that all of the benefits of A/B Testing, like easily being able to run, analyze and scale product and marketing experiments to optimize your app experiences that &lt;a href="https://g.dev/firebase/ab-testing-case-studies" rel="noopener noreferrer"&gt;&lt;strong&gt;lead to massive growth in user retention and app revenue for mobile apps&lt;/strong&gt;&lt;/a&gt;, are now available for your web apps too.&lt;/p&gt;

&lt;p&gt;If you’ve ever wondered which version of your web content, feature, or design will best resonate with your users, or how to optimize app retention based on your app onboarding flow or in-app engagements, running an A/B test is the way to go.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use Firebase A/B Testing?
&lt;/h3&gt;

&lt;p&gt;**Achieve your business goals **Firebase A/B Testing provides direct insight into how app changes affect your most critical business metrics. Out-of-the-box tracking for user retention, revenue, and user engagement, combined with Google Analytics integration lets you see exactly how user actions shift within each experiment.&lt;/p&gt;

&lt;p&gt;**Roll out changes with confidence **Using the frequentist statistical method, Firebase A/B Testing helps you identify the best-performing variation and confirms if the results are statistically significant. This lets you to test, modify, and deploy updates without worrying about the potential repercussions of a new release.&lt;/p&gt;

&lt;p&gt;**Empower your team without eating up engineering time **While A/B testing usually requires significant infrastructure, Firebase makes setup quick and easy. Once configured, anyone in your organization can run and analyze experiments, allowing your team to iterate faster and at a larger scale without constantly relying on engineering resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  A/B Testing for Web use cases
&lt;/h3&gt;

&lt;p&gt;With the above capabilities in mind, Let's break down some of the key use cases for the web where Firebase A/B Testing can help you move beyond guesswork and make data-backed decisions that drive real impact:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Test content variations: **Experiment with content headlines, blog post tones, product descriptions, layouts, and more depending on your app to see what resonates with your users most.&lt;/li&gt;
&lt;li&gt;**Optimize user flows: **Improve critical user journeys by testing app onboarding and signup processes, checkout flows, navigation paths and more.&lt;/li&gt;
&lt;li&gt;**Improve feature adoption: **Test different feature ideas and discover the most effective way to introduce a new feature to maximize its usage.&lt;/li&gt;
&lt;li&gt;**Drive business goals: **Optimize for key metrics like conversions, revenue, user retention, and engagement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Integrating Firebase A/B Testing into your web apps is easy - let’s walk through a couple of examples to see how it works in action.&lt;/p&gt;

&lt;h3&gt;
  
  
  An Example: Optimizing Blog Subscriptions
&lt;/h3&gt;

&lt;p&gt;Let’s look at an example - say you have a blog post platform and want to optimize the subscriptions your users get for their blogs. To increase reader sign-ups, you offer the choice of two blog post styles for the post teaser and post content - a “technical” style and a “relatable storytelling” tone.&lt;/p&gt;

&lt;p&gt;With Firebase A/B Testing for web, you can set up the experiment as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Baseline (Control): *&lt;/em&gt;&lt;code&gt;blog_tone&lt;/code&gt; is set to &lt;code&gt;"technical"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Variant A: *&lt;/em&gt;&lt;code&gt;blog_tone&lt;/code&gt; is set to &lt;code&gt;"storytelling"&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Integrating A/B Testing into Your Code
&lt;/h3&gt;

&lt;p&gt;Let’s assume you’ve got two versions of your users’ blog posts on your server - one optimized for each tone. Optionally, you could even use an AI model to automatically generate the blog post teaser content for your users based on these tones as well. With that content ready, you can use **Firebase Remote Config **to power the variation logic, showing readers the version that drives better subscription rates.&lt;/p&gt;

&lt;p&gt;Here’s a simplified JavaScript snippet showing how your web app fetches the &lt;code&gt;blog_tone&lt;/code&gt; parameter and matching blog post content from your server. Also, don’t forget to include the Firebase SDK for Google Analytics in your application as well to track the metrics necessary for your A/B test!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Analyzing the Results
&lt;/h3&gt;

&lt;p&gt;After a few days of letting the experiment run, you can check the Firebase console to view the results of the test.&lt;/p&gt;

&lt;p&gt;The A/B Testing report shown in the following screenshot, drawing on Google Analytics data, clearly shows which blog tone led to better user retention.&lt;/p&gt;

&lt;p&gt;This data empowers you to **confidently roll out the winning tone **to all users, directly impacting your users blog post subscription success and revenue.&lt;/p&gt;

&lt;p&gt;While a quick summary is available in the Firebase console, you can also dive deeper using &lt;a href="https://g.dev/firebase/ab-testing-bigquery-export" rel="noopener noreferrer"&gt;&lt;strong&gt;BigQuery&lt;/strong&gt;&lt;/a&gt;. Just remember that only **Google Analytics events triggered by users participating in the A/B test **will include the associated experiment and variant information. This means you can run custom queries against the Analytics event tables to get detailed insights specific to the experiment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Another Example: Test onboarding flows in your web app
&lt;/h3&gt;

&lt;p&gt;Let’s look at another example - this time, let’s say you have a React web application and want to A/B test two (or three) different onboarding flows to see which one leads to the highest user retention in your app.&lt;/p&gt;

&lt;p&gt;One way to do this would be to create a Remote Config custom hook with useState and useEffect to retrieve the A/B test variant parameter values and let that drive the UI changes in your app to test out different onboarding flows or other layouts.&lt;/p&gt;

&lt;p&gt;First, let’s set up the experiment similar to what we did in the previous example for optimizing blog post subscriptions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Baseline (Control): *&lt;/em&gt;&lt;code&gt;onboarding_flow&lt;/code&gt; is set to &lt;code&gt;"standard"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Variant A: *&lt;/em&gt;&lt;code&gt;onboarding_flow&lt;/code&gt; is set to &lt;code&gt;"new_design"&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you can create a useRemoteConfig custom hook that you can use to fetch variant values to drive the flows or layouts in your app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt;
    &lt;span class="c1"&gt;// Initialize with defaultValue so the app renders immediately&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt;

    &lt;span class="nx"&gt;useEffect&lt;/span&gt;
        &lt;span class="c1"&gt;// If Firebase isn't initialized (e.g. server-side), do nothing&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;

        &lt;span class="kd"&gt;const&lt;/span&gt;
            &lt;span class="k"&gt;try&lt;/span&gt;
                &lt;span class="k"&gt;await&lt;/span&gt;
                &lt;span class="kd"&gt;const&lt;/span&gt;
                &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
                &lt;span class="nx"&gt;setValue&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt; 
                &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
                &lt;span class="c1"&gt;// We don't need to setValue here because it's already set to defaultValue&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;

        &lt;span class="nx"&gt;fetchConfig&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;defaultValue&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once created, you can use the new custom hook in the page where you want to test your onboarding flows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt;

&lt;span class="c1"&gt;// 1. Use React.lazy for code splitting&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt;
  &lt;span class="c1"&gt;// Using default "standard" to prevent flash of loading or just testing default&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt;

  &lt;span class="c1"&gt;// onboardingFlow initializes to "standard" immediately.&lt;/span&gt;
  &lt;span class="c1"&gt;// The UI will transparently update if "new_design" is fetched in the hook.&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="c1"&gt;// 2. Wrap lazy components in Suspense&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;onboardingFlow&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;new_design&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ModernOnboarding&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;StandardOnboarding&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;)}&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From there, you can analyze the results similarly to the previous blog post subscription example by letting the experiment run for a few days and visiting the A/B testing results page in the Firebase console to see if there is a measurable difference between your onboarding flow variants.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ready to Get Started?
&lt;/h3&gt;

&lt;p&gt;Firebase A/B Testing for web empowers you to move beyond guesswork and make data-backed decisions that drive real impact. Whether you’re a developer, product manager or a builder this tool is invaluable for optimizing your web presence.&lt;/p&gt;

&lt;p&gt;Ready to get started? Dive into the official documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Firebase A/B Testing Documentation: &lt;a href="https://g.dev/firebase/ab-testing-web-guide" rel="noopener noreferrer"&gt;https://firebase.google.com/docs/ab-testing&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Firebase Remote Config Documentation: &lt;a href="https://g.dev/firebase/remote-config-web" rel="noopener noreferrer"&gt;https://firebase.google.com/docs/remote-config&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Analytics for Web&lt;/strong&gt;: &lt;a href="https://g.dev/firebase/analytics-web-quickstart" rel="noopener noreferrer"&gt;&lt;strong&gt;https://firebase.google.com/docs/analytics/get-started?platform=web&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, try out Firebase A/B Testing for web in the &lt;a href="https://firebase.blog/posts/2025/11/firebase-mcp-and-antigravity" rel="noopener noreferrer"&gt;&lt;strong&gt;Antigravity IDE&lt;/strong&gt;&lt;/a&gt;! Just try asking the Antigravity IDE agent to design an A/B test for a component of your choice in your web app using Firebase A/B Testing and it should provide you with a reasonable implementation plan to get started!&lt;/p&gt;

&lt;p&gt;Give web A/B testing a try and share your feedback. Let’s build better web experiences together! 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Firebase A/B Testing is now available for the web&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/kHrIyTLVerg" rel="noopener noreferrer"&gt;&lt;strong&gt;Building a web application with Next.js and Firebase - Firebase Summit 2021&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/kHrIyTLVerg" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2026/03/ab-testing-for-web/" rel="noopener noreferrer"&gt;Firebase A/B Testing is now available for the web on the Official Firebase Blog&lt;/a&gt; (published 2026-03-04 by Sumit Chandel, Athira Manu)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2026-02-ai-agent-skills-for-firebase" rel="noopener noreferrer"&gt;Better code, fewer tokens: Introducing Agent Skills for Firebase&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2026-03-apphosting-march-update" rel="noopener noreferrer"&gt;App Hosting has in-console environment variables and faster builds&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Firebase A/B Testing is now available for the web?
&lt;/h3&gt;

&lt;p&gt;Firebase A/B Testing is now available for the web (announced 2026-03-04 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, MCP, React, TypeScript workloads. In this update, the Firebase team announced that Firebase A/B Testing is now available for the web! Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2026/03/ab-testing-for-web/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Firebase A/B Testing is now available for the web with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/kHrIyTLVerg" rel="noopener noreferrer"&gt;&lt;strong&gt;Building a web application with Next.js and Firebase - Firebase Summit 2021&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Better code, fewer tokens: Introducing Agent Skills for Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:52:14 +0000</pubDate>
      <link>https://dev.to/codingcatdev/better-code-fewer-tokens-introducing-agent-skills-for-firebase-web-architecture-implementation-5fgh</link>
      <guid>https://dev.to/codingcatdev/better-code-fewer-tokens-introducing-agent-skills-for-firebase-web-architecture-implementation-5fgh</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2026-02-ai-agent-skills-for-firebase" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2026-02-ai-agent-skills-for-firebase&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have ever watched an AI coding agent hallucinate deprecated Firebase v8 syntax or deploy wide-open Firestore rules, you know that raw LLM prompts are not enough for production backends. Following the announcement of &lt;strong&gt;Better code, fewer tokens: Introducing Agent Skills for Firebase&lt;/strong&gt; by Luke Schlangen on the &lt;a href="https://firebase.blog/posts/2026/02/ai-agent-skills-for-firebase/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2026-02-17), 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. When you ask Antigravity, Gemini CLI, Claude Code, Cursor, or any other AI agent to “add a sign-in screen” to your app, the agent has to rely on its (possibly outdated) foundational training or burn tokens reading through documentation to find the right configuration. What if you could give your agent the right answer, right away?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Better code, fewer tokens: Introducing Agent Skills for Firebase Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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? Instead of relying on stale training weights, wiring up the Model Context Protocol (MCP) and structured Firebase agent skills gives your IDE or CLI direct, schema-aware tools to provision resources, inspect security rules, and run deterministic CLI deployments.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Never let an autonomous coding agent push Firestore or Data Connect rules straight to production without a gate. Always require the agent to run your test suite against the Firebase Local Emulator Suite first, and audit every generated rule for strict request.auth.uid ownership checks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;In this release, the Firebase team is launching Agent Skills for Firebase to do exactly that.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are Agent Skills?
&lt;/h3&gt;

&lt;p&gt;We want to enable both human and AI developers to build and operate Firebase apps with greater velocity, security, and control. Agent Skills are specialized instructions and context that you can give to your preferred AI agents to help them understand the nuances of Firebase, then execute tasks more effectively.&lt;/p&gt;

&lt;p&gt;Any AI agent that works with the &lt;a href="https://agentskills.io/specification" rel="noopener noreferrer"&gt;&lt;strong&gt;Agent Skills specification&lt;/strong&gt;&lt;/a&gt; can use Agent Skills for Firebase to write code that’s more accurate, secure, and ready for production.&lt;/p&gt;

&lt;p&gt;Instead of an agent trying to process the entire Firebase documentation at once, &lt;strong&gt;Skills enable an agent to pull in only the information required for the task at hand&lt;/strong&gt;. This reduces token consumption, lowers costs, and increases the accuracy of the agent’s output.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do Agent Skills save tokens?
&lt;/h3&gt;

&lt;p&gt;Without Agent Skills, adding domain-specific context often means giving your agent all of the information it needs right away. That could be thousands of tokens before the agent is prompted with a question.&lt;/p&gt;

&lt;p&gt;With Agent Skills, you have more control. You can inform the agent of available domain-specific context by just giving a short description of the skills available. These descriptions need very few tokens. As the agent works, it can decide to ‘activate’ the skill when it’s presented with a task. If the skill isn’t used, it won’t eat up any additional tokens. If your agent does use the skill, it doesn’t consume all of the documentation at once. Your agent can keep reading more of the reference documentation in the skill, bit-by-bit, until it has the information it needs to complete the task. This way it only uses what it needs to use.&lt;/p&gt;

&lt;p&gt;The fancy term for this is “progressive disclosure.”&lt;/p&gt;

&lt;h3&gt;
  
  
  Build and deploy full-stack web apps with ease
&lt;/h3&gt;

&lt;p&gt;With our initial release, Agent Skills for Firebase are optimized specifically for full-stack web development. By using these Skills, your AI agent can now assist you with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Project and app setup: **Automatically setting up your Firebase project and configuring your app to use Firebase&lt;/li&gt;
&lt;li&gt;**Authentication: **Adding sign-in screens and managing user flows.&lt;/li&gt;
&lt;li&gt;**Firestore: **Architecting your database based on your app’s specific data needs.&lt;/li&gt;
&lt;li&gt;**Security Rules: **Writing and deploying the security rules needed to protect your Firestore data from the start.&lt;/li&gt;
&lt;li&gt;**Firebase App Hosting: **Deploying your web application in a single step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firebase AI Logic&lt;/strong&gt;: Integrating Gemini-powered features to create intelligent, personalized user experiences.&lt;/li&gt;
&lt;li&gt;**And more! **This isn’t the full list, and Firebase is adding support for more Firebase features soon!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These Skills provide the agent with the knowledge needed to build accurate and secure applications on the first try.&lt;/p&gt;

&lt;h3&gt;
  
  
  Choose the right path for AI assistance
&lt;/h3&gt;

&lt;p&gt;Depending on your workflow and the tools you use, you might interact with Firebase through AI assistance in a few different ways. I recommend Firebase developers use Agent Skills for Firebase and Firebase MCP tools together.&lt;/p&gt;

&lt;p&gt;Agent Skills and MCP are complementary offerings that should be used together. Think of this as the &lt;strong&gt;relationship between expertise (knowing how to do a task) and capability (having the ability to actually do it)&lt;/strong&gt;. Skills provide LLMs with authoritative expertise on how to use Firebase. MCP provides LLMs with tools to set up, configure, and use Firebase services. Agent Skills for Firebase can teach models how to effectively use the Firebase CLI and Firebase MCP tools to accomplish complex tasks efficiently.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**&lt;a href="https://g.dev/ai/agent-skills" rel="noopener noreferrer"&gt;Agent Skills for Firebase&lt;/a&gt;: **Agent Skills provide the quick instructions and recommended practices that tell an agent how to perform Firebase tasks through token-efficient progressive disclosure. It educates AI agents to use tools like Firebase CLI and MCP server effectively.&lt;/li&gt;
&lt;li&gt;**&lt;a href="https://g.dev/ai/mcp-server" rel="noopener noreferrer"&gt;Firebase MCP server&lt;/a&gt;: **Designed for AI-assisted development workflows, enabling LLMs to interact with your Firebase projects, resources, and data programmatically.&lt;/li&gt;
&lt;li&gt;**&lt;a href="https://g.dev/firebase/cli-tools" rel="noopener noreferrer"&gt;Firebase CLI&lt;/a&gt;: **A complete command-line tool for hands-on Firebase project and product management, deployment, and local development that can be automatically triggered by AI agents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re looking for a straightforward answer to the question, “Which one should I use?” I recommend all three. Giving your agent access to all of these tools enables it to choose the right tool for the job.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dive deeper and tell us what you think
&lt;/h3&gt;

&lt;p&gt;This space is changing fast, so stay tuned as we keep improving these tools. MCP was introduced 15 months ago, Agent Skills was introduced four months ago, and who knows what the next evolution will be in agent tooling. Whatever it is, we’ll be there to support Firebase developers building incredible applications with whatever tools they like best.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show Me the Code: TypeScript &amp;amp; Web SDK Setup
&lt;/h2&gt;

&lt;p&gt;Here is the production baseline pattern we use at CodingCat.dev when wiring Better code, fewer tokens: Introducing Agent Skills for Firebase into a modern TypeScript web application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeApp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;GoogleAIBackend&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app-check&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;projectId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_PROJECT_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Protect AI endpoints in web apps with Firebase App Check&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_RECAPTCHA_SITE_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;isTokenAutoRefreshEnabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GoogleAIBackend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;geminiModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Better code, fewer tokens: Introducing Agent Skills for Firebase&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/wGbEM0CXMuI" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Security Rules: Effortless control over your app's data.&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/wGbEM0CXMuI" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2026/02/ai-agent-skills-for-firebase/" rel="noopener noreferrer"&gt;Better code, fewer tokens: Introducing Agent Skills for Firebase on the Official Firebase Blog&lt;/a&gt; (published 2026-02-17 by Luke Schlangen)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2026-01-boost-accuracy-with-the-prompt-optimizer" rel="noopener noreferrer"&gt;Boost accuracy with the prompt optimizer&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2026-03-ab-testing-for-web" rel="noopener noreferrer"&gt;Firebase A/B Testing is now available for the web&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Better code, fewer tokens: Introducing Agent Skills for Firebase?
&lt;/h3&gt;

&lt;p&gt;Better code, fewer tokens: Introducing Agent Skills for Firebase (announced 2026-02-17 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, MCP, Security workloads. When you ask Antigravity, Gemini CLI, Claude Code, Cursor, or any other AI agent to “add a sign-in screen” to your app, the agent has to rely on its (possibly outdated) foundational training or burn tokens reading through documentation to find the right configuration. What if you could give your agent the right answer, right away? Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2026/02/ai-agent-skills-for-firebase/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Better code, fewer tokens: Introducing Agent Skills for Firebase with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/wGbEM0CXMuI" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Security Rules: Effortless control over your app's data.&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Data Connect Queries: From Definitions to Client Code in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:48:45 +0000</pubDate>
      <link>https://dev.to/codingcatdev/data-connect-queries-from-definitions-to-client-code-in-firebase-web-architecture--3jme</link>
      <guid>https://dev.to/codingcatdev/data-connect-queries-from-definitions-to-client-code-in-firebase-web-architecture--3jme</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-05-dataconnect-queries-defs-to-client-code" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-05-dataconnect-queries-defs-to-client-code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have ever watched an AI coding agent hallucinate deprecated Firebase v8 syntax or deploy wide-open Firestore rules, you know that raw LLM prompts are not enough for production backends. Following the announcement of &lt;strong&gt;Data Connect Queries: From Definitions to Client Code&lt;/strong&gt; by Andrea Wu on the &lt;a href="https://firebase.blog/posts/2025/05/dataconnect-queries-defs-to-client-code/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-05-01), 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. Note: Firebase Data Connect has been renamed to SQL Connect. Learn more in the SQL Connect announcement.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Data Connect Queries: From Definitions to Client Code Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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? Instead of relying on stale training weights, wiring up the Model Context Protocol (MCP) and structured Firebase agent skills gives your IDE or CLI direct, schema-aware tools to provision resources, inspect security rules, and run deterministic CLI deployments.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Never let an autonomous coding agent push Firestore or Data Connect rules straight to production without a gate. Always require the agent to run your test suite against the Firebase Local Emulator Suite first, and audit every generated rule for strict request.auth.uid ownership checks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;A big part of any database solution is seamlessly getting information that you may need for your app. With Data Connect, you set up schemas to model your data, and then you make queries on that data. This blog post will dive into queries, and we’ll assume that you are familiar with &lt;a href="https://firebase.blog/posts/2025/02/dataconnect-schemas" rel="noopener noreferrer"&gt;&lt;strong&gt;schemas&lt;/strong&gt;&lt;/a&gt;. Feel free to read the Data Connect &lt;a href="https://firebase.google.com/docs/data-connect/schemas-queries-mutations" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt; if you need a reminder.&lt;/p&gt;

&lt;p&gt;We’ll use the movie review app example you might already know from the documentation and our previous &lt;a href="https://firebase.blog/posts/2024/10/dataconnect-series-announce" rel="noopener noreferrer"&gt;&lt;strong&gt;deep-dive blog posts&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a Data Connect query?
&lt;/h3&gt;

&lt;p&gt;A Data Connect query is a &lt;a href="https://graphql.org/learn/queries/" rel="noopener noreferrer"&gt;&lt;strong&gt;GraphQL query&lt;/strong&gt;&lt;/a&gt;: an operation that asks about specific &lt;a href="https://spec.graphql.org/draft/#sec-Language.Fields" rel="noopener noreferrer"&gt;&lt;strong&gt;fields&lt;/strong&gt;&lt;/a&gt; from a backend datastore defined by your schema. You write queries in GraphQL, and you can use queries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;in your client apps, only after you’ve deployed the queries to production&lt;/li&gt;
&lt;li&gt;for ad hoc execution from privileged environments like the Visual Studio Code extension, the Firebase console, and the Firebase Admin SDK. Deployment of the queries is not required for these actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Declaring a Query
&lt;/h3&gt;

&lt;p&gt;These are the parts of a query definition in GraphQL:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero, one, or more than one operation argument&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is an example to list all movies by genre:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;query&lt;/code&gt; type definition, letting GraphQL know this is a query&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;ListMoviesByGenre&lt;/code&gt; operation (query) name&lt;/li&gt;
&lt;li&gt;A single variable &lt;code&gt;$genre&lt;/code&gt; operation argument of the &lt;code&gt;String&lt;/code&gt; type. Every query argument requires a type declaration, a built-in &lt;a href="https://firebase.google.com/docs/data-connect/schemas-queries-mutations#supported_data_types" rel="noopener noreferrer"&gt;&lt;strong&gt;supported data type&lt;/strong&gt;&lt;/a&gt; like &lt;code&gt;String&lt;/code&gt;, or a custom, schema-defined type like &lt;code&gt;Movie_Key&lt;/code&gt; (which is a &lt;a href="https://firebase.google.com/docs/data-connect/schemas-queries-mutations#key-scalars" rel="noopener noreferrer"&gt;&lt;strong&gt;key scalar&lt;/strong&gt;&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;A single directive, &lt;code&gt;@auth&lt;/code&gt;, which specifies only logged-in users, can execute this query. For this movie data that’s appropriate for public viewing, the PUBLIC level is sufficient authorization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Anatomy of a Query
&lt;/h3&gt;

&lt;p&gt;Now that we know how to declare a query, what does a query in its entirety look like? It is broken down into the following parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Declaration to create a query, as described in the previous section&lt;/li&gt;
&lt;li&gt;Tables from which the query needs to get data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is an example query to get all movies of a particular genre ordered by highest rating to lowest:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;query&lt;/span&gt; 
  &lt;span class="nx"&gt;mostPopular&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
     &lt;span class="nx"&gt;where&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;genre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;eq&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;$genre&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;orderBy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;rating&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DESC&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;id&lt;/span&gt;
    &lt;span class="nx"&gt;title&lt;/span&gt;
    &lt;span class="nx"&gt;genre&lt;/span&gt;
    &lt;span class="nx"&gt;description&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first line is described in the “Declaring a Query” section. Let's break down the other important pieces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;movies&lt;/code&gt; specifies the table in the schema from which the query needs to get data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;where&lt;/code&gt; and &lt;code&gt;orderBy&lt;/code&gt; are filters applied to retrieving the data&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;id&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;genre&lt;/code&gt;, and &lt;code&gt;description&lt;/code&gt; are the fields to be returned by this query for all of the movies that fit the genre&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Directives
&lt;/h3&gt;

&lt;p&gt;Let’s talk about directives - like &lt;code&gt;@auth&lt;/code&gt;. Data Connect has three directives for queries to define their behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@auth&lt;/code&gt; defines the authentication policy, and it is required for the query to be accessible by client apps&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@check&lt;/code&gt; verifies that specified fields are present in query results&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@redact&lt;/code&gt; omits query results from the client’s response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more information, there are more in-depth descriptions and resources in the documentation about &lt;a href="https://firebase.google.com/docs/data-connect/schemas-queries-mutations#query-mutation-directives" rel="noopener noreferrer"&gt;&lt;strong&gt;directives for queries&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Generated Fields
&lt;/h3&gt;

&lt;p&gt;When you create a schema, Data Connect’s local tooling automatically generates &lt;a href="https://graphql.org/learn/queries/#fields" rel="noopener noreferrer"&gt;&lt;strong&gt;fields&lt;/strong&gt;&lt;/a&gt; based on the types and type relationships in your schema. These generated fields are necessary for writing your own queries to be deployed and used in your client code, or run ad hoc in privileged environments&lt;/p&gt;

&lt;p&gt;As an example of a generated field, say the &lt;code&gt;Movie&lt;/code&gt; type is defined as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;type&lt;/span&gt;
  &lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UUID&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;uuidV4()&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
  &lt;span class="nx"&gt;releaseYear&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Int&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;index&lt;/span&gt;
  &lt;span class="nx"&gt;genre&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dataType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;varchar(30)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nx"&gt;rating&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Int&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the schema definition, Data Connect generates fields for single-table use cases, as seen in &lt;code&gt;query.gql&lt;/code&gt;. It creates a field to get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a singular record from the &lt;code&gt;Movie&lt;/code&gt; table, given the &lt;code&gt;id&lt;/code&gt; for the movie. The field name is the same as the table name, unless otherwise defined - &lt;code&gt;movie&lt;/code&gt; in this case.&lt;/li&gt;
&lt;li&gt;a list of movies, given optional filtering conditions. The field name is the same as the table name with a “s” at the end, unless otherwise defined - &lt;code&gt;movies&lt;/code&gt; in this case.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(In both of these tables, a directive that this blog post didn’t cover is &lt;code&gt;@fdc_generated&lt;/code&gt; - you will never be writing this on your own, so don’t worry too much about it. It says which table the generated field is coming from and whether it’s querying for a single record or multiple records).&lt;/p&gt;

&lt;p&gt;Data Connect also generates fields for multi-table, relational operations with explicit names. This will be in a future blog post, as there is a lot to cover.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I find these fields?
&lt;/h3&gt;

&lt;p&gt;With the Data Connect Visual Studio Code extension, there are several ways to see and use these generated fields after you begin editing your schema:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They are listed under the Schema Explorer&lt;/li&gt;
&lt;li&gt;Their source is generated to &lt;code&gt;dataconnect/.dataconnect/main/query.gql&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;They are browsable in automatic local documentation, accessible with the View reference docs link&lt;/li&gt;
&lt;li&gt;They are incorporated into ad hoc queries generated when you click CodeLens buttons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you deploy your schema, you can view the generated fields with reference documentation in the Firebase console and use the data tab to prototype queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Generated Fields for Queries
&lt;/h3&gt;

&lt;p&gt;With the generated fields, you can now write queries to retrieve the information needed for your app. Your client code can only use these queries and not the generated fields. Additionally, the client only gets to see the fields selected in queries. If there’s a secret field that you don’t want clients to see, then clients cannot see it since they don’t have direct access to the database.&lt;/p&gt;

&lt;p&gt;For example, you can use the generated &lt;code&gt;movie&lt;/code&gt; field to create your own query, where you pass in the movie &lt;code&gt;id&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;query&lt;/span&gt; 
  &lt;span class="nx"&gt;movie&lt;/span&gt;
    &lt;span class="nx"&gt;id&lt;/span&gt;
    &lt;span class="nx"&gt;title&lt;/span&gt;
    &lt;span class="nx"&gt;imageUrl&lt;/span&gt;
    &lt;span class="nx"&gt;genre&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For listing movies, you can use the generated &lt;code&gt;movies&lt;/code&gt; field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="nx"&gt;ListMovies&lt;/span&gt; &lt;span class="p"&gt;@&lt;/span&gt;
  &lt;span class="nx"&gt;movies&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;id&lt;/span&gt;
    &lt;span class="nx"&gt;title&lt;/span&gt;
    &lt;span class="nx"&gt;imageUrl&lt;/span&gt;
    &lt;span class="nx"&gt;genre&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Using queries
&lt;/h3&gt;

&lt;p&gt;Now that you’ve defined your queries, you’re ready to use them in your app code. How do you do that? Data Connect automatically generates SDKs for you to use, bridging the gap between your queries defined in GraphQL and your application platform. You need to set up these generated SDKs, and then you can call the generated functions in your app code. Feel free to &lt;a href="https://firebase.blog/posts/2024/12/dataconnect-generated-sdks" rel="noopener noreferrer"&gt;&lt;strong&gt;read&lt;/strong&gt;&lt;/a&gt; about what generated SDKs are and how to use them in Data Connect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping SQL features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Data Connect Queries: From Definitions to Client Code&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N25khadfUag" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/05/dataconnect-queries-defs-to-client-code/" rel="noopener noreferrer"&gt;Data Connect Queries: From Definitions to Client Code on the Official Firebase Blog&lt;/a&gt; (published 2025-05-01 by Andrea Wu)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-04-dataconnect-web-bindings" rel="noopener noreferrer"&gt;Angular and React Bindings for Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-05-dataconnect-atomic-data-modifications" rel="noopener noreferrer"&gt;Atomic Data Modifications for Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Data Connect Queries: From Definitions to Client Code?
&lt;/h3&gt;

&lt;p&gt;Data Connect Queries: From Definitions to Client Code (announced 2025-05-01 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, SQL, TypeScript, Security workloads. Note: Firebase Data Connect has been renamed to SQL Connect. Learn more in the SQL Connect announcement. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/05/dataconnect-queries-defs-to-client-code/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Data Connect Queries: From Definitions to Client Code with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Bridge the design to development gap with Builder.io and Firebase Studio: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:48:44 +0000</pubDate>
      <link>https://dev.to/codingcatdev/bridge-the-design-to-development-gap-with-builderio-and-firebase-studio-web-architecture--17gf</link>
      <guid>https://dev.to/codingcatdev/bridge-the-design-to-development-gap-with-builderio-and-firebase-studio-web-architecture--17gf</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-09-firebase-studio-builder-io-design-development" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-09-firebase-studio-builder-io-design-development&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Spinning up a full-stack web environment with cloud emulators, preview URLs, and AI-assisted scaffolding usually means hours of local Docker and environment variable wrangling. Following the announcement of &lt;strong&gt;Bridge the design to development gap with Builder.io and Firebase Studio&lt;/strong&gt; by Kirupa Chinnathambi, Alice Moore on the &lt;a href="https://firebase.blog/posts/2025/09/firebase-studio-builder-io-design-development/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-09-29), 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. At Google I/O Earlier, the Firebase team announced that Firebase Studio integrates with Builder.io to provide an AI-assisted workflow that automatically syncs your team’s designs and code as part of building production-scale applications. All of this is done fully from the comforts of your browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Bridge the design to development gap with Builder.io and Firebase Studio Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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 Studio unifies cloud workspaces, Gemini-powered prototyping agents, and one-click Firebase App Hosting deploys so you can move from an initial architecture prompt to a live SSR web app in a single browser tab.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Treat prototypes generated in Firebase Studio like any other production repo: commit your idx/dev.nix workspace configuration, lock down your environment secrets in Cloud Secret Manager, and wire up CI/CD branch previews before inviting real users.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;In this post, let’s take a step back and look at some of the motivations for why we built this feature to greatly improve your workflow in building high-quality apps, especially when collaborating with users who use Figma.&lt;/p&gt;

&lt;h3&gt;
  
  
  Typical pain points of design to code
&lt;/h3&gt;

&lt;p&gt;We can all agree on the following: &lt;strong&gt;Going from a polished design to a functional, coded application can be a winding, tedious path.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You translate static mockups into components, which can be a time-consuming and error-prone task that introduces inconsistencies. This gap between design and development (and product management!) can lead to &lt;strong&gt;design drift&lt;/strong&gt;, where the final product doesn’t capture the nuance and precision of the original vision.&lt;/p&gt;

&lt;p&gt;This can be visualized by &lt;a href="https://medium.com/this-product-designers-life/how-developers-designers-and-pms-see-each-other-b9f99e774da6" rel="noopener noreferrer"&gt;&lt;strong&gt;Jessica Lascar’s excellent illustration&lt;/strong&gt;&lt;/a&gt; we see below:&lt;/p&gt;

&lt;p&gt;Plus, a static prototype, no matter how detailed, can’t fully represent a real, dynamic application. The following critical user experiences often come to light late in the development process:&lt;/p&gt;

&lt;p&gt;This creates extra cycles, slows down iteration, and delays feature delivery.&lt;/p&gt;

&lt;p&gt;To address these pain points, we want to give teams a better workflow. Many tools and processes have been tried over the past few decades, but we realized the right solution requires AI. However, while many first-gen AI tools attempt to solve the problem by analyzing screenshots, a vision-based approach is imprecise and doesn’t take advantage of the structured data within the design file.&lt;/p&gt;

&lt;p&gt;We need to improve upon the initial AI-first approaches with a solution that respects your whole team’s hard work by reusing existing design tokens, component structures, and layout rules to generate clean, production-ready code. The solution shouldn’t just stop at a visual replica. It should create a real, backend-connected app that lets you find and fix edge cases from the start of design and development.&lt;/p&gt;

&lt;p&gt;Our integration with Builder.io is our attempt at providing the first iteration of a better solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Figma + Builder.io + Firebase Studio = Win!
&lt;/h3&gt;

&lt;p&gt;When it comes to design and UI development, Figma is the center of gravity. We wanted to start from here and ensure you and your team have a path to take your designs in Figma and translate them into working code. The bridge that takes designs from Figma into Firebase Studio is the &lt;a href="https://www.figma.com/community/plugin/747985167520967365/builder-io-figma-to-code-ai-apps-react-vue-tailwind-etc" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io Figma plug-in&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Right now, you can use the plug-in from Figma…&lt;/p&gt;

&lt;p&gt;…to export that output to Firebase Studio where your static visuals are transformed into a cohesive part of your fully functioning app:&lt;/p&gt;

&lt;p&gt;For more details on how to make all of this work, check out the &lt;a href="https://firebase.google.com/docs/studio/get-started-import?import_type=figma#get-started" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Studio documentation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since we released this capability, we have received great feedback on how you all are using the Builder.io / Firebase Studio integration. Two common use cases that we want to highlight are:&lt;/p&gt;

&lt;p&gt;Ideas are no longer limited to being in static mockups or slides or documents. You can now take the next step and validate an idea as part of building a prototype that more of your team can interact with.&lt;/p&gt;

&lt;p&gt;The following video (by an actual Product Manager!) walks you through how this works:&lt;/p&gt;

&lt;p&gt;By building prototypes quickly, you can test user flows, discover edge cases related to empty states or loading behavior, and get concrete feedback from your team. What previously took days of team-wide back-and-forth can now be accomplished by a single person in a single afternoon, dramatically accelerating the feedback loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Designer-led iteration on existing projects
&lt;/h3&gt;

&lt;p&gt;You and your team can also develop features in an already-established codebase.&lt;/p&gt;

&lt;p&gt;Let’s say you need to make a visual tweak to a component. Instead of filing a ticket and waiting, you can open the project in &lt;a href="http://builder.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt;’s Visual Editor, make the change directly, and submit it as a pull request to the team’s GitHub repository.&lt;/p&gt;

&lt;p&gt;A developer on your team can then check out that PR branch within Firebase Studio to review the code and test the changes in a live preview environment before merging.&lt;/p&gt;

&lt;p&gt;This process empowers the entire team to contribute safely to the codebase while maintaining strict development standards. Also, because the workflow carries design tokens directly from Figma into the final code, teams can ensure brand consistency across all iterations, confident that colors, fonts, and spacing align with their established design system.&lt;/p&gt;

&lt;h3&gt;
  
  
  A better workflow
&lt;/h3&gt;

&lt;p&gt;The Builder.io + Firebase Studio workflow makes the collaborative process between designers and developers more efficient.&lt;/p&gt;

&lt;p&gt;**Designers **work in the environment they know best: Figma. They still get to craft the vision, but now they can see that vision as a truly interactive application instead of static screens. They can communicate their intent far more effectively than in a traditional “PowerPoint-style” prototype, ensuring the final product matches the design’s nuance and feel.&lt;/p&gt;

&lt;p&gt;**Developers **can skip the boilerplate. Instead of manually translating design specs, they get clean code that respects the project’s existing architecture. They can start solving the hard engineering problems in a full-featured, VS Code-style IDE, focusing on business logic and performance rather than pixel-pushing.&lt;/p&gt;

&lt;p&gt;**The entire app team **gets a single source of truth where design and code stay in sync. By eliminating the manual and error-prone work of UI implementation, you reduce the back-and-forth and wasted cycles. Everyone can collaborate in a shared, in-browser environment, leading to faster iteration, higher-quality output, and a more streamlined path from idea to production.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get started with Builder.io and Firebase Studio
&lt;/h3&gt;

&lt;p&gt;Together, &lt;a href="http://builder.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;Builder.io&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://firebase.google.com/docs/studio?utm_source=firebase_blog&amp;amp;utm_medium=blog&amp;amp;utm_campaign=FY25-Q3-firebasestudio&amp;amp;utm_term=firebase_studio_devrel&amp;amp;utm_content=firebase_studio_builder_io_design_development" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Studio&lt;/strong&gt;&lt;/a&gt; collapse the distance between a great idea in Figma and a deployed, full-stack application. Get started today to accelerate your own development cycles and ship better products, faster.&lt;/p&gt;

&lt;p&gt;Kirupa Chinnathambi (&lt;a href="https://twitter.com/kirupa" rel="noopener noreferrer"&gt;&lt;strong&gt;@kirupa&lt;/strong&gt;&lt;/a&gt;), Product Lead - Firebase Studio&lt;/p&gt;

&lt;p&gt;Alice Moore (&lt;a href="https://x.com/tempoimmaterial" rel="noopener noreferrer"&gt;&lt;strong&gt;@tempoimmaterial&lt;/strong&gt;&lt;/a&gt;), Developer Experience - Builder.io&lt;/p&gt;

&lt;h2&gt;
  
  
  Show Me the Code: TypeScript &amp;amp; Web SDK Setup
&lt;/h2&gt;

&lt;p&gt;Here is the production baseline pattern we use at CodingCat.dev when wiring Bridge the design to development gap with Builder.io and Firebase Studio into a modern TypeScript web application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeApp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;GoogleAIBackend&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app-check&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;projectId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_PROJECT_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Protect AI endpoints in web apps with Firebase App Check&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_RECAPTCHA_SITE_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;isTokenAutoRefreshEnabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GoogleAIBackend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;geminiModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Bridge the design to development gap with Builder.io and Firebase Studio&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/wGbEM0CXMuI" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Security Rules: Effortless control over your app's data.&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/wGbEM0CXMuI" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/09/firebase-studio-builder-io-design-development/" rel="noopener noreferrer"&gt;Bridge the design to development gap with Builder.io and Firebase Studio on the Official Firebase Blog&lt;/a&gt; (published 2025-09-29 by Kirupa Chinnathambi, Alice Moore)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-09-firebase-studio-builtin-model" rel="noopener noreferrer"&gt;Get the most out of Firebase Studio’s default built-in model, Gemini 2.5 Pro&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-09-remote-config-custom-signals" rel="noopener noreferrer"&gt;Unlocking Dynamic Experiences with Client-Side custom signals conditions in Firebase Remote Config&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Bridge the design to development gap with Builder.io and Firebase Studio?
&lt;/h3&gt;

&lt;p&gt;Bridge the design to development gap with Builder.io and Firebase Studio (announced 2025-09-29 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, Security workloads. At Google I/O Earlier, the Firebase team announced that Firebase Studio integrates with Builder.io to provide an AI-assisted workflow that automatically syncs your team’s designs and code as part of building production-scale applications. All of this is done fully from the comforts of your browser. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/09/firebase-studio-builder-io-design-development/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Bridge the design to development gap with Builder.io and Firebase Studio with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/wGbEM0CXMuI" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Security Rules: Effortless control over your app's data.&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Firebase + Gemini Code Assist: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:47:38 +0000</pubDate>
      <link>https://dev.to/codingcatdev/firebase-gemini-code-assist-web-architecture-implementation-guide-4a9n</link>
      <guid>https://dev.to/codingcatdev/firebase-gemini-code-assist-web-architecture-implementation-guide-4a9n</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-03-gemini-code-assist" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-03-gemini-code-assist&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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 &lt;strong&gt;Firebase + Gemini Code Assist&lt;/strong&gt; by Nathan Yim on the &lt;a href="https://firebase.blog/posts/2025/03/gemini-code-assist/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Firebase + Gemini Code Assist Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;Last year, we &lt;a href="https://firebase.blog/posts/2024/05/gemini-in-firebase/" rel="noopener noreferrer"&gt;&lt;strong&gt;introduced&lt;/strong&gt;&lt;/a&gt; Gemini in Firebase to provide targeted assistance for Firebase developers in the Firebase console. Built on &lt;a href="https://cloud.google.com/products/gemini" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemini for Google Cloud&lt;/strong&gt;&lt;/a&gt; and using a customized version of the Gemini model, Gemini in Firebase helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;answer your questions when getting started&lt;/li&gt;
&lt;li&gt;generate boilerplate code when setting up Firebase SDKs&lt;/li&gt;
&lt;li&gt;optimize or refactor Firebase-specific code&lt;/li&gt;
&lt;li&gt;offer troubleshooting support to improve your app’s quality&lt;/li&gt;
&lt;li&gt;&lt;a href="https://firebase.blog/posts/2024/05/ai-assistance-in-crashlytics" rel="noopener noreferrer"&gt;&lt;strong&gt;analyze app crashes and provide recommended next steps&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://firebase.blog/posts/2024/11/dataconnect-gemini" rel="noopener noreferrer"&gt;&lt;strong&gt;write GraphQL queries for Firebase Data Connect&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show Me the Code: TypeScript &amp;amp; Web SDK Setup
&lt;/h2&gt;

&lt;p&gt;Here is the production baseline pattern we use at CodingCat.dev when wiring Firebase + Gemini Code Assist into a modern TypeScript web application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeApp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;GoogleAIBackend&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app-check&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;projectId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_PROJECT_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Protect AI endpoints in web apps with Firebase App Check&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_RECAPTCHA_SITE_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;isTokenAutoRefreshEnabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GoogleAIBackend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;geminiModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Firebase + Gemini Code Assist&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N25khadfUag" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/03/gemini-code-assist/" rel="noopener noreferrer"&gt;Firebase + Gemini Code Assist on the Official Firebase Blog&lt;/a&gt; (published 2025-02-25 by Nathan Yim)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-02-gemini-genkit-pdf-structured-data" rel="noopener noreferrer"&gt;Extracting structured data from PDFs using Gemini 2.0 and Genkit&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-02-fdc-whats-new" rel="noopener noreferrer"&gt;February Update: What's New in Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Firebase + Gemini Code Assist?
&lt;/h3&gt;

&lt;p&gt;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 &lt;a href="https://firebase.blog/posts/2025/03/gemini-code-assist/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Firebase + Gemini Code Assist with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Monitor your Genkit features in production in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:46:53 +0000</pubDate>
      <link>https://dev.to/codingcatdev/monitor-your-genkit-features-in-production-in-firebase-web-architecture-implementation-guide-1780</link>
      <guid>https://dev.to/codingcatdev/monitor-your-genkit-features-in-production-in-firebase-web-architecture-implementation-guide-1780</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-03-monitor-genkit-features-in-production" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-03-monitor-genkit-features-in-production&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building AI features in TypeScript or Go quickly turns into spaghetti when you try to bolt structured output validation, tool calling, and OpenTelemetry tracing onto raw model API calls. Following the announcement of &lt;strong&gt;Monitor your Genkit features in production&lt;/strong&gt; by Konstantin Mandrika, Alex Singer on the &lt;a href="https://firebase.blog/posts/2025/03/monitor-genkit-features-in-production/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-03-18), 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. From summarizing text and generating images, to translation and helpful agents, generative AI is becoming commonplace in app development. With the launch of Firebase Genkit Node.js 1.0, Firebase is making it easier than ever to build generative AI features into your applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Monitor your Genkit features in production Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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 Genkit gives full-stack engineers strongly typed flows, dotprompt templates, local developer UI trace inspection, and production observability wired directly into Google Cloud and Firebase.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Always wrap your Genkit flows with explicit Zod input/output schemas and enforce Firebase App Check attestation on callable endpoints so bots cannot rack up unauthenticated token spend.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;Building with LLMs requires skilled prompt engineering and configuration to ensure consistent and expected results. While Genkit’s local development tools are invaluable for building and refining production-ready features, unexpected issues can (and will!) pop up in real-world production scenarios. Issues like unexpected or delayed generations can negatively impact your end user’s overall experience. &lt;strong&gt;Production monitoring and observability is crucial to detect issues promptly and allow you to swiftly take action.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Luckily, Genkit is automatically instrumented to collect telemetry data and offers Firebase Genkit Monitoring - production grade tooling to let you monitor and observe your Genkit features in the Firebase console, to know that it’s working and delivering the expected experience for your end users. In this blog post, we’ll give a quick overview of the main features of Genkit Monitoring and how to get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting started with Genkit Monitoring
&lt;/h3&gt;

&lt;p&gt;If you are new to Genkit, check out the &lt;a href="https://genkit.dev/docs/get-started" rel="noopener noreferrer"&gt;&lt;strong&gt;Getting Started Guide&lt;/strong&gt;&lt;/a&gt; for step-by-step instructions on building your first AI feature. Once your feature is built and ready for production, turning on telemetry export is a matter of installing the &lt;code&gt;@genkit-ai/firebase&lt;/code&gt; plugin in your project:&lt;/p&gt;

&lt;p&gt;Importing &lt;code&gt;enableFirebaseTelemetry&lt;/code&gt; into your Genkit configuration file (the file where &lt;code&gt;genkit(...)&lt;/code&gt; is initialized), and calling it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;

&lt;span class="nx"&gt;enableFirebaseTelemetry&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And redeploying your feature to production.&lt;/p&gt;

&lt;h3&gt;
  
  
  High-level overview of each Genkit-powered feature
&lt;/h3&gt;

&lt;p&gt;After adding the Firebase telemetry plugin and deploying your Genkit feature, data is automatically written to GCP Logging, Trace, and Monitoring, and viewable in the Genkit Monitoring dashboard in the Firebase console. The landing page gives you a high level overview of the health of each of your Genkit features - showing metrics around usage, success rates, and p95 latency. This serves as the starting point to identify any issues that need additional investigation.&lt;/p&gt;

&lt;p&gt;The metrics are also broken down by each of your Genkit features, including the input and output token count. In many cases, the token count is a good proxy for both cost and correctness of the feature. For example, a lower than expected token count is a signal that the LLM is providing a generic “I don’t know how to answer this” message, while a higher than expected token count is a signal that the LLM inference could use a better stop sequence. Some multimodal models count images via tokens while others via a discrete image metric - the Firebase Genkit Monitoring dashboard supports both.&lt;/p&gt;

&lt;h3&gt;
  
  
  Feature-specific telemetry
&lt;/h3&gt;

&lt;p&gt;While the overview page provides a great high-level view, clicking on a specific Genkit feature that you’ve built brings up its details page with more granular telemetry and higher fidelity graphs. Want to know when your latency shot up or when the token usage increased? This page has you covered!&lt;/p&gt;

&lt;h3&gt;
  
  
  Tools to identify and debug issues
&lt;/h3&gt;

&lt;p&gt;To understand and debug the root cause of problems, you need more than just metrics. This is especially true given Genkit’s capabilities to construct complex, multi-step AI features.&lt;/p&gt;

&lt;p&gt;The Firebase Genkit Monitoring console makes debugging complex flows simple. The failed paths table displays all failed fragments of your Genkit feature, allowing you to quickly identify where in your code an error occurred. You can then use the traces table to filter into the specific failed invocations and quickly view trace attributes, including status, input, output, latency, and model set. These traces can be exported and used for evaluations directly within Genkit, facilitating feature iteration and improvement - this is especially useful in cases where getting a dataset during feature development is impossible or very difficult.&lt;/p&gt;

&lt;p&gt;Debugging errors and quality-of-results issues requires a detailed view of each execution because the most interesting parts may be hidden inside.&lt;/p&gt;

&lt;p&gt;Clicking a trace gives you a detailed view that allows you to explore each span in your Genkit feature and its respective attributes, including input and output. The trace viewer provides an intuitive and easily navigable view of the trace that helps you find exactly where in the flow the feature went awry. And in case you need to dig deeper or join with other application data, all trace, log, and metrics data is stored in GCP and can be accessed there!&lt;/p&gt;

&lt;p&gt;The combination of the high level metrics and low level trace debugging capabilities of the Firebase Genkit Monitoring dashboard help you quickly identify and fix emerging issues, improve your features, and ultimately keep your customers happy.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="https://genkit.dev/docs/observability/getting-started" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Started with Genkit Monitoring&lt;/strong&gt;&lt;/a&gt; documentation for our complete instruction guide.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Monitor your Genkit features in production&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N25khadfUag" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/03/monitor-genkit-features-in-production/" rel="noopener noreferrer"&gt;Monitor your Genkit features in production on the Official Firebase Blog&lt;/a&gt; (published 2025-03-18 by Konstantin Mandrika, Alex Singer)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-03-apphosting-march-update" rel="noopener noreferrer"&gt;App Hosting updates: rollbacks, SDK auto-configuration, and more&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-04-app-testing-agent" rel="noopener noreferrer"&gt;Introducing the AI-Powered App Testing Agent&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Monitor your Genkit features in production?
&lt;/h3&gt;

&lt;p&gt;Monitor your Genkit features in production (announced 2025-03-18 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI workloads. From summarizing text and generating images, to translation and helpful agents, generative AI is becoming commonplace in app development. With the launch of Firebase Genkit Node.js 1.0, Firebase is making it easier than ever to build generative AI features into your applications. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/03/monitor-genkit-features-in-production/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Monitor your Genkit features in production with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Chrome Built-in AI and Gemini Nano: A Production Guide to the Prompt, Summarizer, and Rewriter APIs</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:44:51 +0000</pubDate>
      <link>https://dev.to/codingcatdev/chrome-built-in-ai-and-gemini-nano-a-production-guide-to-the-prompt-summarizer-and-rewriter-apis-342d</link>
      <guid>https://dev.to/codingcatdev/chrome-built-in-ai-and-gemini-nano-a-production-guide-to-the-prompt-summarizer-and-rewriter-apis-342d</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/chrome-built-in-ai-gemini-nano-prompt-api-guide" rel="noopener noreferrer"&gt;https://codingcat.dev/post/chrome-built-in-ai-gemini-nano-prompt-api-guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the past two years, adding a simple text summarizer, tone rewriter, or draft assistant to a web application meant standing up a server-side proxy, managing API keys, paying per million tokens, and eating a 450ms network roundtrip on every single user interaction. With &lt;a href="https://developer.chrome.com/docs/ai/built-in" rel="noopener noreferrer"&gt;&lt;strong&gt;Chrome Built-in AI&lt;/strong&gt;&lt;/a&gt; shipping &lt;strong&gt;Gemini Nano&lt;/strong&gt; directly inside the browser binary, web developers can now run foundation model inference on the user's local GPU or NPU with zero token cost, zero server egress, and full offline capability.&lt;/p&gt;

&lt;p&gt;In this guide, we will break down how Chrome's Built-in AI architecture works under the hood, walk through the &lt;code&gt;LanguageModel&lt;/code&gt; (Prompt API), &lt;code&gt;Summarizer&lt;/code&gt;, &lt;code&gt;Rewriter&lt;/code&gt;, and &lt;code&gt;Translator&lt;/code&gt; Web APIs in TypeScript, and show how we wire up progressive model download telemetry and session cloning in Astro and React.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Move Inference into the Browser Sandbox?
&lt;/h2&gt;

&lt;p&gt;When you bundle your own WebAssembly or WebGPU weights per origin, every website forces the user to download a separate 1.5GB model file. Chrome Built-in AI solves the cold-cache problem at the browser level: Chrome downloads and updates a single shared &lt;strong&gt;Gemini Nano&lt;/strong&gt; checkpoint managed by the browser'sOptimization Guide service, and exposes task-specific and general-purpose JavaScript interfaces to any origin that requests them.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8p5w11ys0s8s21uc5seq.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8p5w11ys0s8s21uc5seq.jpg" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Chrome Built-in AI API Surface Comparison
&lt;/h2&gt;

&lt;p&gt;Rather than forcing every developer to write brittle system prompts for common text transformations, Chrome splits Built-in AI into high-level task APIs and the flexible &lt;code&gt;LanguageModel&lt;/code&gt; Prompt API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "_key": "wai_tbl_8bf23065d5",
  "_type": "table",
  "rows": [
    {
      "_key": "wai_row0_a75c26a562",
      "_type": "row",
      "cells": [
        "Browser API",
        "Global Interface",
        "Primary Configuration Options",
        "Ideal Production Workload"
      ]
    },
    {
      "_key": "wai_row1_aa7d9df1f3",
      "_type": "row",
      "cells": [
        "Prompt API",
        "window.LanguageModel",
        "systemPrompt, initialPrompts, temperature, topK, responseConstraint (JSON Schema)",
        "Custom structured extraction, interactive chat, and classification with JSON Schema output constraints."
      ]
    },
    {
      "_key": "wai_row2_452a3e30f1",
      "_type": "row",
      "cells": [
        "Summarizer API",
        "window.Summarizer",
        "type ('key-points' | 'tldr' | 'teaser' | 'headline'), format ('markdown' | 'plain-text'), length",
        "Summarizing long documentation pages, podcast transcripts, or comment threads client-side."
      ]
    },
    {
      "_key": "wai_row3_d7da1c974e",
      "_type": "row",
      "cells": [
        "Writer &amp;amp; Rewriter APIs",
        "window.Writer / window.Rewriter",
        "tone ('more-formal' | 'more-casual' | 'as-is'), length ('shorter' | 'longer'), sharedContext",
        "Inline rich-text editor helpers in Sanity Studio, support ticket polishing, and PR descriptions."
      ]
    },
    {
      "_key": "wai_row4_d588c38edf",
      "_type": "row",
      "cells": [
        "Translator &amp;amp; LanguageDetector",
        "window.Translator / window.LanguageDetector",
        "sourceLanguage, targetLanguage (BCP-47 tags)",
        "Instant privacy-preserving localization of user-generated content without cloud translation fees."
      ]
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 1: Probing Availability and Handling Model Downloads
&lt;/h2&gt;

&lt;p&gt;Never assume the local model weights are already cached on disk. Before calling &lt;code&gt;LanguageModel.create()&lt;/code&gt;, always inspect &lt;code&gt;LanguageModel.availability()&lt;/code&gt; (which returns &lt;code&gt;'available'&lt;/code&gt;, &lt;code&gt;'downloadable'&lt;/code&gt;, &lt;code&gt;'downloading'&lt;/code&gt;, or &lt;code&gt;'unavailable'&lt;/code&gt;) and attach a &lt;code&gt;monitor&lt;/code&gt; callback to surface download progress in your UI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/lib/ai/chrome-language-model.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;BuiltInAvailability&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;available&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;downloadable&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;downloading&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unavailable&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;PromptSessionOptions&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;systemPrompt&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;topK&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;onDownloadProgress&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;loadedRatio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;AbortSignal&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;ChromeLanguageModelFactory&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;availability&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;BuiltInAvailability&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;params&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;defaultTemperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;maxTemperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;defaultTopK&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;maxTopK&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ChromeLanguageModelSession&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;ChromeLanguageModelSession&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;responseConstraint&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;AbortSignal&lt;/span&gt; &lt;span class="p"&gt;}):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;promptStreaming&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;responseConstraint&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;AbortSignal&lt;/span&gt; &lt;span class="p"&gt;}):&lt;/span&gt; &lt;span class="nx"&gt;ReadableStream&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;measureInputUsage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nx"&gt;inputUsage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nx"&gt;inputQuota&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;clone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;AbortSignal&lt;/span&gt; &lt;span class="p"&gt;}):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ChromeLanguageModelSession&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getLanguageModelFactory&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nx"&gt;ChromeLanguageModelFactory&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;globalThis&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="nx"&gt;unknown&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;LanguageModel&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;ChromeLanguageModelFactory&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;languageModel&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;ChromeLanguageModelFactory&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LanguageModel&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;languageModel&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createBrowserPromptSession&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;PromptSessionOptions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ChromeLanguageModelSession&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;factory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getLanguageModelFactory&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;factory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;factory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;availability&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unavailable&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;defaults&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;factory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;params&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;factory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;systemPrompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;systemPrompt&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You are a concise, code-first web architecture assistant on CodingCat.dev.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;defaultTemperature&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;topK&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;topK&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="nx"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;defaultTopK&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;signal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nf"&gt;monitor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;m&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;EventTarget&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;downloadprogress&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="nx"&gt;unknown&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;loaded&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;total&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loaded&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onDownloadProgress&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ratio&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loaded&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loaded&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;onDownloadProgress&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ratio&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Structured JSON Output with responseConstraint and Session Cloning
&lt;/h2&gt;

&lt;p&gt;Two of the most impactful capabilities in Chrome's Prompt API are &lt;code&gt;responseConstraint&lt;/code&gt; (which forces Gemini Nano's token sampler to adhere strictly to a JSON Schema without hallucinating invalid syntax) and &lt;code&gt;session.clone()&lt;/code&gt; (which forks the KV-cache of an initialized system prompt so you can process multiple items without re-evaluating the system context). Here is how we combine both to classify and tag technical tutorials client-side:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/lib/ai/classify-article-client.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createBrowserPromptSession&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./chrome-language-model&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;TAG_EXTRACTION_SCHEMA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;primaryPillar&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Courses&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Podcasts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Blog&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;difficulty&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;beginner&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;intermediate&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;advanced&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;technicalTags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;array&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;maxItems&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;oneSentenceSummary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;primaryPillar&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;difficulty&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;technicalTags&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;oneSentenceSummary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;additionalProperties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;analyzeDraftInBrowser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;markdownDraft&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;baseSession&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createBrowserPromptSession&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;systemPrompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Analyze developer tutorials for CodingCat.dev and extract structured metadata.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;baseSession&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Chrome Built-in AI (Gemini Nano) is not available on this device.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Check token budget before prompting so we never blow the context window&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tokenCost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;baseSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;measureInputUsage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;markdownDraft&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;remainingTokens&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;baseSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;inputQuota&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;baseSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;inputUsage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;boundedInput&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
      &lt;span class="nx"&gt;tokenCost&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;remainingTokens&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;markdownDraft&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;markdownDraft&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Clone the warm session so repeated runs reuse the system prompt KV cache&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;workerSession&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;baseSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clone&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rawJson&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;workerSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;`Extract metadata for this draft:\n\n&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;boundedInput&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;responseConstraint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;TAG_EXTRACTION_SCHEMA&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rawJson&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;workerSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;baseSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Streaming Key-Point Summaries with the Summarizer API
&lt;/h2&gt;

&lt;p&gt;When you specifically need TL;DR bullet points or executive summaries on a Blog Post or Podcast Episode transcript, use &lt;code&gt;window.Summarizer&lt;/code&gt; instead of the raw Prompt API. Chrome tunes the underlying LoRA / task prompt specifically for factual density:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/lib/ai/summarize-transcript.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;streamTranscriptKeyPoints&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;transcriptText&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;onChunk&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;partialMarkdown&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SummarizerApi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;globalThis&lt;/span&gt; &lt;span class="kd"&gt;as &lt;/span&gt;&lt;span class="nb"&gt;Record&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;Summarizer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;SummarizerApi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Summarizer API is not supported in this browser.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;availability&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;SummarizerApi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;availability&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;availability&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;unavailable&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Summarizer model is unavailable on this hardware.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;summarizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;SummarizerApi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;key-points&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;markdown&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;sharedContext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This is a technical software engineering tutorial from CodingCat.dev.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ReadableStream&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;summarizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;summarizeStreaming&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;transcriptText&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Focus on architectural trade-offs, browser APIs, and production benchmarks.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getReader&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;accumulated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="c1"&gt;// Handle both cumulative and delta streaming implementations across Chrome releases&lt;/span&gt;
      &lt;span class="nx"&gt;accumulated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accumulated&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;accumulated&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nf"&gt;onChunk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accumulated&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;accumulated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;summarizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;destroy&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;summarizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  AJ Pro-Tip: User Activation and Context Quotas
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;**AJ Pro-Tip: Always Gate Model Creation Behind Transient User Activation. **When &lt;code&gt;availability()&lt;/code&gt; returns &lt;code&gt;'downloadable'&lt;/code&gt;, Chrome requires a transient user gesture (such as a &lt;code&gt;click&lt;/code&gt; event) before &lt;code&gt;LanguageModel.create()&lt;/code&gt; or &lt;code&gt;Summarizer.create()&lt;/code&gt; will initiate the background weight download. Call &lt;code&gt;availability()&lt;/code&gt; on page load to render your button state, and call &lt;code&gt;create()&lt;/code&gt; inside the button's click handler while monitoring &lt;code&gt;session.inputUsage / session.inputQuota&lt;/code&gt; so long conversations never overflow Gemini Nano's local context window.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Try the Live Browser AI &amp;amp; WebMCP Playground&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You can test every pattern from this article live right now in our interactive &lt;a href="https://dev.to/demos/web-ai"&gt;&lt;strong&gt;Web AI &amp;amp; WebMCP Playground&lt;/strong&gt;&lt;/a&gt; on CodingCat.dev, or inspect our production discovery manifests on the &lt;a href="https://dev.to/developers"&gt;&lt;strong&gt;Developers &amp;amp; Agent APIs&lt;/strong&gt;&lt;/a&gt; page. If you are organizing a developer conference or engineering summit, check out my Web AI talk abstracts on &lt;a href="https://alexpatterson.dev" rel="noopener noreferrer"&gt;&lt;strong&gt;alexpatterson.dev&lt;/strong&gt;&lt;/a&gt; and explore more hands-on &lt;a href="https://dev.to/courses"&gt;&lt;strong&gt;Courses&lt;/strong&gt;&lt;/a&gt;, &lt;a href="https://dev.to/podcasts"&gt;&lt;strong&gt;Podcasts&lt;/strong&gt;&lt;/a&gt;, and &lt;a href="https://dev.to/blog"&gt;&lt;strong&gt;Blog Posts&lt;/strong&gt;&lt;/a&gt; right here on CodingCat.dev.&lt;/p&gt;

</description>
      <category>webai</category>
      <category>chromebuiltinai</category>
      <category>gemininano</category>
    </item>
    <item>
      <title>Firebase Studio: Tips and Tricks: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:43:01 +0000</pubDate>
      <link>https://dev.to/codingcatdev/firebase-studio-tips-and-tricks-web-architecture-implementation-guide-501j</link>
      <guid>https://dev.to/codingcatdev/firebase-studio-tips-and-tricks-web-architecture-implementation-guide-501j</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-05-studio-tips-tricks" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-05-studio-tips-tricks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Spinning up a full-stack web environment with cloud emulators, preview URLs, and AI-assisted scaffolding usually means hours of local Docker and environment variable wrangling. Following the announcement of &lt;strong&gt;Firebase Studio: Tips and Tricks&lt;/strong&gt; by Jess Kuras on the &lt;a href="https://firebase.blog/posts/2025/05/studio-tips-tricks/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-05-29), 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. If you’ve experimented with the preview of Firebase Studio, you likely know the basics: how to prompt the App Prototyping agent to iterate on your app idea, swap to code view to modify your code directly or debug issues, and publish your app with Firebase App Hosting. However, there are a lot of more subtle features built into Firebase Studio to make the app development lifecycle smoother and significantly quicker. This post will dive into practical tips and tricks to harness the full potential of Firebase Studio.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Firebase Studio: Tips and Tricks Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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 Studio unifies cloud workspaces, Gemini-powered prototyping agents, and one-click Firebase App Hosting deploys so you can move from an initial architecture prompt to a live SSR web app in a single browser tab.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Treat prototypes generated in Firebase Studio like any other production repo: commit your idx/dev.nix workspace configuration, lock down your environment secrets in Cloud Secret Manager, and wire up CI/CD branch previews before inviting real users.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Design your way
&lt;/h3&gt;

&lt;p&gt;They say a picture is worth a thousand words, in app design, it can save you a thousand prompts! Instead of wrestling with lengthy descriptions, why not show the App Prototyping agent exactly what you envision? Firebase Studio offers two intuitive ways to do this:&lt;/p&gt;

&lt;p&gt;While in Prototyper mode, click the **Annotate icon **to draw directly on the preview window. Use the available shape and text tools to pinpoint exactly what you want the App Prototyping agent to change. It’s a quick and effective way to communicate visual feedback.&lt;/p&gt;

&lt;p&gt;Have a wireframe, a specific color palette, or an inspirational image you want the App Prototyping agent to use as guidance? Click the **Attachment icon **to add an image to accompany your prompt. This option is available when writing your initial prompt, while iterating in Prototyper mode, or when using Gemini in Firebase in Code view.&lt;/p&gt;

&lt;h3&gt;
  
  
  Specify the element you want to change
&lt;/h3&gt;

&lt;p&gt;Tired of trying to describe which button, icon, or text block you want to change? In Prototyper mode, click the &lt;strong&gt;Select icon&lt;/strong&gt;, choose the specific element on your app’s preview, and then describe the change you want. This direct approach ensures the App Prototyping agent knows exactly what you’re referring to, saving you time and iterations.&lt;/p&gt;

&lt;h3&gt;
  
  
  When in doubt, roll back
&lt;/h3&gt;

&lt;p&gt;Sometimes the App Prototyping agent misunderstands a prompt or introduces a difficult-to-solve bug. When that happens, it’s often easier to click **Restore **on a previous version of the app to quickly return to a previous state and try again. If you change your mind, you can always swap back to the most recent version by clicking **Restore **again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Swap between Gemini models
&lt;/h3&gt;

&lt;p&gt;In Code view, Gemini in Firebase can suggest code as you type, help debug issues, answer questions about your code, and even write and modify code for you. You can configure the Gemini model that Gemini in Firebase chat uses. You have a choice of the built-in model, models configured in the chat window (including Gemini 2.5 models), or any Gemini model to which you have access. For full instructions, check the &lt;a href="https://firebase.google.com/docs/studio/set-up-gemini#byok" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Collaborate with others
&lt;/h3&gt;

&lt;p&gt;Need some help from a friend? Firebase Studio includes two ways to share your app-in-progress.&lt;/p&gt;

&lt;p&gt;For deeper collaboration like pair programming or letting a teammate test thoroughly, Firebase Studio allows you to share your workspace with anyone who has a Google Account. It’s important to remember that this gives them access to your entire workspace, including any sensitive files, such as private keys and access tokens. So, only share with trusted collaborators and be sure to coordinate your changes. Currently, there isn’t a merge conflict notification system, so simultaneous edits to the same file could lead to overwritten changes. For the full rundown and necessary precautions, head over to the &lt;a href="https://firebase.google.com/docs/studio/share-your-workspace" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Preview your app on other devices
&lt;/h3&gt;

&lt;p&gt;In both Prototyper mode and Code view, the preview window displays your web app as you make updates to it. But what if you want others to help test your app on different devices? Click *&lt;em&gt;Preview *&lt;/em&gt;&amp;gt; **Make Preview Public **to generate a QR code and URL you can share with others to open the same preview in a web browser. As you make changes to your app in Firebase Studio, those same changes appear in the shared preview.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bring it all together with Firebase Studio
&lt;/h3&gt;

&lt;p&gt;Firebase Studio is more than just its core features; it’s packed with clever capabilities designed to accelerate your app development workflow. From visually guiding the App Prototyping agent with your own drawings and images, to pinpointing specific elements for modification and easily rolling back to previous versions, you have fine-grained control over the creative process. And with the flexibility to switch Gemini models or bring in a friend (or several!) with seamless collaboration options, you’re empowered to optimize how you build.&lt;/p&gt;

&lt;p&gt;**Update **Want more tips? We’ve published a follow-up to this post called &lt;a href="https://firebase.blog/posts/2025/06/studio-tips-tricks-2" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Studio: Tips and Tricks 2&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show Me the Code: TypeScript &amp;amp; Web SDK Setup
&lt;/h2&gt;

&lt;p&gt;Here is the production baseline pattern we use at CodingCat.dev when wiring Firebase Studio: Tips and Tricks into a modern TypeScript web application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeApp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;GoogleAIBackend&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app-check&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;projectId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_PROJECT_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Protect AI endpoints in web apps with Firebase App Check&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_RECAPTCHA_SITE_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;isTokenAutoRefreshEnabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GoogleAIBackend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;geminiModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Firebase Studio: Tips and Tricks&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/kHrIyTLVerg" rel="noopener noreferrer"&gt;&lt;strong&gt;Building a web application with Next.js and Firebase - Firebase Summit 2021&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/kHrIyTLVerg" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/05/studio-tips-tricks/" rel="noopener noreferrer"&gt;Firebase Studio: Tips and Tricks on the Official Firebase Blog&lt;/a&gt; (published 2025-05-29 by Jess Kuras)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-05-whats-new-at-google-io" rel="noopener noreferrer"&gt;What's new in Firebase at I/O 2025&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-06-app-hosting-frameworks" rel="noopener noreferrer"&gt;What web frameworks does Firebase App Hosting support?&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Firebase Studio: Tips and Tricks?
&lt;/h3&gt;

&lt;p&gt;Firebase Studio: Tips and Tricks (announced 2025-05-29 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, Next.js, Serverless workloads. If you’ve experimented with the preview of Firebase Studio, you likely know the basics: how to prompt the App Prototyping agent to iterate on your app idea, swap to code view to modify your code directly or debug issues, and publish your app with Firebase App Hosting. However, there are a lot of more subtle features built into Firebase Studio to make the app development lifecycle smoother and significantly quicker. This post will dive into practical tips and tricks to harness the full potential of Firebase Studio. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/05/studio-tips-tricks/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Firebase Studio: Tips and Tricks with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/kHrIyTLVerg" rel="noopener noreferrer"&gt;&lt;strong&gt;Building a web application with Next.js and Firebase - Firebase Summit 2021&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Introducing hybrid on-device inference using Firebase AI Logic: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:42:30 +0000</pubDate>
      <link>https://dev.to/codingcatdev/introducing-hybrid-on-device-inference-using-firebase-ai-logic-web-architecture-implementation-471o</link>
      <guid>https://dev.to/codingcatdev/introducing-hybrid-on-device-inference-using-firebase-ai-logic-web-architecture-implementation-471o</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-06-hybrid-inference-firebase-ai-logic" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-06-hybrid-inference-firebase-ai-logic&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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 &lt;strong&gt;Introducing hybrid on-device inference using Firebase AI Logic&lt;/strong&gt; by Siddharth Gupta, Erik Eldridge on the &lt;a href="https://firebase.blog/posts/2025/06/hybrid-inference-firebase-ai-logic/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-06-09), 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 a powerful new experimental feature in the Firebase AI Logic client SDK for Web: hybrid on-device inference!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Introducing hybrid on-device inference using Firebase AI Logic Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;Harness the power of on-device AI models with a seamless fallback to cloud-hosted models&lt;/p&gt;

&lt;p&gt;This ensures your generative AI-powered features are always available to your users, online or offline.&lt;/p&gt;

&lt;p&gt;Chrome on Desktop supports Gemini Nano, a powerful on-device model that can be downloaded and hosted in the browser on-demand. Running AI models directly on a user’s device offers some great advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enhanced privacy: Sensitive data can stay right on the user’s device.&lt;/li&gt;
&lt;li&gt;Offline availability: Your app’s AI features can work even without an internet connection.&lt;/li&gt;
&lt;li&gt;Cost savings: On-device inference is available at no cost, reducing your application’s operational expenses.&lt;/li&gt;
&lt;li&gt;On-device performance: You can often get high performance thanks to hardware acceleration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can build AI features that utilize all these advantages of an on-device model, but then fallback to a cloud-hosted model when its capabilities are needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  On-Device and In-Cloud Inference
&lt;/h3&gt;

&lt;p&gt;The Firebase AI Logic client SDK for Web has a hybrid on-device extension that uses the &lt;a href="https://github.com/webmachinelearning/prompt-api/" rel="noopener noreferrer"&gt;&lt;strong&gt;proposed W3C Prompt API&lt;/strong&gt;&lt;/a&gt; for on-device model capabilities. It uses built-in, on-device models (like Gemini Nano in Chrome) when it’s available. If that’s not an option on a particular device or browser, the SDK falls back to using Gemini models on the server. This maximizes your reach, ensuring that your users can access your AI features, regardless of their device capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  How it works
&lt;/h3&gt;

&lt;p&gt;Using hybrid on-device inference is straightforward. The Firebase AI Logic client SDK for Web automatically handles the logic of checking for on-device model availability and falling back to a cloud-hosted model if necessary.&lt;/p&gt;

&lt;p&gt;Here’s a look at how you can implement hybrid inference in your web app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Initialize the Gemini Developer API backend service&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;

&lt;span class="c1"&gt;// Create a `GenerativeModel` instance&lt;/span&gt;
&lt;span class="c1"&gt;// Set the mode, for example to use on-device model when possible&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;

&lt;span class="c1"&gt;// run inference and log result&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This implementation is almost identical to a regular &lt;code&gt;getGenerativeModel&lt;/code&gt; &lt;a href="https://firebase.google.com/docs/ai-logic/generate-text?api=vertex#text-in-text-out" rel="noopener noreferrer"&gt;&lt;strong&gt;call&lt;/strong&gt;&lt;/a&gt;, but with the addition of the mode parameter that sets how you want to access a model. The SDK takes care of the rest!&lt;/p&gt;

&lt;p&gt;Furthermore, you can also configure this code to always use either an on-device or cloud-hosted model for inference by switching the &lt;code&gt;mode\&lt;/code&gt; parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Run inference only on device. Does not fallback to cloud-hosted models.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;

&lt;span class="c1"&gt;// Run inference only on the cloud-hosted models.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’re curious, you can **try out our demo **and view the &lt;a href="https://github.com/GoogleChromeLabs/web-ai-demos/tree/main/firebase-ai-logic" rel="noopener noreferrer"&gt;&lt;strong&gt;codebase&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Introducing hybrid on-device inference using Firebase AI Logic&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N25khadfUag" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/06/hybrid-inference-firebase-ai-logic/" rel="noopener noreferrer"&gt;Introducing hybrid on-device inference using Firebase AI Logic on the Official Firebase Blog&lt;/a&gt; (published 2025-06-09 by Siddharth Gupta, Erik Eldridge)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-06-dataconnect-transactions" rel="noopener noreferrer"&gt;Transactions Updates for Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-06-fueld-ai-app-coach" rel="noopener noreferrer"&gt;Fueld.AI's nutrition coach with Firebase and Google Cloud&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Introducing hybrid on-device inference using Firebase AI Logic?
&lt;/h3&gt;

&lt;p&gt;Introducing hybrid on-device inference using Firebase AI Logic (announced 2025-06-09 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, TypeScript workloads. The Firebase team announced a powerful new experimental feature in the Firebase AI Logic client SDK for Web: hybrid on-device inference! Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/06/hybrid-inference-firebase-ai-logic/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Introducing hybrid on-device inference using Firebase AI Logic with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>It’s graduation day for the Firebase MCP Server: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:42:29 +0000</pubDate>
      <link>https://dev.to/codingcatdev/its-graduation-day-for-the-firebase-mcp-server-web-architecture-implementation-guide-7m6</link>
      <guid>https://dev.to/codingcatdev/its-graduation-day-for-the-firebase-mcp-server-web-architecture-implementation-guide-7m6</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-10-firebase-mcp-server-ga" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-10-firebase-mcp-server-ga&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have ever watched an AI coding agent hallucinate deprecated Firebase v8 syntax or deploy wide-open Firestore rules, you know that raw LLM prompts are not enough for production backends. Following the announcement of &lt;strong&gt;It’s graduation day for the Firebase MCP Server&lt;/strong&gt; by Kara Yu on the &lt;a href="https://firebase.blog/posts/2025/10/firebase-mcp-server-ga/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-10-08), 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. Update: Gemini CLI has transitioned to Antigravity CLI.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why It’s graduation day for the Firebase MCP Server Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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? Instead of relying on stale training weights, wiring up the Model Context Protocol (MCP) and structured Firebase agent skills gives your IDE or CLI direct, schema-aware tools to provision resources, inspect security rules, and run deterministic CLI deployments.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Never let an autonomous coding agent push Firestore or Data Connect rules straight to production without a gate. Always require the agent to run your test suite against the Firebase Local Emulator Suite first, and audit every generated rule for strict request.auth.uid ownership checks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;p&gt;If you previously installed the Firebase extension for Gemini CLI, you can migrate it to Antigravity CLI using the instructions in &lt;a href="https://firebase.google.com/docs/ai-assistance/gcli-extension" rel="noopener noreferrer"&gt;&lt;strong&gt;Migrate the Firebase extension from Gemini CLI to Antigravity CLI&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For more details about the sunset, see the &lt;a href="https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/" rel="noopener noreferrer"&gt;&lt;strong&gt;transition announcement&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;At Google I/O in May, we launched an experimental &lt;a href="https://firebase.blog/posts/2025/05/firebase-mcp-server/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Model Context Protocol (MCP) server&lt;/strong&gt;&lt;/a&gt; to &lt;strong&gt;help AI agents understand and manage your Firebase project, resources, and data all through natural language prompts that you provide&lt;/strong&gt;, for example, “show items in the cart collection” even “delete a document from my Firestore collection”.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://modelcontextprotocol.io/docs/getting-started/intro" rel="noopener noreferrer"&gt;&lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;&lt;/a&gt; extends the capabilities of AI tools used by millions of developers every day. By connecting to MCP servers, coding agents can directly access data and take action with integrated services. The Firebase CLI includes an MCP server to connect to your favorite IDEs and AI tools.&lt;/p&gt;

&lt;p&gt;The Firebase team made improvements to the Firebase MCP server since launch, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New MCP tools leveraging Gemini in Firebase (like &lt;code&gt;dataconnect_generate_schema&lt;/code&gt; to generate a schema for Firebase Data Connect).&lt;/li&gt;
&lt;li&gt;New MCP tools covering many more Firebase products (like Cloud Functions for Firebase and Crashlytics)&lt;/li&gt;
&lt;li&gt;More consolidated, streamlined MCP tools (like a single &lt;code&gt;validate_security_rules&lt;/code&gt; tool that can be used across Firestore, Storage, and Realtime Database).&lt;/li&gt;
&lt;li&gt;New deploy MCP prompt to deploy your web app to a Firebase hosting product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to your feedback, The Firebase team improved the quality and stability of the Firebase MCP server, and In this update, the Firebase team announced that &lt;strong&gt;the Firebase MCP server is graduating from its experimental phase.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Introducing the new Firebase extension for Gemini CLI
&lt;/h3&gt;

&lt;p&gt;Firebase is also integrating with the &lt;a href="https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemini CLI&lt;/strong&gt;&lt;/a&gt;, Google’s open-source AI agent that brings the power of Gemini models directly into your terminal. Starting today, &lt;strong&gt;Firebase has an official extension in the Gemini CLI gallery&lt;/strong&gt;, alongside many other new helpful extensions from Google (like the &lt;a href="https://github.com/flutter/gemini-cli-extension" rel="noopener noreferrer"&gt;&lt;strong&gt;Flutter extension&lt;/strong&gt;&lt;/a&gt;). This new extension &lt;strong&gt;bundles our graduated MCP server together with additional context files (custom instructions for LLMs)&lt;/strong&gt;, giving you a powerful, integrated way to work with your Firebase project, resources, and data.&lt;/p&gt;

&lt;p&gt;To get started, just type the following into your command line:&lt;/p&gt;

&lt;p&gt;the Firebase team's goal is to reduce friction in your common development tasks, whether it’s &lt;strong&gt;adding database support, deploying your app, or even adding genAI features to your app!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/firebase:init&lt;/code&gt; This command provides you options like **setting up backend services for your app and implementing genAI features that access the Gemini API. **With a single command, you can set up Firebase for your app. This command helps set up &lt;a href="https://firebase.google.com/products/firestore" rel="noopener noreferrer"&gt;&lt;strong&gt;Firestore&lt;/strong&gt;&lt;/a&gt; as your database and &lt;a href="https://firebase.google.com/products/auth" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Authentication&lt;/strong&gt;&lt;/a&gt; as a way to secure your app and your user’s data. It also helps you to deploy your app in one go! If you’re building an AI feature in your app, this command can give you a head start. It sets up &lt;a href="https://firebase.google.com/products/firebase-ai-logic" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase AI Logic&lt;/strong&gt;&lt;/a&gt; and writes the code to easily and securely access the Gemini API directly from your mobile and web apps. &lt;a href="https://firebase.blog/posts/2025/10/ai-logic-via-gemini-cli" rel="noopener noreferrer"&gt;&lt;strong&gt;Learn more here&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/firebase:deploy&lt;/code&gt; This command &lt;strong&gt;deploys your application to a Firebase hosting service regardless of whether it’s a static app or a full-stack app&lt;/strong&gt;. The prompt instructs the AI to analyze your code and choose the correct Firebase hosting service based on the app’s needs. No more decision-making or misconfigured services.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/firebase:consult&lt;/code&gt; This command &lt;strong&gt;accesses detailed up-to-date documentation for the Firebase platform&lt;/strong&gt;. Just ask a question and the model will find an answer grounded in the latest Firebase documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All these commands work with existing Firebase projects. But if you’re new to Firebase, don’t worry! All these commands can also help you set up Firebase in your app from scratch!&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use Gemini CLI to build your Firebase app?
&lt;/h3&gt;

&lt;p&gt;You spend a large portion of your time in the terminal. This new Firebase extension for Gemini CLI is a step towards giving your Gemini CLI environment a practical, working understanding of Firebase.&lt;/p&gt;

&lt;p&gt;The exciting part is that we’ve really improved how well your coding agent handles complex, long-running tasks. Things like setting up a new database or deploying an app have always been tricky because they take time and often need your approval at certain steps. The new commands in the Gemini CLI extension are designed to manage that entire process, from creating resources to managing them, and even cleaning them up if needed.&lt;/p&gt;

&lt;p&gt;the Firebase team's goal is to make this a helpful, low-friction way to bring AI-assisted development into your daily flow. It’s not going to solve every problem, but we think it can make these specific setup and deployment tasks a lot smoother.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show Me the Code: TypeScript &amp;amp; Web SDK Setup
&lt;/h2&gt;

&lt;p&gt;Here is the production baseline pattern we use at CodingCat.dev when wiring It’s graduation day for the Firebase MCP Server into a modern TypeScript web application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeApp&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;GoogleAIBackend&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firebase/app-check&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;projectId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_FIREBASE_PROJECT_ID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Protect AI endpoints in web apps with Firebase App Check&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;initializeAppCheck&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ReCaptchaEnterpriseProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NEXT_PUBLIC_RECAPTCHA_SITE_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;isTokenAutoRefreshEnabled&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;GoogleAIBackend&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;geminiModel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gemini-2.5-flash&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;It’s graduation day for the Firebase MCP Server&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N25khadfUag" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2025/10/firebase-mcp-server-ga/" rel="noopener noreferrer"&gt;It’s graduation day for the Firebase MCP Server on the Official Firebase Blog&lt;/a&gt; (published 2025-10-08 by Kara Yu)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-10-ai-logic-via-gemini-cli" rel="noopener noreferrer"&gt;Add AI features to your app using Gemini CLI and Firebase AI Logic&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2025-10-privacy-first-on-device-ai" rel="noopener noreferrer"&gt;Smart photo organization through privacy-first, on-device AI&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in It’s graduation day for the Firebase MCP Server?
&lt;/h3&gt;

&lt;p&gt;It’s graduation day for the Firebase MCP Server (announced 2025-10-08 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, MCP workloads. Update: Gemini CLI has transitioned to Antigravity CLI. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/10/firebase-mcp-server-ga/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use It’s graduation day for the Firebase MCP Server with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Firestore levels up: Bringing the power of search and JOINs to NoSQL in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Sat, 31 Oct 2026 14:41:33 +0000</pubDate>
      <link>https://dev.to/codingcatdev/firestore-levels-up-bringing-the-power-of-search-and-joins-to-nosql-in-firebase-web-architecture-111p</link>
      <guid>https://dev.to/codingcatdev/firestore-levels-up-bringing-the-power-of-search-and-joins-to-nosql-in-firebase-web-architecture-111p</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2026-04-firestore-pipelines-ga" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2026-04-firestore-pipelines-ga&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For years, choosing Firebase meant trading away relational SQL joins, strict foreign keys, and pgvector similarity search in favor of NoSQL document denormalization. Following the announcement of &lt;strong&gt;Firestore levels up: Bringing the power of search and JOINs to NoSQL&lt;/strong&gt; by Morgan Chen, Minh Nguyen on the &lt;a href="https://firebase.blog/posts/2026/04/firestore-pipelines-ga/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2026-04-27), 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. In November Previously, the Firebase team announced pipeline operations on Firestore enterprise edition in public preview. This launch brought Firestore’s query configurability and capabilities closer to the capabilities of relational databases like PostgreSQL, while maximizing Firestore’s NoSQL data model, differentiated serverless architecture, built-in real-time sync and embedded offline querying. For example, this launch gave developers granular control over when to create an index to improve performance, as well as the ability to create complex multi-stage queries that weren’t possible in Firestore previously. At Next, pipeline operations graduated to general availability, and with it Firebase is adding several major heavily-requested queries: full text search, geospatial queries, JOIN capabilities via subqueries, and data manipulation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Firestore levels up: Bringing the power of search and JOINs to NoSQL Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;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 Data Connect bridges that gap by pairing a managed Google Cloud SQL for PostgreSQL instance with a declarative GraphQL schema compiler that automatically generates type-safe TypeScript, React, and Angular SDKs alongside server-enforced &lt;a class="mentioned-user" href="https://dev.to/auth"&gt;@auth&lt;/a&gt; directives.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Keep your authorization logic inside your Data Connect GraphQL operations using &lt;a class="mentioned-user" href="https://dev.to/auth"&gt;@auth&lt;/a&gt;(level: USER) and server-evaluated expressions like auth.uid and request.time rather than trusting client-supplied user IDs in query variables.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works: Technical Breakdown &amp;amp; Implementation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Full text search and geospatial queries (in public preview)
&lt;/h3&gt;

&lt;p&gt;Firestore now provides built-in support for full-text search, which allows you to use familiar search query syntax like that of google.com to retrieve relevant Firestore documents. Unlike traditional queries, search queries use special text indexes that tokenize fields in your document. These indexes are then utilized to perform a relevancy search using Google’s best-in-class models, and a search relevance score is appended to the documents returned, allowing you to sort documents by relevance. As an example, suppose you’re the CTO of a company and you want an in-house database of vetted agent skills to provide to employees for security reasons. Your data model might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"
    "&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"
    "&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"
  },
  "&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"
  "&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You want your agent skills to be discoverable both via a human-browsable marketplace landing page as well as via another agent skill for finding and installing skills. You can combine Firestore’s search with other pipeline filters to produce a narrow list of results ranked by relevance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt;

  &lt;span class="c1"&gt;// Run the full text search. This must occur before other pipeline stages.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="c1"&gt;// Example query: "\"iOS\" docs generation"&lt;/span&gt;
    &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="c1"&gt;// Add the relevance score to the document for ranking later.&lt;/span&gt;
    &lt;span class="nx"&gt;addFields&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="nx"&gt;score&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;

  &lt;span class="c1"&gt;// Narrow results down to just what the user can use.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;

  &lt;span class="c1"&gt;// Order by relevance score.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Firestore’s native full-text search provides a number of benefits over third-party search providers or even PostgreSQL’s native search solution. Furthermore, it allows you to run search queries in conjunction with other pipeline stages, automatically handling synonyms, spelling errors, and even difficult-to-handle search languages like traditional Chinese naturally without any plugins. It also uses a familiar search syntax that feels similar to google.com’s search syntax, meaning you don’t need to transform user input much before passing it to Firestore. In this case, combining the Firestore search stage with the two other &lt;code&gt;where&lt;/code&gt; filters would allow you to both order by relevance based on the &lt;code&gt;skills.md&lt;/code&gt; content and filter only skills compatible with your user’s local environment.&lt;/p&gt;

&lt;p&gt;We’ve also added geospatial queries so that you can create location-aware applications. For example, you can query geographical coordinates by user proximity, sorting them by their distance to a specified location:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Find restaurants with "waffles" on the menu, but order the results&lt;/span&gt;
&lt;span class="c1"&gt;// only by distance to a query point.&lt;/span&gt;
&lt;span class="nx"&gt;firestore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
    &lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
      &lt;span class="p"&gt;.&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since these are new major features, they’re available in preview while the rest of pipelines are GA.&lt;/p&gt;

&lt;h3&gt;
  
  
  Subqueries: Joins, but better
&lt;/h3&gt;

&lt;p&gt;With Next’s GA release The Firebase team added a feature called subqueries, allowing you to write queries that combine two arbitrary pipelines into a single pipeline. This means that, for example, if you have a collection of restaurants and a subcollection of reviews:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Restaurant&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"
  "&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;

  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Review&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;(subcollection)&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"
    "&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You could write a query to aggregate each restaurant’s average rating into a single field per restaurant:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="nx"&gt;subcollection&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="c1"&gt;// Convert the subquery to a scalar value in the parent query.&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;
      &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use this feature to join documents from separate collections together within a pipeline by subquerying the collection you’d like to join and then passing it as a map into the document of the parent query’s collection, for example if you wanted to display a preview of a restaurant’s reviews under a restaurant thumbnail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="nx"&gt;average&lt;/span&gt;
    &lt;span class="nx"&gt;count&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting document would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;
  &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;
    &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;
  }
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Data manipulation language (DML)
&lt;/h3&gt;

&lt;p&gt;Have you ever written a Firestore pipeline query and decided you wanted to pipe the output of that query into some kind of update operation? Maybe you’re building a restaurant finder application and you want to add food categories to your app, requiring you to backfill a new field across every document that doesn’t already have it defined. Now you can do this directly within Firestore.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DML is a set of pipeline stages that allow you to perform updates and deletes, so now you can make granular adjustments to your database fully within Firestore using the expressive pipeline operations to describe exactly which documents should be affected. Calling the &lt;code&gt;update()&lt;/code&gt; function will merge the added field back into the document, persisting the value added by &lt;code&gt;addFields()&lt;/code&gt;. Paired with the &lt;code&gt;exists()&lt;/code&gt; check, this code conditionally adds fields only if they don’t exist. As this example shows, combining DML with other pipeline operations is an effective way to update entire collections of documents within Firestore without having to spin up a Cloud Function or other external service.&lt;/p&gt;

&lt;p&gt;DML launched last week with updates and deletes, with inserts and transactions coming soon.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s next for Firestore?
&lt;/h3&gt;

&lt;p&gt;After many years of waiting and many words on updates to the internals of Firestore, the queries you have been requesting from launch are now finally here for you to use. With these changes, we have achieved a major milestone in bringing Firestore to query feature parity with other major relational databases like PostgreSQL. Now, when you’re choosing a database for your new project, you no longer have to worry that Firestore’s queries won’t support an app feature you want to build.&lt;/p&gt;

&lt;p&gt;Thanks for your patience, and we hope you continue to enjoy Firestore. As always, you can read more about search, DML, and subqueries as well as our &lt;a href="https://g.dev/firebase/firestore-enterprise-quickstart" rel="noopener noreferrer"&gt;&lt;strong&gt;getting started guide&lt;/strong&gt;&lt;/a&gt; in the Firebase documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production Web Architecture &amp;amp; Security Checklist
&lt;/h2&gt;

&lt;p&gt;Whether we are deploying on &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;, Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Enforce Firebase App Check &amp;amp; Attestation: **Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using &lt;a href="https://firebase.google.com/docs/app-check" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Check with reCAPTCHA Enterprise&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;**Validate Locally with the Firebase Emulator Suite: **Run deterministic integration tests against local Firestore, Auth, Functions, and Data Connect PostgreSQL emulators before promoting schema or rule changes to production.&lt;/li&gt;
&lt;li&gt;**Keep Server &amp;amp; Client Boundaries Type-Safe: **Use the modular Firebase Web SDK and generated TypeScript bindings so SSR frameworks like Next.js, Astro, SvelteKit, and Angular serialize state cleanly without hydration flickers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Accelerate your full-stack web and AI development by pairing &lt;strong&gt;Firestore levels up: Bringing the power of search and JOINs to NoSQL&lt;/strong&gt; with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://www.linkedin.com/company/codingcatdev" rel="noopener noreferrer"&gt;&lt;strong&gt;LinkedIn (CodingCat.dev)&lt;/strong&gt;&lt;/a&gt; how you are using Firebase in your stack, and subscribe to the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt; so you don't miss what we build next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch Our Related Firebase Video Tutorial on YouTube
&lt;/h2&gt;

&lt;p&gt;Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt; below, and make sure to &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;Subscribe to CodingCat.dev on YouTube&lt;/strong&gt;&lt;/a&gt; for weekly full-stack web and AI deep dives:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/N25khadfUag" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources, Official Docs &amp;amp; Related CodingCat.dev Guides
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Primary Release Source: *&lt;/em&gt;&lt;a href="https://firebase.blog/posts/2026/04/firestore-pipelines-ga/" rel="noopener noreferrer"&gt;Firestore levels up: Bringing the power of search and JOINs to NoSQL on the Official Firebase Blog&lt;/a&gt; (published 2026-04-27 by Morgan Chen, Minh Nguyen)&lt;/li&gt;
&lt;li&gt;*&lt;em&gt;Official Firebase Documentation: *&lt;/em&gt;&lt;a href="https://firebase.google.com/docs/web/setup" rel="noopener noreferrer"&gt;Firebase Developer Docs &amp;amp; Web SDK Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2026-04-cloud-next-2026-announcements" rel="noopener noreferrer"&gt;What’s new from Firebase at Cloud Next 2026&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/post/firebase-2026-04-whats-new-sql-connect" rel="noopener noreferrer"&gt;Realtime PostgreSQL: From Data Connect to SQL Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/firebase-sql-with-data-connect" rel="noopener noreferrer"&gt;Firebase SQL with Data Connect&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Related on CodingCat.dev: &lt;a href="https://codingcat.dev/podcast/build-a-custom-no-code-app-in-90-minutes" rel="noopener noreferrer"&gt;Build a Custom No-Code App in 90 Minutes&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the key capabilities introduced in Firestore levels up: Bringing the power of search and JOINs to NoSQL?
&lt;/h3&gt;

&lt;p&gt;Firestore levels up: Bringing the power of search and JOINs to NoSQL (announced 2026-04-27 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, SQL, Security, Serverless workloads. In November Previously, the Firebase team announced pipeline operations on Firestore enterprise edition in public preview. This launch brought Firestore’s query configurability and capabilities closer to the capabilities of relational databases like PostgreSQL, while maximizing Firestore’s NoSQL data model, differentiated serverless architecture, built-in real-time sync and embedded offline querying. For example, this launch gave developers granular control over when to create an index to improve performance, as well as the ability to create complex multi-stage queries that weren’t possible in Firestore previously. At Next, pipeline operations graduated to general availability, and with it Firebase is adding several major heavily-requested queries: full text search, geospatial queries, JOIN capabilities via subqueries, and data manipulation. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2026/04/firestore-pipelines-ga/" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase Blog&lt;/strong&gt;&lt;/a&gt; alongside our implementation patterns and production checklist above.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do web developers use Firestore levels up: Bringing the power of search and JOINs to NoSQL with Next.js, SvelteKit, React, or Angular?
&lt;/h3&gt;

&lt;p&gt;Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and &lt;a href="https://firebase.google.com/docs/app-hosting" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase App Hosting&lt;/strong&gt;&lt;/a&gt;. 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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I watch video tutorials on Firebase Web and AI development?
&lt;/h3&gt;

&lt;p&gt;You can watch our hands-on Firebase video walkthroughs on the &lt;a href="https://www.youtube.com/@CodingCatDev?sub_confirmation=1" rel="noopener noreferrer"&gt;&lt;strong&gt;CodingCat.dev YouTube Channel&lt;/strong&gt;&lt;/a&gt;, including &lt;a href="https://youtu.be/N25khadfUag" rel="noopener noreferrer"&gt;&lt;strong&gt;Firebase SQL with Data Connect&lt;/strong&gt;&lt;/a&gt;, and follow us on &lt;a href="https://x.com/CodingCatDev" rel="noopener noreferrer"&gt;&lt;strong&gt;X (@CodingCatDev)&lt;/strong&gt;&lt;/a&gt; for weekly full-stack tutorials.&lt;/p&gt;

</description>
      <category>firebase</category>
      <category>googlecloud</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
