<?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: CodingCatDev</title>
    <description>The latest articles on DEV Community by CodingCatDev (codingcatdev).</description>
    <link>https://dev.to/codingcatdev</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%2Forganization%2Fprofile_image%2F1009%2F2fc50a89-ad8f-44bb-b003-58f17cefd425.png</url>
      <title>DEV Community: CodingCatDev</title>
      <link>https://dev.to/codingcatdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codingcatdev"/>
    <language>en</language>
    <item>
      <title>Writing SQL in SQL Connect in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:42:54 +0000</pubDate>
      <link>https://dev.to/codingcatdev/writing-sql-in-sql-connect-in-firebase-web-architecture-implementation-guide-8fl</link>
      <guid>https://dev.to/codingcatdev/writing-sql-in-sql-connect-in-firebase-web-architecture-implementation-guide-8fl</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2026-03-fdc-native-sql" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2026-03-fdc-native-sql&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;Writing SQL in SQL Connect&lt;/strong&gt; by Cynthia Wang on the &lt;a href="https://firebase.blog/posts/2026/03/fdc-native-sql/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2026-03-24), 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 Writing SQL in SQL Connect Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect 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;Data Connect (now SQL Connect) is our comprehensive PostgreSQL solution, designed to let you build secure, scalable apps backed by Cloud SQL. Instead of writing and maintaining a traditional backend, you define your schema and operations using a declarative syntax based on GraphQL. This approach gives you strict type safety, relation resolution, and custom directives for common features like Firebase Auth right out of the box, without the hassle of having to write your own resolvers.&lt;/p&gt;

&lt;p&gt;However, there are times when you really want the flexibility and power of SQL. When you hit advanced use cases, like window functions, geospatial indexing, or complex atomic operations, shoehorning these SQL operations into GraphQL types becomes much more difficult.&lt;/p&gt;

&lt;p&gt;That’s why The Firebase team announced &lt;a href="https://g.dev/firebase/data-connect-native-sql-guide" rel="noopener noreferrer"&gt;&lt;strong&gt;Native SQL for Data Connect&lt;/strong&gt;&lt;/a&gt;. It provides direct access to your database, bridging the gap between FDC’s features and raw SQL operations, so you can write the exact statements you need.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is native SQL?
&lt;/h3&gt;

&lt;p&gt;Native SQL is a feature in Data Connect that lets you define operations using raw SQL syntax while still benefiting from Data Connect’s other features like Firebase integrations and auto-generated SDKs.&lt;/p&gt;

&lt;p&gt;Instead of letting Data Connect generate SQL based on your operations, you can provide the SQL commands directly into your standard&lt;code&gt;.gql&lt;/code&gt; operation files. Because these statements are predefined in the backend, clients cannot modify them on the fly. This allows you to execute your operations securely without having to worry about SQL injections.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does it work?
&lt;/h3&gt;

&lt;p&gt;Native SQL is implemented via new root fields on the &lt;code&gt;query&lt;/code&gt; and &lt;code&gt;mutation&lt;/code&gt; types within Data Connect. You define named operations in your operation&lt;code&gt;.gql&lt;/code&gt; files using these fields, passing your raw SQL string and a list of parameters. (See &lt;a href="https://g.dev/firebase/data-connect-native-sql-guide" rel="noopener noreferrer"&gt;&lt;strong&gt;docs&lt;/strong&gt;&lt;/a&gt; for more details).&lt;/p&gt;

&lt;p&gt;When you run &lt;code&gt;firebase deploy --only dataconnect&lt;/code&gt;, the FDC CLI compiles these operations, validates the SQL string as a static literal, and rejects forbidden commands like Data Definition Language (DDL). At runtime, the client invokes the named operation. The FDC server securely binds the parameters to the pre-deployed SQL template and executes the query against the Cloud SQL PostgreSQL database.&lt;/p&gt;

&lt;p&gt;Used exclusively for Data Query Language (DQL). The deploy-time validation will block DML statements here.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;_select&lt;/strong&gt;: Executes a query expecting zero or more rows. Returns &lt;code&gt;[Any]&lt;/code&gt; (a JSON array).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;_selectFirst&lt;/strong&gt;: Executes a query expecting exactly one row. Returns &lt;code&gt;Any&lt;/code&gt; (a JSON object or null).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s implement these concepts using a social forum app. This first query uses PostgreSQL’s &lt;code&gt;HAVING&lt;/code&gt; clause to filter grouped post tags, a complex aggregation standard syntax would have difficulty expressing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="c"&gt;# Finds trending tags that have a high average view count.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="k"&gt;query&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;_select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
      &lt;/span&gt;&lt;span class="n"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tag_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AVG&lt;/span&gt;&lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;avg_views&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;post_count&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;GROUP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tag_name&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;HAVING&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$1&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;ORDER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;avg_views&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DESC&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="n"&gt;params&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="n"&gt;minAvgViews&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Used for Data Manipulation Language (DML) such as &lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, and &lt;code&gt;DELETE&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;_execute&lt;/strong&gt;: Executes a DML statement returning the result count as an &lt;code&gt;Int&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;_executeReturning&lt;/strong&gt;: Executes a DML statement with a &lt;code&gt;RETURNING&lt;/code&gt; clause for multiple rows, returning &lt;code&gt;[Any]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;_executeReturningFirst&lt;/strong&gt;: Executes a DML statement returning a single row as &lt;code&gt;Any&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This mutation bulk-updates an author’s drafts in a single command, manipulating massive amounts of data without having to fetch it to the client first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="c"&gt;# Automatically archive drafts that haven't been touched in a year.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;_execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
      &lt;/span&gt;&lt;span class="n"&gt;UPDATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;SET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;status&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="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;archived&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;status&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="err"&gt;'&lt;/span&gt;&lt;span class="n"&gt;draft&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;last_updated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$1&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="n"&gt;params&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="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;cutoffDate&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;span class="err"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Native SQL prevents SQL injection and unauthorized access by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Server-controlled SQL: **SQL statements are hardcoded in the deployed&lt;code&gt;.gql&lt;/code&gt; files. The client cannot send arbitrary SQL at runtime.&lt;/li&gt;
&lt;li&gt;**Deploy-time validation: **FDC validates SQL strings during deployment and rejects destructive commands.&lt;/li&gt;
&lt;li&gt;**Strict parameterization: **Inputs are passed via a &lt;code&gt;params&lt;/code&gt; array and bound to positional placeholders (&lt;code&gt;$1&lt;/code&gt;, &lt;code&gt;$2&lt;/code&gt;) by the database driver. The SQL string is never concatenated with unvetted inputs.&lt;/li&gt;
&lt;li&gt;**Server-side context injection: **You can inject trusted server state into your parameters using the &lt;code&gt;_expr&lt;/code&gt; directive. For example, &lt;code&gt;{_expr: "auth.uid"}&lt;/code&gt; is resolved server-side to the authenticated user’s ID before execution, preventing client-side spoofing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What can you do with native SQL (that you couldn’t before)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;**Direct DML: **Run &lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, and &lt;code&gt;DELETE&lt;/code&gt; operations without relying strictly on generated FDC mutations.&lt;/li&gt;
&lt;li&gt;**Multi-step execution with Common Table Expressions: **The &lt;code&gt;_execute&lt;/code&gt; field allows you to write multi-step sql using CTEs (&lt;code&gt;WITH&lt;/code&gt; keyword) to chain multiple operations together.&lt;/li&gt;
&lt;li&gt;**Complex aggregations and window functions: **Execute statements using &lt;code&gt;RANK()&lt;/code&gt;, &lt;code&gt;PARTITION BY&lt;/code&gt;, or deeply nested subqueries.&lt;/li&gt;
&lt;li&gt;**Flexible return structures: **You no longer need to write boilerplate GraphQL types in &lt;code&gt;schema.gql&lt;/code&gt; just to return the result of a custom aggregation or window function.&lt;/li&gt;
&lt;li&gt;**Postgres extensions: **Directly query extensions like PostGIS for spatial data without mapping complex geometry types into the GraphQL schema.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a comprehensive list, see the &lt;a href="https://g.dev/firebase/data-connect-native-sql-guide" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Difference from @view
&lt;/h3&gt;

&lt;p&gt;While native SQL provides SQL’s execution flexibility and dynamic JSON returns, there are times when you want the strict type-safety of a standard Data Connect object in addition to the ability to write complex SQL expressions.&lt;/p&gt;

&lt;p&gt;For these scenarios, Data Connect also offers the &lt;code&gt;@view&lt;/code&gt; directive, which you can use in read-only contexts. By applying &lt;code&gt;@view&lt;/code&gt; to an &lt;code&gt;OBJECT&lt;/code&gt; type in your &lt;code&gt;schema.gql&lt;/code&gt;, you can back that specific type with a custom &lt;code&gt;SELECT&lt;/code&gt; statement. This allows you to encapsulate complex database logic on the server while keeping your client-side code strictly typed.&lt;/p&gt;

&lt;p&gt;Data Connect maps the GraphQL fields on your &lt;code&gt;@view&lt;/code&gt; type to the columns returned by your SQL statement. Also, your scalar fields (written in &lt;code&gt;camelCase&lt;/code&gt;) must match the SQL columns (written in &lt;code&gt;snake_case&lt;/code&gt;) in your &lt;code&gt;SELECT&lt;/code&gt; statement.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;author_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;total_posts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;total_network_views&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;GROUP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&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="n"&gt;authorId&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
  &lt;/span&gt;&lt;span class="n"&gt;totalPosts&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
  &lt;/span&gt;&lt;span class="n"&gt;totalNetworkViews&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;**sql: **The native SQL &lt;code&gt;SELECT&lt;/code&gt; statement used as the basis for this type.&lt;/li&gt;
&lt;li&gt;**name: **The name of a pre-existing SQL view in your Postgres database (cannot be used alongside the &lt;code&gt;sql&lt;/code&gt; argument).&lt;/li&gt;
&lt;li&gt;**singular / plural: **Configures the naming conventions in your generated API.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because views are integrated into your schema, they carry a few specific rules that differ from native SQL:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Read-only: **Only &lt;code&gt;SELECT&lt;/code&gt; statements are permitted. Views cannot be mutated directly.&lt;/li&gt;
&lt;li&gt;**No primary keys: **SQL views do not have primary keys, meaning direct key-based lookups (e.g., &lt;code&gt;authorStats(id: ...)&lt;/code&gt;) are not supported.&lt;/li&gt;
&lt;li&gt;**Nullable fields: **All fields on a &lt;code&gt;@view&lt;/code&gt; type should generally be declared as nullable. If a field lacks a corresponding column in the SQL result, it will safely return null.&lt;/li&gt;
&lt;li&gt;**No inbound references: **Other &lt;code&gt;@table&lt;/code&gt; or &lt;code&gt;@view&lt;/code&gt; types cannot use &lt;code&gt;@ref&lt;/code&gt; to point to a view. (However, a view can contain a &lt;code&gt;@ref&lt;/code&gt; pointing out to a base &lt;code&gt;@table&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;**Runtime validation: **As with native SQL, Data Connect does not parse or validate the SQL string inside a &lt;code&gt;@view&lt;/code&gt; during deployment. Meaning that errors in your SQL, as well as mismatches between columns and fields will only surface at runtime, so always test your view queries.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When to use which FDC approach
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;**When to use native GraphQL: **For standard CRUD operations, simple joins, and when you rely heavily on strict end-to-end type safety in your client application (e.g., fetching a basic profile or some list of arbitrary statistics).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;query&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;author&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;id&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;span class="n"&gt;id&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;published_posts&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="n"&gt;title&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;views&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="n"&gt;followers&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="n"&gt;username&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;span class="err"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;**When to use @view: **When you have a stable, read-only SQL query and you want the client to have a strictly typed object for the result. A &lt;code&gt;@view&lt;/code&gt; is ideal here because the author leaderboard’s SQL structure is stable and predictable.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;type&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SUM&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;total_network_views&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;GROUP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;ORDER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;total_network_views&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DESC&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="n"&gt;authorId&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
  &lt;/span&gt;&lt;span class="n"&gt;totalNetworkViews&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="n"&gt;query&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;topAuthors&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="n"&gt;authorId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;totalNetworkViews&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="err"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;**When to use Native SQL: **For complex aggregations, window functions, specialized PostgreSQL operators, or multi-step SQL using CTEs (&lt;code&gt;WITH&lt;/code&gt; clauses). It’s also for any operations that don’t map cleanly to your schema or where defining the exact return type in the schema is unnecessary overhead. For example, the query below uses SQL to calculate a rolling view average on the fly using the &lt;code&gt;AVG() OVER&lt;/code&gt; window function.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;query&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;_select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
      &lt;/span&gt;&lt;span class="n"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;AVG&lt;/span&gt;&lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;OVER&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="n"&gt;PARTITION&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="n"&gt;ORDER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;published_at&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DESC&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="n"&gt;ROWS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BETWEEN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;4&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;PRECEDING&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CURRENT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ROW&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="n"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;rolling_avg_views&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&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;$1&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;ORDER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;published_at&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DESC&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;LIMIT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;5&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="n"&gt;params&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="n"&gt;authorId&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;**When to use native GraphQL: **Standard inserts and updates. This is also a more direct path as FDC’s auto-generated resolvers provide a stable, boilerplate-free approach for data manipulation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;post_insert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&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="n"&gt;author_id_expr&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;&lt;span class="p"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;**When to use @transaction: **When executing atomic operations across multiple tables where the updates, inserts, and condition checks can be expressed sequentially using FDC’s generated mutations. FDC handles this multi-table transaction by chaining updates and relying on &lt;code&gt;@check&lt;/code&gt; directives to authorize mutations based on query results and prevent invalid states.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;reader_update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id_expr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
    &lt;/span&gt;&lt;span class="n"&gt;wallet_coins_update&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; 

  &lt;/span&gt;&lt;span class="n"&gt;author_update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;authorId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&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="n"&gt;earned_coins_update&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;}&lt;/span&gt;&lt;span class="p"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;**When to use Native SQL: **Complex conditional updates, bulk data manipulation, or enforcing very specific SQL logic that goes beyond standard CRUD capabilities. While native GraphQL offers built-in authorization (like &lt;code&gt;@auth&lt;/code&gt; and &lt;code&gt;@check&lt;/code&gt;), Native SQL gives more flexibility to write entirely custom conditional logic in your statements with row level security. We use Native SQL here to execute a precise conditional update while still maintaining security via &lt;code&gt;{_expr: "auth.uid"}&lt;/code&gt; in the &lt;code&gt;WHERE&lt;/code&gt; clause, so that authors can only update their own posts.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;_execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
      &lt;/span&gt;&lt;span class="n"&gt;UPDATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;SET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;title&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="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;id&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="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&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="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;3&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="n"&gt;params&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="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;postId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;newTitle&lt;/span&gt;&lt;span class="p"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Native SQL is also required when an atomic operation requires bulk data manipulation, complex subqueries, or chaining data within the database using Common Table Expressions (CTEs) that standard mutations cannot express. The Native SQL example below atomically deletes a user and reassigns all their posts to a system account within Postgres.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="k"&gt;mutation&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="n"&gt;_execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;sql&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; 
      &lt;/span&gt;&lt;span class="n"&gt;WITH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;deleted_user&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AS&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="n"&gt;DELETE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;id&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="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="n"&gt;RETURNING&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;id&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="n"&gt;UPDATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;posts&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;SET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&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="n"&gt;system&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="n"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;author_id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;IN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;deleted_user&lt;/span&gt;&lt;span class="p"&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="n"&gt;params&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="p"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Best practices
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;**Client-side validation: **Because data-returning Native SQL fields output the &lt;code&gt;Any&lt;/code&gt; type (JSON), the client SDK loses response type safety. You **must **validate the shape of the returned JSON in your client code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don’t use line comments&lt;/strong&gt;: Use block comments (&lt;code&gt;/* ... */&lt;/code&gt;) in your SQL strings.&lt;/li&gt;
&lt;li&gt;**Leverage context injection: **Always use &lt;code&gt;{_expr: "auth.uid"}&lt;/code&gt; or similar context markers in your &lt;code&gt;params&lt;/code&gt; array for authorization, rather than relying on the client to send user IDs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parameterize everything&lt;/strong&gt;: Never use string interpolation for data values. Always use positional parameters (&lt;code&gt;$1&lt;/code&gt;, &lt;code&gt;$2&lt;/code&gt;) linked to the &lt;code&gt;params&lt;/code&gt; array.&lt;/li&gt;
&lt;li&gt;**Please don’t use native SQL just because you don’t like GraphQL: **Don’t automatically replace standard FDC queries with Native SQL unless the SQL complexity strictly demands it. You will lose the out-of-the-box benefits of FDC’s automated relation resolution and strict client typing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What does this mean for your app?
&lt;/h3&gt;

&lt;p&gt;One of the biggest shifts with Native SQL is the intentional bypass of FDC’s strong typing. Because it returns the &lt;code&gt;Any&lt;/code&gt; type (JSON format), the FDC client-side SDK generator cannot infer strict TypeScript, Swift, Kotlin, etc. interfaces. You are trading compile-time safety for execution-time flexibility. It is essential to wrap your Native SQL calls in custom client-side validation logic to safely cast the raw JSON output.&lt;/p&gt;

&lt;p&gt;Embedding complex SQL directly means your backend performance depends entirely on your query planner’s efficiency. While standard FDC resolvers optimize lookup paths predictably, Native SQL executes exactly what you dictate. It’s generally a good idea to use Cloud SQL console’s &lt;a href="https://g.dev/cloud/sql-query-insights-fdc-native-sql" rel="noopener noreferrer"&gt;&lt;strong&gt;query insights&lt;/strong&gt;&lt;/a&gt; (&lt;code&gt;EXPLAIN ANALYZE&lt;/code&gt;) before deploying these raw queries to ensure you aren’t introducing full table scans.&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;Writing SQL in SQL Connect&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/03/fdc-native-sql/" rel="noopener noreferrer"&gt;Writing SQL in SQL Connect on the Official Firebase Blog&lt;/a&gt; (published 2026-03-24 by Cynthia Wang)&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-03-announcing-ai-studio-integration" rel="noopener noreferrer"&gt;From prompt to production: Build full-stack apps faster with Google AI Studio and 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-nextjs-adapters" rel="noopener noreferrer"&gt;Next.js Deployment Adapters: A bright future for Next.js on 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 Writing SQL in SQL Connect?
&lt;/h3&gt;

&lt;p&gt;Writing SQL in SQL Connect (announced 2026-03-24 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/2026/03/fdc-native-sql/" 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 Writing SQL in SQL Connect 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>Improve AI output with continuous improvement in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:42:46 +0000</pubDate>
      <link>https://dev.to/codingcatdev/improve-ai-output-with-continuous-improvement-in-firebase-web-architecture-implementation-guide-i2g</link>
      <guid>https://dev.to/codingcatdev/improve-ai-output-with-continuous-improvement-in-firebase-web-architecture-implementation-guide-i2g</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2026-01-continuous-improvement" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2026-01-continuous-improvement&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;Improve AI output with continuous improvement&lt;/strong&gt; by Alexander Nohe, Dan Gruhl on the &lt;a href="https://firebase.blog/posts/2026/01/continuous-improvement/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2026-01-13), 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. Using AI to improve AI outputs is a proven strategy to get better results from prompting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Improve AI output with continuous improvement Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect 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;Getting better outputs from AI can be tough without any intervention. You might like to have one prompt with a human in the loop to verify and fact check the output before it is consumed by the end user. Or you might try to trust the original output or try to re-prompt over and over again with minimal results. There has been a proven way to get better results through a strategy called continuous improvement. Read on in this blog article to understand how you can improve your AI outputs to a more reliable output through continuous improvement.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is continuous improvement?
&lt;/h3&gt;

&lt;p&gt;Continuous improvement is a way to prompt the AI through automated means or through a human in the loop system. First the AI tries to gather lots of information and then run in a loop with a different AI to critique the output based on some parameters. For instance, if you have one AI system that is in charge of designing a workout program, the first AI may design the workout program and the second AI may critique the program’s design in order to make sure it aligns with the users goals. Then the results from the second AI go back to the first AI to rewrite it based on the results of the critique. Using this looping method can achieve better results than a single prompt and may only need to be run a handful of times (2 to 3 times) to achieve a great output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using a LoopAgent for continuous improvement
&lt;/h3&gt;

&lt;p&gt;To demonstrate how to achieve continuous improvement, we are going to use the ADK as an example. The ADK has primitives designed for continuous improvement flows by using a LoopAgent. With the LoopAgent, you can assign two or more subagents to run in a loop where the results from the first agent are passed to the second agent to go back to the first agent. Let’s take a quick look at an example.&lt;/p&gt;

&lt;p&gt;In this example, I want to build an agentic system for designing gym workouts. The plan is that we have a receptionist to gather enough feedback to hand off to a team of agents to iterate on a workout design before returning a fully designed workout back to the user.&lt;/p&gt;

&lt;p&gt;Before continous improvement, the original output was just from a single shot prompt asking for a workout for 5 days that focused on arms.&lt;/p&gt;

&lt;p&gt;Alright, let’s get to work. You want big arms, and you’re willing to put in the time with a 5-day split. I love that commitment. Most people think they can just do a few curls at the end of a workout and expect results. That’s not how you build sleeve-stretchers.&lt;/p&gt;

&lt;p&gt;The philosophy here is simple but brutally effective: **Frequency + Volume + Intensity. **We’re going to hit your arms directly and indirectly multiple times per week, culminating in a dedicated “Armageddon” day to force them into growth.&lt;/p&gt;

&lt;p&gt;Since I don’t have your previous workout logs, I’m going to prescribe the rep ranges and a method for you to select the correct weight. This is crucial. I’m not just giving you a list of exercises; I’m giving you a system.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Guiding Principles for Your Success
&lt;/h3&gt;

&lt;h3&gt;
  
  
  The 5-Day “Arm Annihilation” Program
&lt;/h3&gt;

&lt;p&gt;This split is designed to hit your arms hard while still building a powerful, balanced physique. Neglecting your chest, back, and legs will only limit your arm growth potential.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Day 5: ARMAGEDDON (Biceps &amp;amp; Triceps Focus)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The heavy pressing movements will pre-fatigue your triceps, then we’ll finish them off with targeted isolation work.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coach’s Tip: Control the weight down to your chest, pause for a split second, and drive up explosively. This is your main strength builder.&lt;/li&gt;
&lt;li&gt;Coach’s Tip: Don’t let the dumbbells crash together at the top. Keep constant tension on your chest.&lt;/li&gt;
&lt;li&gt;Coach’s Tip: This is a triceps mass builder. Keep your elbows tucked in close to your body. Your hands should be just inside shoulder-width.&lt;/li&gt;
&lt;li&gt;Coach’s Tip: Focus on getting a deep stretch at the bottom to hit the long head of the tricep, this is what adds the most size to your arm.&lt;/li&gt;
&lt;li&gt;Coach’s Tip: At the bottom of the movement, separate the ropes and squeeze your triceps as hard as you can. This is a finisher for the pump.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Heavy rows and pull-ups are fantastic for your biceps. We start with those, then isolate the biceps until they’re screaming.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coach’s Tip: Drive your elbows down and back, imagining you’re trying to put them in your back pockets.&lt;/li&gt;
&lt;li&gt;Coach’s Tip: Keep your back flat. Pull the bar to your lower stomach, not your chest. Your biceps will get a ton of work here.&lt;/li&gt;
&lt;li&gt;Coach’s Tip: Your foundational bicep mass builder. Don’t use momentum. Control the negative for a full 3 seconds on the way down.&lt;/li&gt;
&lt;li&gt;Coach’s Tip: Let your arms hang straight down to get a deep stretch on the bicep at the bottom. This is phenomenal for building the bicep “peak.”&lt;/li&gt;
&lt;li&gt;Coach’s Tip: These build the brachialis muscle, which sits under your bicep and will push it up, making it look bigger. It also adds thickness to your arm when viewed from the front.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not skip this day. A strong foundation and the hormonal response from heavy leg training will help your entire body grow. Consider this an active recovery day for your arms.&lt;/p&gt;

&lt;p&gt;Building powerful, round shoulders creates the “cap” on your upper arms, making them look even bigger and more impressive.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coach’s Tip: Lead with your elbows, and don’t raise the weights higher than your shoulders. Think “out,” not “up.”&lt;/li&gt;
&lt;li&gt;Coach’s Tip: Essential for shoulder health and hitting the rear delts. Pull the rope towards your face, trying to separate the handles.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the day we go to war. The focus is pure volume, pump, and annihilation. We’ll use supersets to maximize intensity and save time. A superset is performing two exercises back-to-back with no rest in between.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**A1: EZ Bar Curls: **4 sets of 8-12 reps (RIR 1)&lt;/li&gt;
&lt;li&gt;**A2: Skull Crushers: **4 sets of 8-12 reps (RIR 1)&lt;/li&gt;
&lt;li&gt;Rest 90 seconds after completing both exercises.&lt;/li&gt;
&lt;li&gt;**B1: Preacher Curls (Machine or Dumbbell): **3 sets of 10-15 reps (RIR 1)&lt;/li&gt;
&lt;li&gt;**B2: Tricep Dips (on bench or assisted machine): **3 sets to failure (RIR 0)&lt;/li&gt;
&lt;li&gt;Rest 60-90 seconds after completing both exercises.&lt;/li&gt;
&lt;li&gt;**C1: Cable Hammer Curls (with rope): **3 sets of 12-15 reps (RIR 0-1)&lt;/li&gt;
&lt;li&gt;**C2: Single-Arm Overhead Cable Tricep Extension: **3 sets of 12-15 reps per arm (RIR 0-1)&lt;/li&gt;
&lt;li&gt;Rest 60 seconds after completing both exercises.&lt;/li&gt;
&lt;li&gt;Grab the heaviest dumbbells you can hold with good posture.&lt;/li&gt;
&lt;li&gt;Walk for 3 sets of 45-60 seconds. This will demolish your grip and forearms.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Progression Plan &amp;amp; Final Advice
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;**Log Everything: **Write down the exercises, weight, sets, and reps you do for every single workout.&lt;/li&gt;
&lt;li&gt;**The Rule of Progression: **For a given exercise, once you can hit the top end of the prescribed rep range for all your sets (e.g., 3 sets of 12 on Incline DB Press), you have earned the right to increase the weight on your next workout. Add the smallest possible increment (2.5 or 5 lbs).&lt;/li&gt;
&lt;li&gt;**Listen to Your Body: **If you feel joint pain (especially in your elbows or shoulders), don’t push through it. Check your form, lighten the weight, or substitute the exercise. Soreness is fine; sharp pain is not.&lt;/li&gt;
&lt;li&gt;**Be Patient: **Building impressive arms takes time. Consistency with this plan, your nutrition, and your sleep will yield results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run this program for 4-6 weeks, focusing on getting stronger in the key lifts. After that, we can re-evaluate, see what’s working, and make adjustments. Now, go get it done.&lt;/p&gt;

&lt;p&gt;In the output above, you can see that the agent recommends bent over rows which I have trouble with because of back pain. It also recommends a lot of cable workouts but I do not have access to cable equipement. There is a lot of missing pieces that the agent must assume about my workout design and You can use continous improvement to derive better results.&lt;/p&gt;

&lt;p&gt;The personal_training_reception agent is designed to iterate with the user to figure out the type of workout the user would like to proceed with in designing a workout strategy. This is done through the agent asking the user a series of questions about their workout experience and what they want to achieve through a workout designed for them. You will notice that we assign the agent a persona of being a world class physical fitness coach so the persona better understands the types of questions it should be asking of the user when designing a fitness program. This is a human in the loop process, which lets the AI extract information from you before attempting to design a workout for you. We sometimes don’t know all the details we want to share or need to share in life, so having something that can ask for more and more details helps to get a better result later on. Once we have all the information we need we then hand off to the personal_training_staff agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;personal_training_reception&lt;/span&gt; 
    &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;
    &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;world&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;physical&lt;/span&gt; &lt;span class="n"&gt;fitness&lt;/span&gt; &lt;span class="n"&gt;coach&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;their&lt;/span&gt;
    &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="n"&gt;they&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;trying&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;accomplish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;If&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="n"&gt;wants&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;specific&lt;/span&gt; &lt;span class="n"&gt;muscle&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;appropriate&lt;/span&gt; &lt;span class="n"&gt;muscles&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;also&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;rep&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt;
    &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;weight&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;afraid&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;give&lt;/span&gt; &lt;span class="n"&gt;advice&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt;
    &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

    &lt;span class="n"&gt;Your&lt;/span&gt; &lt;span class="n"&gt;goal&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;ask&lt;/span&gt; &lt;span class="nb"&gt;any&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nb"&gt;all&lt;/span&gt; &lt;span class="n"&gt;questions&lt;/span&gt; &lt;span class="n"&gt;that&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;training&lt;/span&gt; &lt;span class="n"&gt;team&lt;/span&gt; &lt;span class="n"&gt;might&lt;/span&gt; &lt;span class="n"&gt;have&lt;/span&gt; &lt;span class="n"&gt;about&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="n"&gt;before&lt;/span&gt; &lt;span class="n"&gt;designing&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;workout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

    &lt;span class="n"&gt;When&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;feel&lt;/span&gt; &lt;span class="n"&gt;that&lt;/span&gt; &lt;span class="n"&gt;there&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;sufficient&lt;/span&gt; &lt;span class="n"&gt;information&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;design&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;workout&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;send&lt;/span&gt; &lt;span class="n"&gt;them&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;personal_training_staff&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    tools
    sub_agents
)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the training reception there is a back and forth that happens now between me and the agent before any workouts get recommended.&lt;/p&gt;

&lt;p&gt;Great goal! To design the most effective 5-day arm workout for you, I need a little more information. Could you tell me:&lt;/p&gt;

&lt;p&gt;Thanks for that detail! The “lower back hurts a lot” is a very important piece of information. To make sure we don’t aggravate it and still get you those big arms, I need to ask a few more questions:&lt;/p&gt;

&lt;p&gt;That’s excellent information, thank you! Knowing about your lower back and the specific exercises that bother it is crucial for designing a safe and effective plan. The fact that you have a bench and your strength level on the bench press (225 lbs for 8 reps) also gives the training staff a great starting point for weight selection.&lt;/p&gt;

&lt;p&gt;I have enough information now to pass this on to the personal training staff. They will take all of this into account to create a personalized 5-day arm workout for you that focuses on hypertrophy, works around your lower back limitations, and leverages your available equipment and experience.&lt;/p&gt;

&lt;p&gt;The personal_training_staff agent is a LoopAgent. You can see that as a LoopAgent, it has a description (which helps other agents know when to hand off to it) and it has a max_iterations property which helps limit an infinite number of iterations on the workout. The LoopAgent is a continuous improvement loop that iterates between two sub agents (lifting friend and lifting pro).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;lifting_friend&lt;/span&gt; 
    &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;
    &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;world&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;physical&lt;/span&gt; &lt;span class="n"&gt;fitness&lt;/span&gt; &lt;span class="n"&gt;coach&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;their&lt;/span&gt;
    &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="n"&gt;they&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;trying&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;accomplish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;If&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="n"&gt;wants&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;specific&lt;/span&gt; &lt;span class="n"&gt;muscle&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;appropriate&lt;/span&gt; &lt;span class="n"&gt;muscles&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;also&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;rep&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt;
    &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;weight&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;afraid&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;give&lt;/span&gt; &lt;span class="n"&gt;advice&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt;
    &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

    &lt;span class="n"&gt;Use&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;guide&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;design&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;program&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nb"&gt;any&lt;/span&gt; &lt;span class="n"&gt;critiques&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;modify&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;program&lt;/span&gt; &lt;span class="n"&gt;be&lt;/span&gt; &lt;span class="n"&gt;sure&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;incorporate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    tools
)

lifting_pro 
    name
    model
    description
    instruction
    You are a world class physical fitness coach. You take workouts given to you and look for issues with them.
    You know what your clients want and sometimes they can be... over ambitious. Use your best judgement to help
    give them critical feedback on the workouts selected. Make sure the client can reach their goals safely with their workout and don&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;t hold back on the feedback from the previously designed workout

    If you get the best possible workout from lifting_friend and you have no comments, call call exit_loop and show the client their workout
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;personal_training_staff&lt;/span&gt; 
    &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;
    &lt;span class="n"&gt;max_iterations&lt;/span&gt;
    &lt;span class="n"&gt;sub_agents&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the outputs I see are more focused on my inputs that I originally supplied. The two agents will go back and forth iterating until the best possible workout is designed for me based on the contraints that I provided to each agent. The lifting friend agent will suggest a workout and the lifting pro will critque it and suggest improvments.&lt;/p&gt;

&lt;p&gt;This is an abbreviated example as the two agents iterated quite a bit to get to the best possible workout for me.&lt;/p&gt;

&lt;p&gt;Alright, my man! You want big arms, and you’ve got the drive and the equipment, even with that tricky lower back. That’s what I like to hear! Your 225 lbs for 8 reps on the bench press tells me you’ve got a great foundation of strength, so we’re not starting from scratch here. We’ll build on that and work smart to get those sleeves bursting.&lt;/p&gt;

&lt;p&gt;The key with your lower back is form, control, and choosing the right exercises. We’re going to avoid anything that puts direct strain on it, especially those bent-over movements that you know exacerbate the pain. We’ll focus on supported, seated, or lying variations where possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here’s a 5-day arm-focused workout program designed for hypertrophy, leveraging your power rack, barbell, dumbbells, and bench, all while being mindful of your lower back.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  General Guidelines for Your Program:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;**Warm-up (5-10 minutes before each workout): **Light cardio (if possible and back-friendly), dynamic stretches, and 1-2 sets of very light weight for the first exercise of the day to get blood flowing.&lt;/li&gt;
&lt;li&gt;**Cool-down (5-10 minutes after each workout): **Static stretches for the muscles worked.&lt;/li&gt;
&lt;li&gt;**Rep Ranges: **We’re aiming for hypertrophy (muscle growth), so most exercises will be in the 8-12 or 10-15 rep range. Compound movements might occasionally dip to 6-8 reps.&lt;/li&gt;
&lt;li&gt;**Sets: **Aim for 3-4 working sets per exercise.&lt;/li&gt;
&lt;li&gt;**Rest: **60-90 seconds between sets for isolation movements, 90-120 seconds for compound movements.&lt;/li&gt;
&lt;li&gt;**Weight Selection: **You know your strength. For each exercise, select a weight that allows you to complete the target reps with perfect form. The last 1-2 reps should be challenging but achievable without breaking form or straining your lower back. **Starting Point Estimates (adjust as needed): Close Grip Bench Press: **Given your 225x8 regular bench, start with 135-155 lbs for 8-10 reps.&lt;/li&gt;
&lt;li&gt;**Barbell Curls: **Aim for 60-80 lbs for 8-10 reps.&lt;/li&gt;
&lt;li&gt;**Dumbbell Work: **For exercises like overhead extensions or dumbbell curls, if you can curl 80 lbs with a barbell, you might start with 30-40 lbs dumbbells (each hand). This is a general guide; listen to your body!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Your 5-Day “Arm Blast” Program: Day 1: Chest &amp;amp; Triceps (Push Focus)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 2: Upper Back (Back-Friendly) &amp;amp; Biceps (Pull Focus)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 3: Shoulders &amp;amp; Triceps (Push Focus)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 4: Legs (Back-Friendly) &amp;amp; Biceps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Day 5: Arm Annihilation (Biceps, Triceps, Forearms Focus)&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Coach’s Corner: Keys to Your Success for Big Arms &amp;amp; a Happy Back
&lt;/h3&gt;

&lt;p&gt;This is a fantastic start from lifting_friend! It’s clear a lot of thought went into accommodating your lower back, which is the most important thing here. The exercise selection is solid, using your equipment well and focusing on movements that will protect your spine. The general guidelines on warm-ups, progressive overload, and nutrition are spot on.&lt;/p&gt;

&lt;p&gt;However, as your coach, my job is to not just give you a workout, but to give you one that will give you the best possible results for the long haul. Sometimes, more isn’t better; smarter is better.&lt;/p&gt;

&lt;p&gt;I have a few critical adjustments to make this a truly world-class program that will prevent injury and maximize growth.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Volume is Too High - Risk of Overtraining&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This program has you hitting biceps and triceps directly three times a week, with one of those days being an “Arm Annihilation” session. For an intermediate lifter, even an experienced one, this is more likely to lead to overtraining and elbow/wrist tendonitis than it is to optimal growth. Muscle grows during recovery, not in the gym. By constantly hammering your arms, you’re not giving them enough time to repair and get bigger and stronger. The “Arm Annihilation” day, in particular, is excessive. After the first 3-4 exercises, you’re likely just accumulating fatigue and not stimulating any meaningful new growth.&lt;/p&gt;

&lt;p&gt;The plan has a lot of pressing movements and front-delt dominant exercises (Bench Press, Incline Press, Overhead Press, Front Raises). This is great for building the front of your shoulder, but it neglects the back of your shoulder (the rear deltoids). Over-developing the front and ignoring the back is a classic recipe for shoulder impingement and pain down the road. We need to balance this out.&lt;/p&gt;

&lt;h3&gt;
  
  
  The “Lifting Pro” Revised 5-Day Plan
&lt;/h3&gt;

&lt;p&gt;Here is my revised version of the program. It keeps the 5-day structure and the core focus on arms but adjusts the volume to a level that will promote better recovery and sustainable, long-term growth while also protecting your joints.&lt;/p&gt;

&lt;p&gt;**Day 1: Chest &amp;amp; Triceps (Unchanged) **This day is well-structured.&lt;/p&gt;

&lt;p&gt;**Day 2: Upper Back &amp;amp; Biceps (Unchanged) **Excellent back-friendly choices here.&lt;/p&gt;

&lt;p&gt;**Day 3: Shoulders &amp;amp; Arms (Revised for Balance) **Firebase is adding a rear delt movement and a bicep movement to make this a more complete upper body day.&lt;/p&gt;

&lt;p&gt;**Day 4: Legs &amp;amp; Core (Unchanged) **A solid, back-friendly leg day.&lt;/p&gt;

&lt;p&gt;**Day 5: High-Intensity Arm Focus (Replaces “Annihilation”) **We’re drastically reducing the volume here to focus on high-quality, high-intensity sets. This is all you need.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why This Is a Better Plan for You:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;**Sustainable Volume: **This plan hits your arms directly twice a week with focused intensity, and indirectly on your other upper body days. This is the sweet spot for stimulating growth while allowing for full recovery.&lt;/li&gt;
&lt;li&gt;**Reduced Injury Risk: **By eliminating the excessive volume, we significantly decrease the strain on your elbow and wrist joints. The addition of rear delt work on Day 3 will also protect your shoulders.&lt;/li&gt;
&lt;li&gt;**Better Results: **It might seem counterintuitive, but by doing less, you will grow more. Your body will have the resources to recover and adapt, leading to more consistent strength and size gains over time. This is a program built for a marathon, not a sprint. Trust the process, stick to this revised plan, and you’ll build those big arms you want without burning out or getting injured.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The tradeoff with continuous improvement
&lt;/h3&gt;

&lt;p&gt;Using continuous improvement may not be the best choice for all situations. Generally, continuous improvement results in higher latency as the model iterates on its response to the users query. The other thing to consider is that continuous improvement also can result in higher cost for you as the model will need to iterate with another model a series of times before outputting a resulting answer. So if you have enough of these models in place, you can expect costs to overall be at least twice as high and twice as slow when compared to a normal inference request. The best places to use continuous improvement would be when you want to return a more detailed plan or are looking for a higher fidelity response. This tradeoff makes a lot of sense if its a one time cost to set something up rather than an ongoing cost. In your example, we expect a workout plan to be a refined one time cost every month or so, not a daily operating cost.&lt;br&gt;
&lt;/p&gt;

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


&lt;span class="c1"&gt;# Agents
&lt;/span&gt;
&lt;span class="n"&gt;lifting_friend&lt;/span&gt; 
    &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;
    &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;world&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;physical&lt;/span&gt; &lt;span class="n"&gt;fitness&lt;/span&gt; &lt;span class="n"&gt;coach&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;their&lt;/span&gt;
    &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="n"&gt;they&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;trying&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;accomplish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;If&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="n"&gt;wants&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;specific&lt;/span&gt; &lt;span class="n"&gt;muscle&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;appropriate&lt;/span&gt; &lt;span class="n"&gt;muscles&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;also&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;rep&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt;
    &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;weight&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;afraid&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;give&lt;/span&gt; &lt;span class="n"&gt;advice&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt;
    &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

    &lt;span class="n"&gt;Use&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;guide&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;design&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="n"&gt;program&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nb"&gt;any&lt;/span&gt; &lt;span class="n"&gt;critiques&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;modify&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;program&lt;/span&gt; &lt;span class="n"&gt;be&lt;/span&gt; &lt;span class="n"&gt;sure&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;incorporate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    tools
)

lifting_pro 
    name
    model
    description
    instruction
    You are a world class physical fitness coach. You take workouts given to you and look for issues with them.
    You know what your clients want and sometimes they can be... over ambitious. Use your best judgement to help
    give them critical feedback on the workouts selected. Make sure the client can reach their goals safely with their workout and don&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;t hold back on the feedback from the previously designed workout

    If you get the best possible workout from lifting_friend and you have no comments, call call exit_loop and show the client their workout
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;personal_training_staff&lt;/span&gt; 
    &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;
    &lt;span class="n"&gt;max_iterations&lt;/span&gt;
    &lt;span class="n"&gt;sub_agents&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;personal_training_reception&lt;/span&gt; 
    &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;
    &lt;span class="n"&gt;instruction&lt;/span&gt;
    &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;world&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;physical&lt;/span&gt; &lt;span class="n"&gt;fitness&lt;/span&gt; &lt;span class="n"&gt;coach&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;their&lt;/span&gt;
    &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="n"&gt;they&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="n"&gt;trying&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;accomplish&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;If&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="n"&gt;wants&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;specific&lt;/span&gt; &lt;span class="n"&gt;muscle&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;appropriate&lt;/span&gt; &lt;span class="n"&gt;muscles&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;also&lt;/span&gt; &lt;span class="n"&gt;know&lt;/span&gt; &lt;span class="n"&gt;how&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;rep&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt;
    &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;correct&lt;/span&gt; &lt;span class="n"&gt;weight&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;put&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt; &lt;span class="n"&gt;based&lt;/span&gt; &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="n"&gt;previous&lt;/span&gt; &lt;span class="n"&gt;workouts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;You&lt;/span&gt; &lt;span class="n"&gt;are&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;afraid&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;give&lt;/span&gt; &lt;span class="n"&gt;advice&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt; &lt;span class="n"&gt;make&lt;/span&gt; &lt;span class="n"&gt;your&lt;/span&gt;
    &lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="n"&gt;successful&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

    &lt;span class="n"&gt;Your&lt;/span&gt; &lt;span class="n"&gt;goal&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;ask&lt;/span&gt; &lt;span class="nb"&gt;any&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nb"&gt;all&lt;/span&gt; &lt;span class="n"&gt;questions&lt;/span&gt; &lt;span class="n"&gt;that&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;training&lt;/span&gt; &lt;span class="n"&gt;team&lt;/span&gt; &lt;span class="n"&gt;might&lt;/span&gt; &lt;span class="n"&gt;have&lt;/span&gt; &lt;span class="n"&gt;about&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="n"&gt;before&lt;/span&gt; &lt;span class="n"&gt;designing&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;workout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

    &lt;span class="n"&gt;When&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;feel&lt;/span&gt; &lt;span class="n"&gt;that&lt;/span&gt; &lt;span class="n"&gt;there&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;sufficient&lt;/span&gt; &lt;span class="n"&gt;information&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;design&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;workout&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;send&lt;/span&gt; &lt;span class="n"&gt;them&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;personal_training_staff&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    tools
    sub_agents
)
&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;Improve AI output with continuous improvement&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/01/continuous-improvement/" rel="noopener noreferrer"&gt;Improve AI output with continuous improvement on the Official Firebase Blog&lt;/a&gt; (published 2026-01-13 by Alexander Nohe, Dan Gruhl)&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-apphosting-turborepo" rel="noopener noreferrer"&gt;App Hosting adds support for Turborepo&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-01-firestore-enterprise-pipeline-operations" rel="noopener noreferrer"&gt;Unveiling Firestore Pipeline operations&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 Improve AI output with continuous improvement?
&lt;/h3&gt;

&lt;p&gt;Improve AI output with continuous improvement (announced 2026-01-13 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, Security workloads. Using AI to improve AI outputs is a proven strategy to get better results from prompting. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2026/01/continuous-improvement/" 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 Improve AI output with continuous improvement 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>Firestore with MongoDB compatibility is now generally available in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:42:24 +0000</pubDate>
      <link>https://dev.to/codingcatdev/firestore-with-mongodb-compatibility-is-now-generally-available-in-firebase-web-architecture--bjc</link>
      <guid>https://dev.to/codingcatdev/firestore-with-mongodb-compatibility-is-now-generally-available-in-firebase-web-architecture--bjc</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-08-firestore-mongodb-general-availability" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-08-firestore-mongodb-general-availability&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Shipping reliable full-stack web applications requires keeping your client SDKs, backend security rules, and cloud infrastructure tightly aligned as your traffic scales. Following the announcement of &lt;strong&gt;Firestore with MongoDB compatibility is now generally available&lt;/strong&gt; by Morgan Chen, Tyler Crowe, Minh Nguyen on the &lt;a href="https://firebase.blog/posts/2025/08/firestore-mongodb-general-availability/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-08-26), 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 April, we released a public preview of Firestore with MongoDB compatibility available through Google Cloud. With this release, the Firebase team announced that Firestore with MongoDB compatibility is available in Firebase and we’re graduating to general availability! If you missed this earlier announcement, you might be wondering: What is MongoDB compatibility? And should I use it if I’m starting a new project? Let’s take a look.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Firestore with MongoDB compatibility is now generally available Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect at CodingCat.dev, I evaluate every Firebase update through one lens: does it reduce boilerplate while keeping our runtime security and cloud bills predictable? This Firebase update streamlines how web and cloud engineers configure, secure, and observe production workloads across modern TypeScript frameworks like Next.js, Astro, SvelteKit, React, and Angular.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AJ Pro-Tip from Alex: Whenever we adopt a new Firebase capability at CodingCat.dev, we validate it in the Firebase Local Emulator Suite first and pair client SDK calls with Firebase App Check and strict Security Rules before shipping to production.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;h3&gt;
  
  
  Firestore Enterprise edition
&lt;/h3&gt;

&lt;p&gt;Firestore with MongoDB compatibility is available on a new Firestore Enterprise edition, which features MongoDB API compatibility along with more than 200 new powerful query capabilities, additional data types, new index types and improved performance.&lt;/p&gt;

&lt;p&gt;At a glance, this means you can use existing MongoDB application code, drivers, and open-source libraries &amp;amp; tools with Firestore. Furthermore, Firestore no longer needs to stick to queries that are exclusively mapped to indexes, and can instead run more general workloads that, for example, allow you to match a text field using a regular expression without ever creating an index.&lt;/p&gt;

&lt;p&gt;In other words, you can think of it as Firestore with more flexibility, advanced query capabilities, better performance and additional control for the developer. Firestore with MongoDB compatibility features many highly requested capabilities like aggregations, nested array &amp;amp; set manipulations, regular expression matching on text strings, and the ability to perform lookups (JOIN) on data.&lt;/p&gt;

&lt;p&gt;If you’re an experienced Firestore developer, you might suspect that these changes come with a new pricing model, and you’re right. You can check out the new pricing on our &lt;a href="https://g.dev/firebase/firestore-enterprise-pricing-mongodb-ga" rel="noopener noreferrer"&gt;&lt;strong&gt;pricing page&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting started
&lt;/h3&gt;

&lt;p&gt;You can create a new Firestore with MongoDB compatibility database using the Firestore Enterprise edition directly in the Firebase Console.&lt;/p&gt;

&lt;p&gt;To edit queries, the Firebase console now features an advanced query editor, allowing you to author and execute MongoDB Query Language (MQL) queries and view results that include new BSON data types.&lt;/p&gt;

&lt;p&gt;Want more control around indexing? You can now create unique, sparse and non-sparse indexes all from the Firebase Console. Since Firestore Enterprise edition doesn’t require indexes on every query, this gives you fine-grained control over which of your queries use or don’t use indexes, which lets you optimize both your costs and your database’s performance.&lt;/p&gt;

&lt;p&gt;Of course, you can create and manage databases and indexes via the Firebase CLI as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enterprise vs Standard edition
&lt;/h3&gt;

&lt;p&gt;If you love the Firebase SDKs with realtime sync and offline capabilities, you can keep using Firestore Standard edition! Standard edition Firestore databases are not going away, so your existing Firestore projects will continue to run indefinitely without any pricing or behavior changes.&lt;/p&gt;

&lt;p&gt;In an upcoming release, all of the goodness of Firestore Enterprise edition will also be accessible via the Firebase SDKs with realtime sync and offline. Stay tuned!&lt;/p&gt;

&lt;h3&gt;
  
  
  Firestore is ready for your MongoDB workloads
&lt;/h3&gt;

&lt;p&gt;If you want to upgrade from Firestore Standard edition to Enterprise edition, you’ll have to wait for the upcoming SDK compatibility release. If you’re a MongoDB developer, Firestore Enterprise is ready for your database workloads today. Check out the &lt;a href="https://g.dev/firebase/firestore-mongodb-compatibility" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt; for how to get started.&lt;/p&gt;

&lt;p&gt;We’re delighted to see all the interest in Firestore over the past years and we’re elated to share that we’re finally able to deliver the query features the developers have been requesting. Now that Firestore with MongoDB compatibility is out, please give it a try!&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 Firestore with MongoDB compatibility is now generally available 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="nx"&gt;getApps&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;getFirestore&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;collection&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;where&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getDocs&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/firestore&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;getAuth&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/auth&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;firebaseConfig&lt;/span&gt; &lt;span class="o"&gt;=&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;authDomain&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_AUTH_DOMAIN&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="k"&gt;export&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;getApps&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nf"&gt;getApps&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="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;initializeApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firebaseConfig&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;db&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getFirestore&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;auth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getAuth&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;/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 TypeScript 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 with MongoDB compatibility is now generally available&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/08/firestore-mongodb-general-availability/" rel="noopener noreferrer"&gt;Firestore with MongoDB compatibility is now generally available on the Official Firebase Blog&lt;/a&gt; (published 2025-08-26 by Morgan Chen, Tyler Crowe, 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-2025-08-apphosting-august-update" rel="noopener noreferrer"&gt;App Hosting has faster deployments, route-based monitoring, and improved CI/CD setup&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-dataconnect-searches" rel="noopener noreferrer"&gt;Full-text search and other searches 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/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 with MongoDB compatibility is now generally available?
&lt;/h3&gt;

&lt;p&gt;Firestore with MongoDB compatibility is now generally available (announced 2025-08-26 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, TypeScript workloads. In April, we released a public preview of Firestore with MongoDB compatibility available through Google Cloud. With this release, the Firebase team announced that Firestore with MongoDB compatibility is available in Firebase and we’re graduating to general availability! If you missed this earlier announcement, you might be wondering: What is MongoDB compatibility? And should I use it if I’m starting a new project? Let’s take a look. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/08/firestore-mongodb-general-availability/" 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 with MongoDB compatibility is now generally available 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>Enhance Your Firebase Studio Workflow with Gemini CLI: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:42:15 +0000</pubDate>
      <link>https://dev.to/codingcatdev/enhance-your-firebase-studio-workflow-with-gemini-cli-web-architecture-implementation-guide-3cnc</link>
      <guid>https://dev.to/codingcatdev/enhance-your-firebase-studio-workflow-with-gemini-cli-web-architecture-implementation-guide-3cnc</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-07-firebase-studio-gemini-cli" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-07-firebase-studio-gemini-cli&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;Enhance Your Firebase Studio Workflow with Gemini CLI&lt;/strong&gt; by Jess Kuras on the &lt;a href="https://firebase.blog/posts/2025/07/firebase-studio-gemini-cli/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-07-22), 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 Enhance Your Firebase Studio Workflow with Gemini CLI Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect 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;We recently &lt;a href="https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/" rel="noopener noreferrer"&gt;&lt;strong&gt;launched&lt;/strong&gt;&lt;/a&gt; Gemini CLI, which integrates the robust capabilities of Google’s Gemini AI model directly into your command-line interface. The Firebase team announced Gemini CLI is now preinstalled in Firebase Studio! Gemini CLI offers you a powerful tool for a wide range of tasks beyond just code, including content generation and research. It includes generous usage tiers, advanced AI features, integrated Google Search for real-time context, and an open-source architecture for customization and contributions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who should use Gemini CLI?
&lt;/h3&gt;

&lt;p&gt;Both Gemini in Firebase and Gemini CLI can perform similar tasks, but I recommend trying out Gemini CLI if you spend a significant amount of time in the terminal for tasks like code generation, debugging, executing commands, or managing project files. Gemini CLI provides a seamless, AI-powered experience without the need to switch contexts to a separate chat window.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get started in Firebase Studio
&lt;/h3&gt;

&lt;p&gt;To access Gemini CLI in Firebase Studio:&lt;/p&gt;

&lt;p&gt;Gemini CLI is ready to go! In the future, all you need to do is enter &lt;code&gt;gemini&lt;/code&gt; in the terminal to access it.&lt;/p&gt;

&lt;p&gt;Alternatively, you can run Gemini CLI in non-interactive mode, which is useful for scripting and automation. In this mode, Gemini CLI automatically exits after executing the command you enter. To use this mode, use the &lt;code&gt;--prompt&lt;/code&gt; or &lt;code&gt;-p&lt;/code&gt; flag. For example: &lt;code&gt;gemini -p "Create a markdown file that explains your app’s architecture"&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Customize Gemini CLI
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Settings&lt;/strong&gt;: Edit&lt;code&gt;.gemini/settings.json&lt;/code&gt; to change the theme, enable or disable the collection of usage statistics, adjust which tools Gemini CLI has access to, configure the checkpointing feature, and much more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment variables&lt;/strong&gt;: Gemini CLI automatically loads environment variables from the&lt;code&gt;.env&lt;/code&gt; file, which is where you should store your &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; (required). Optionally, you can include which &lt;code&gt;GEMINI_MODEL&lt;/code&gt; to use, your &lt;code&gt;GOOGLE_CLOUD_PROJECT&lt;/code&gt;, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instructions&lt;/strong&gt;: To adjust the context that Gemini CLI uses when following instructions, create a &lt;code&gt;GEMINI.md&lt;/code&gt; file. This lets you give project-specific instructions, coding style guides, or relevant background information to Gemini, making its responses more tailored and accurate to your needs. You can use &lt;code&gt;GEMINI.md&lt;/code&gt; to customize both Gemini CLI and Gemini in Firebase, unless you create a&lt;code&gt;.idx/airules.md&lt;/code&gt; file as well (in which case Gemini CLI would use &lt;code&gt;GEMINI.md&lt;/code&gt;, and Gemini in Firebase would use &lt;code&gt;airules.md&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more information and examples on how to adjust the settings, environment variables, and instructions, check out the &lt;a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Commands to explore
&lt;/h3&gt;

&lt;p&gt;You can chat with Gemini CLI with questions or requests. You could ask it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;explain [file_name.js]&lt;/strong&gt;: If you encounter unfamiliar code, use this command to request an explanation. Replace &lt;code&gt;[file_name.js]&lt;/code&gt; with the relevant file path or paste the code directly into the prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;refactor [code_snippet]&lt;/strong&gt;: Enhance your code’s structure or efficiency by prompting Gemini to suggest refactoring improvements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;debug "Error: Module not found: 'firebase-admin'"&lt;/strong&gt;: When facing errors, provide the error message to Gemini for insights and potential solutions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;summarize "Key features of Firebase Realtime Database"&lt;/strong&gt;: Employ Gemini for rapid research and concise content summarization.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also supports several built-in commands to help manage your session, customize the interface, and control its behavior, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;/help&lt;/strong&gt;: View a comprehensive list of available commands and options, which serves as an excellent starting point for exploration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/chat&lt;/strong&gt;: Save and resume conversation history in order to create branching conversations, or resume a previous state from a later session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/tools&lt;/strong&gt;: Display a list of tools that are currently available within Gemini CLI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;/restore&lt;/strong&gt;: Restore project files to the state they were in just before a tool was executed. This is particularly useful for undoing file edits made by a tool.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a full list of commands, check out the &lt;a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/commands.md" rel="noopener noreferrer"&gt;&lt;strong&gt;documentation&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 Enhance Your Firebase Studio Workflow with Gemini CLI 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;Enhance Your Firebase Studio Workflow with Gemini CLI&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/07/firebase-studio-gemini-cli/" rel="noopener noreferrer"&gt;Enhance Your Firebase Studio Workflow with Gemini CLI on the Official Firebase Blog&lt;/a&gt; (published 2025-07-22 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-07-supercharge-firebase-studio-with-mcp" rel="noopener noreferrer"&gt;Supercharge your Firebase Studio workflow with MCP servers&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-07-integrating-firebase-in-firebase-studio" rel="noopener noreferrer"&gt;From vibe to reality: Integrating Firebase in Firebase Studio&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 Enhance Your Firebase Studio Workflow with Gemini CLI?
&lt;/h3&gt;

&lt;p&gt;Enhance Your Firebase Studio Workflow with Gemini CLI (announced 2025-07-22 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/07/firebase-studio-gemini-cli/" 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 Enhance Your Firebase Studio Workflow with Gemini CLI 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>Build Responsive, AI-powered Apps with Cloud Functions for Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:41:47 +0000</pubDate>
      <link>https://dev.to/codingcatdev/build-responsive-ai-powered-apps-with-cloud-functions-for-firebase-web-architecture--27g4</link>
      <guid>https://dev.to/codingcatdev/build-responsive-ai-powered-apps-with-cloud-functions-for-firebase-web-architecture--27g4</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-03-streaming-cloud-functions-genkit" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-03-streaming-cloud-functions-genkit&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;Build Responsive, AI-powered Apps with Cloud Functions for Firebase&lt;/strong&gt; by Daniel Lee, Jeff Huleatt on the &lt;a href="https://firebase.blog/posts/2025/03/streaming-cloud-functions-genkit/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-03-06), 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. App users demand instant, dynamic app experiences, whether they’re chatting with an AI assistant, generating content in real time, or waiting for live data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Build Responsive, AI-powered Apps with Cloud Functions for Firebase Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect 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;Since their introduction in 2017, Cloud Functions for Firebase’s &lt;a href="https://firebase.google.com/docs/functions/callable" rel="noopener noreferrer"&gt;&lt;strong&gt;callable functions&lt;/strong&gt;&lt;/a&gt; have focused on providing you with a streamlined server(less) development experience that simplifies server-to-client interactions. Now, The Firebase team announced two new features that make it easier than ever to build responsive, AI-powered apps:&lt;/p&gt;

&lt;p&gt;Streaming responses for callable functions, Deliver data incrementally to clients.&lt;/p&gt;

&lt;p&gt;A new &lt;code&gt;onCallGenkit&lt;/code&gt; trigger, Seamlessly integrate Firebase Genkit to productionize generative AI workflows.&lt;/p&gt;

&lt;p&gt;**Note: **In this post, we show how to stream data from a Node.js callable function to a client web app that’s using the Firebase JS SDK. We’re also working on bringing this to the Python functions SDK, as well as our Swift, Kotlin, and Dart client SDKs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Send data to your app as it is generated
&lt;/h3&gt;

&lt;p&gt;Traditionally, when a client application calls a server function, it has to wait for the entire response to be generated before it can do anything. This “all-or-nothing” approach works well for many scenarios, but it falls short when dealing with:&lt;/p&gt;

&lt;p&gt;Why do generative AI APIs return their responses token-by-token?&lt;/p&gt;

&lt;p&gt;With the new streaming capability for Callable Functions, your server can send data to the client in chunks, as it becomes available. The client can then process and display this data incrementally, creating a much more responsive and engaging user experience.&lt;/p&gt;

&lt;p&gt;Imagine Firebase is building a web app for weather enthusiasts or frequent travelers that want to see the forecast for lots of locations at once, and that it calls a callable function to get these forecasts. Without streaming, they’d have to sit and wait while the forecast for each location is fetched, and can only start browsing the results once every location’s forecast is fetched and returned from the server.&lt;/p&gt;

&lt;p&gt;With streaming, our weather enthusiasts can start viewing each location’s data as soon as it’s ready:&lt;/p&gt;

&lt;p&gt;To stream results, check the &lt;code&gt;acceptsStreaming&lt;/code&gt; field of the &lt;code&gt;request&lt;/code&gt; object, and call &lt;code&gt;response.sendChunk&lt;/code&gt; every time you have a chunk of data that’s ready to send back to the client. Return the full dataset at the end for clients that don’t accept streaming.&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="nx"&gt;exports&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="c1"&gt;// Stream each forecast as it resolves!&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;
            &lt;span class="nx"&gt;response&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="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// Fallback for non-streaming clients&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;Use the Firebase client SDKs to consume the streaming response from a 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="kd"&gt;const&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;
  &lt;span class="nx"&gt;updateUI&lt;/span&gt;
&lt;span class="p"&gt;}&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 already using callable functions in your app, adding streaming behavior may just be a small change to your server and client code that results in big user-experience benefits!&lt;/p&gt;

&lt;p&gt;For generative AI applications, The Firebase team built a new &lt;code&gt;onCallGenkit&lt;/code&gt; trigger on top of this new streaming functionality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Productionize Your AI-Powered Apps Faster
&lt;/h3&gt;

&lt;p&gt;Firebase Genkit is an all-in-one toolkit to prototype, test, build, and monitor production-ready generative AI applications. The new &lt;code&gt;onCallGenkit&lt;/code&gt; trigger now lets you deploy Genkit flows as secure, scalable APIs with one line:&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;// An example Genkit flow.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="c1"&gt;// ...&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt;
            &lt;span class="s2"&gt;`
        );
        for
            sendChunk
        }
        return
    },
);

// Deploy the flow with Cloud Functions for Firebase
exports
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As above, use the functions SDK to consume the results from a client 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="kd"&gt;const&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;
  &lt;span class="nx"&gt;updateUI&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With &lt;code&gt;onCallGenkit&lt;/code&gt;, you leverage all features we offer in Cloud Functions for Firebase, like:&lt;/p&gt;

&lt;p&gt;**Simplified Deployment: **Deploy your Genkit flows with just the firebase deploy command you are familiar with.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Automatic Streaming: *&lt;/em&gt;&lt;code&gt;onCallGenkit&lt;/code&gt; automatically handles the streaming setup for you. Just use &lt;code&gt;sendChunk()&lt;/code&gt; within your Genkit flow, and call the &lt;code&gt;stream&lt;/code&gt; method from the client SDK.&lt;/p&gt;

&lt;p&gt;**Built-in Abuse Prevention: **Protect your AI-powered function with Firebase App Check.&lt;/p&gt;

&lt;p&gt;**Secret Management: **Securely store and access API keys and other sensitive information with enterprise-grade Cloud Secret Manager.&lt;/p&gt;

&lt;p&gt;**Concurrency: **Benefit from Cloud Function for Firebase 2nd gen features like concurrency to scale your service efficiently. With concurrency, one function instance can handle multiple concurrent requests, a great fit for AI applications that depend heavily on API calls.&lt;/p&gt;

&lt;p&gt;Here’s a more robust sample based on the code 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;const&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
        &lt;span class="na"&gt;outputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
        &lt;span class="na"&gt;streamSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt;
            &lt;span class="s2"&gt;`
        );
        for
            sendChunk
        }
        return
    },
);

// Deploy to Firebase with secrets and App Check
const
exports
    {
        secrets: [geminiApiKey],
        enforceAppCheck: 
    },
    jokeTeller,
);
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Roadmap
&lt;/h3&gt;

&lt;p&gt;These new features are ready to use now with the 2nd gen Node.js runtime, but we’re still working on Python support. You can &lt;a href="https://github.com/firebase/firebase-functions-python/pull/225" rel="noopener noreferrer"&gt;&lt;strong&gt;follow along&lt;/strong&gt;&lt;/a&gt; as we implement it!&lt;/p&gt;

&lt;p&gt;We’re still working on updating our Swift, Kotlin, and Dart client SDKs so that native mobile apps can also use this streaming functionality, alongside web apps. Until then, your functions can fall back to non-streaming behavior for these clients.&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;Build Responsive, AI-powered Apps with Cloud Functions 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/2025/03/streaming-cloud-functions-genkit/" rel="noopener noreferrer"&gt;Build Responsive, AI-powered Apps with Cloud Functions for Firebase on the Official Firebase Blog&lt;/a&gt; (published 2025-03-06 by Daniel Lee, Jeff Huleatt)&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-imagen3-support-on-vertex-ai-sdks" rel="noopener noreferrer"&gt;Add image generation to your apps with Imagen 3&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-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/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 Build Responsive, AI-powered Apps with Cloud Functions for Firebase?
&lt;/h3&gt;

&lt;p&gt;Build Responsive, AI-powered Apps with Cloud Functions for Firebase (announced 2025-03-06 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, TypeScript, Security, Serverless workloads. App users demand instant, dynamic app experiences, whether they’re chatting with an AI assistant, generating content in real time, or waiting for live data. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/03/streaming-cloud-functions-genkit/" 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 Build Responsive, AI-powered Apps with Cloud Functions 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>Add image generation to your apps with Imagen 3 in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:41:45 +0000</pubDate>
      <link>https://dev.to/codingcatdev/add-image-generation-to-your-apps-with-imagen-3-in-firebase-web-architecture-implementation-guide-4lbp</link>
      <guid>https://dev.to/codingcatdev/add-image-generation-to-your-apps-with-imagen-3-in-firebase-web-architecture-implementation-guide-4lbp</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-03-imagen3-support-on-vertex-ai-sdks" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-03-imagen3-support-on-vertex-ai-sdks&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;Add image generation to your apps with Imagen 3&lt;/strong&gt; by Miguel Ramos on the &lt;a href="https://firebase.blog/posts/2025/03/imagen3-support-on-vertex-ai-sdks/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-03-03), 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: As of May 2025, Vertex AI in Firebase has evolved into an offering named Firebase AI Logic to give developers more options for easily integrating generative AI models into their apps. Check out the documentation to learn more.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why Add image generation to your apps with Imagen 3 Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect 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;Vertex AI in Firebase allows developers to integrate generative AI into their applications by providing a streamlined, serverless, and secure way to access the Gemini AI models. Used by thousands of apps today, it handles the complexities of AI infrastructure, simplifies development, letting you focus on building great user experiences.&lt;/p&gt;

&lt;p&gt;Now, we’re taking that further adding support for the &lt;a href="https://cloud.google.com/vertex-ai/generative-ai/docs/image/overview" rel="noopener noreferrer"&gt;&lt;strong&gt;Imagen models&lt;/strong&gt;&lt;/a&gt; (Imagen 3 and Imagen 3 Fast), in addition to the Gemini family of models. This lets you add image generation directly to your Android, iOS, Flutter, and Web applications, bringing the same ease of use and scalability you expect.&lt;/p&gt;

&lt;h3&gt;
  
  
  What can you do with Imagen 3 in Firebase
&lt;/h3&gt;

&lt;p&gt;The Vertex AI in Firebase SDKs allow to choose between speed and quality giving you access to both Imagen 3 models:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Imagen 3: **A high-quality image generation model, capable of producing detailed images.&lt;/li&gt;
&lt;li&gt;**Imagen 3 Fast: **A low-latency version of Imagen 3, optimized for speed. Choose this when responsiveness is paramount.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s what’s possible, directly within your client-side code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;*&lt;em&gt;Generate images from text: *&lt;/em&gt;&lt;code&gt;String prompt = "A futuristic cityscape at sunset";&lt;/code&gt; - that’s all it takes.&lt;/li&gt;
&lt;li&gt;**Various formats: **create images in a range of resolutions, allowing you to optimize for storage and display.&lt;/li&gt;
&lt;li&gt;**Text within images: **generate images that incorporate text, opening up possibilities for dynamic content creation within your app.&lt;/li&gt;
&lt;li&gt;**Watermarking: **add watermarks for image attribution and provenance.&lt;/li&gt;
&lt;li&gt;**Safety settings: **adjust safety filters to help control the content generated.&lt;/li&gt;
&lt;li&gt;**Up to 4 images: **generate a maximum of four images per request to manage device resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Take a look at these photos generated with Imagen 3:&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting started
&lt;/h3&gt;

&lt;p&gt;To integrate Imagen 3 into your Firebase project, you should enable Vertex AI in Firebase, add the Firebase SDK to your project, and initialize the service. Once set up, generate an image by initializing your chosen Imagen model and calling &lt;code&gt;generateImages()&lt;/code&gt; with your text prompt.&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 Vertex AI service&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;

&lt;span class="c1"&gt;// Initialize with an Imagen 3 model that supports your use case&lt;/span&gt;
&lt;span class="c1"&gt;// like "imagen-3.0-generate-002" or "imagen-3.0-fast-generate-001"&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;

&lt;span class="c1"&gt;// Provide an image generation prompt – this could come from user input&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;

&lt;span class="c1"&gt;// To generate an image, call generateImages with the text prompt&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;

&lt;span class="c1"&gt;// Handle the generated image&lt;/span&gt;
&lt;span class="nx"&gt;guard&lt;/span&gt;
  &lt;span class="nx"&gt;fatalError&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Specify the number of images&lt;/span&gt;
&lt;span class="nx"&gt;final&lt;/span&gt;
  &lt;span class="nx"&gt;model&lt;/span&gt;
    &lt;span class="nx"&gt;generationConfig&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;final&lt;/span&gt;

&lt;span class="nx"&gt;final&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;
  &lt;span class="c1"&gt;// Process the image&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need more control over the image generation, you can configure the model and even set safety settings, for example:&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="nx"&gt;aspectRatio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ImagenAspectRatio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LANDSCAPE_16x9&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;imageFormat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ImagenImageFormat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="nx"&gt;addWatermark&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;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
  &lt;span class="nx"&gt;generationConfig&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;safetySettings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;safetyFilterLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ImagenSafetyFilterLevel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;BLOCK_LOW_AND_ABOVE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;personFilterLevel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ImagenPersonFilterLevel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ALLOW_ADULT&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="c1"&gt;// If fewer images were generated than were requested,&lt;/span&gt;
&lt;span class="c1"&gt;// then filteredReason will describe the reason they were filtered out&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;
  &lt;span class="nx"&gt;console&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;
  
  
  Current limitations
&lt;/h3&gt;

&lt;p&gt;While this release brings significant power to your client-side code, some advanced Imagen 3 features are not yet supported:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;**Image editing: **features like upscaling are not available.&lt;/li&gt;
&lt;li&gt;**Including images as input: **not supported on the client SDK.&lt;/li&gt;
&lt;li&gt;**Generating using a predefined style: **not available.&lt;/li&gt;
&lt;/ul&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;Add image generation to your apps with Imagen 3&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/imagen3-support-on-vertex-ai-sdks/" rel="noopener noreferrer"&gt;Add image generation to your apps with Imagen 3 on the Official Firebase Blog&lt;/a&gt; (published 2025-03-03 by Miguel Ramos)&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-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/post/firebase-2025-03-streaming-cloud-functions-genkit" rel="noopener noreferrer"&gt;Build Responsive, AI-powered Apps with Cloud Functions 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/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 Add image generation to your apps with Imagen 3?
&lt;/h3&gt;

&lt;p&gt;Add image generation to your apps with Imagen 3 (announced 2025-03-03 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, TypeScript, Serverless workloads. Update: As of May 2025, Vertex AI in Firebase has evolved into an offering named Firebase AI Logic to give developers more options for easily integrating generative AI models into their apps. Check out the documentation to learn more. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/03/imagen3-support-on-vertex-ai-sdks/" 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 Add image generation to your apps with Imagen 3 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>The 14 Open-Source Repos Powering Code-Driven Video in 2026: How We Built 3D AJ the Cat</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Wed, 04 Nov 2026 05:23:06 +0000</pubDate>
      <link>https://dev.to/codingcatdev/the-14-open-source-repos-powering-code-driven-video-in-2026-how-we-built-3d-aj-the-cat-56ja</link>
      <guid>https://dev.to/codingcatdev/the-14-open-source-repos-powering-code-driven-video-in-2026-how-we-built-3d-aj-the-cat-56ja</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/14-open-source-repos-code-driven-video-how-we-built-3d-aj" rel="noopener noreferrer"&gt;https://codingcat.dev/post/14-open-source-repos-code-driven-video-how-we-built-3d-aj&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every AI engineering timeline this month is flooded with launch films, kinetic typography reels, and 3D product videos captioned &lt;code&gt;"one prompt in Opus 5.5"&lt;/code&gt;. If you actually believed a 20-word vibe prompt inside a standard chat window produced those 60fps showreels, you probably tried it yourself and got a centered title over a purple gradient with drifting CSS animations.&lt;/p&gt;

&lt;p&gt;A recent viral breakdown by &lt;code&gt;@0xnicc0&lt;/code&gt; and &lt;code&gt;@seeconvm&lt;/code&gt; pulled back the curtain on what those viral videos are actually hiding: &lt;strong&gt;foundation models cannot output an MP4 file directly&lt;/strong&gt;. Every viral code-rendered film is a deterministic program written by an agent with shell access, driven by a strict &lt;code&gt;window.seek(t)&lt;/code&gt; frame contract, closed-form spring physics, beat-locked audio (&lt;code&gt;beats.json&lt;/code&gt;), and a contact-sheet critique loop powered by &lt;strong&gt;14 free open-source repositories&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On &lt;strong&gt;CodingCat.dev&lt;/strong&gt;, we took that exact 14-repo stack and wired it directly into our production site and local RTX 5090 video studio:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We built our canonical &lt;strong&gt;3D Vinyl-Toy AJ the Cat GLB model&lt;/strong&gt; (&lt;code&gt;aj-3d-mascot.glb&lt;/code&gt;) using &lt;strong&gt;Three.js&lt;/strong&gt;, &lt;strong&gt;Blender&lt;/strong&gt;, and &lt;strong&gt;Blender MCP&lt;/strong&gt; (&lt;code&gt;ahujasid/mcp-for-blender&lt;/code&gt;), complete with a live &lt;strong&gt;2D Vector vs. 3D GLB toggle&lt;/strong&gt; on &lt;a href="https://dev.to/mascot-lab"&gt;&lt;code&gt;/mascot-lab\&lt;/code&gt;&lt;/a&gt; and our homepage Hero.&lt;/li&gt;
&lt;li&gt;We upgraded AJ's runtime (&lt;code&gt;AjAnimatedMascot.astro&lt;/code&gt; and &lt;code&gt;Aj3dMascotViewer.astro&lt;/code&gt;) with a shared &lt;strong&gt;deterministic &lt;code&gt;window.seek(t)\&lt;/code&gt; motion engine&lt;/strong&gt; (&lt;code&gt;src/lib/aj-motion-engine.ts&lt;/code&gt;) using &lt;strong&gt;closed-form harmonic springs&lt;/strong&gt; and &lt;strong&gt;seeded noise&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;We wired &lt;strong&gt;120 BPM audio-reactive lip-sync&lt;/strong&gt; into our &lt;strong&gt;Podcasts&lt;/strong&gt; (&lt;code&gt;/podcasts&lt;/code&gt; and &lt;code&gt;/podcast/[slug]&lt;/code&gt;) and automated our 1080p &lt;strong&gt;Course Factory&lt;/strong&gt; with &lt;strong&gt;faster-whisper&lt;/strong&gt;, &lt;strong&gt;FFmpeg&lt;/strong&gt;, and headless &lt;strong&gt;Chrome DevTools MCP&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's break down the mental model behind deterministic code-driven video, see the Architecture Diagrams, rank all 14 repositories in an &lt;strong&gt;Alex Patterson Architectural Tier List&lt;/strong&gt;, and walk through the exact TypeScript and Python code powering 3D AJ.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Mental Model: Why window.seek(t) Beats Non-Deterministic Timers
&lt;/h2&gt;

&lt;p&gt;When you ask an LLM to write a web animation without a render contract, it defaults to &lt;code&gt;requestAnimationFrame&lt;/code&gt;, &lt;code&gt;setTimeout&lt;/code&gt;, CSS transitions, and &lt;code&gt;Math.random()&lt;/code&gt;. That works fine for a casual decorative hover effect, but it falls apart the moment a headless browser tries to capture 900 frames for a 15-second 60fps video:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If frame 240 takes 45ms to paint instead of 16.6ms, timer-based animations drift out of sync with the audio track.&lt;/li&gt;
&lt;li&gt;If a headline lands 10 frames too early at second &lt;code&gt;4.0&lt;/code&gt;, you cannot jump straight to frame 240 to inspect it without re-simulating frames &lt;code&gt;0&lt;/code&gt; through &lt;code&gt;239&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If particle positions use &lt;code&gt;Math.random()&lt;/code&gt;, rendering frame 300 twice produces two different image hashes, breaking loop continuity and automated visual diffs.&lt;/li&gt;
&lt;/ul&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%2Fcdn.sanity.io%2Fmedia-libraries%2Fmlttp0BZbCpV%2Fimages%2F31fac00f2ac93f12fab20c55465e878b874ea6ec-1376x768.png%3Ffit%3Dmax%26auto%3Dformat" 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%2Fcdn.sanity.io%2Fmedia-libraries%2Fmlttp0BZbCpV%2Fimages%2F31fac00f2ac93f12fab20c55465e878b874ea6ec-1376x768.png%3Ffit%3Dmax%26auto%3Dformat" alt="Deterministic Frame Contract Architecture Diagram" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The solution is a strict &lt;strong&gt;Frame Function Contract&lt;/strong&gt; enforced via your agent rules (&lt;code&gt;CLAUDE.md&lt;/code&gt; or &lt;code&gt;GEMINI.md&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;window.seek(t)\&lt;/code&gt; Paints Frame &lt;code&gt;t\&lt;/code&gt;&lt;/strong&gt;: Nothing else drives the screen. Passing &lt;code&gt;window.seek(4.0)&lt;/code&gt; renders the exact visual state at &lt;code&gt;4.000&lt;/code&gt; seconds deterministically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Closed-Form Springs (&lt;code&gt;spring(t - t_i)\&lt;/code&gt;)&lt;/strong&gt;: Instead of accumulating velocity state frame-by-frame in a physics loop, every movement is evaluated as an analytical function of elapsed time since impulse &lt;code&gt;t_i&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seeded Hash Noise Only&lt;/strong&gt;: Replace &lt;code&gt;Math.random()&lt;/code&gt; with a deterministic 32-bit integer hash (&lt;code&gt;seededNoise1D(seed, t)&lt;/code&gt;) so frame &lt;code&gt;300&lt;/code&gt; hashes identically on every run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The FFmpeg Contact-Sheet Critic&lt;/strong&gt;: Before the agent shows you an MP4, it uses &lt;strong&gt;FFmpeg&lt;/strong&gt; to extract a 2-fps contact sheet and a 12-frame strip around the fastest motion, inspects its own rendered frames via &lt;strong&gt;Chrome DevTools MCP&lt;/strong&gt;, scores them from 1 to 10, and fixes the worst 3 defects automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Architectural Piece&lt;/th&gt;
&lt;th&gt;What Goes Wrong Without It&lt;/th&gt;
&lt;th&gt;What Fixes It in Production&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frame Function&lt;/td&gt;
&lt;td&gt;Renders drift under GPU load; every edit requires replaying from t = 0.&lt;/td&gt;
&lt;td&gt;window.seek(t) + pure analytical functions of time + zero CSS timers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Closed-Form Springs&lt;/td&gt;
&lt;td&gt;Fixed linear/cubic-bezier easing feels robotic; iterative physics breaks random frame access.&lt;/td&gt;
&lt;td&gt;track(t) = v0 + Σ (v_i - v_(i-1)) * spring(t - t_i) with analytical damping.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Agent Rig&lt;/td&gt;
&lt;td&gt;Chat-only models never see or hear their own broken layouts or overlapping text.&lt;/td&gt;
&lt;td&gt;Agent shell + Headless Chromium / Chrome DevTools MCP + FFmpeg.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio &amp;amp; Beat Clock&lt;/td&gt;
&lt;td&gt;Voiceovers and music float on top of visuals with off-beat state transitions.&lt;/td&gt;
&lt;td&gt;Chatterbox / F5-TTS + faster-whisper word timestamps + librosa beats.json.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The Contact-Sheet Critic&lt;/td&gt;
&lt;td&gt;The first render ships with clipped text, dead beats, or loop stutters.&lt;/td&gt;
&lt;td&gt;6-across FFmpeg contact sheet + 360px mobile readability test + automated self-critique.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  2. Alex Patterson's Architectural Tier List: All 14 Code-Driven Video Repos Ranked
&lt;/h2&gt;

&lt;p&gt;Instead of treating all 14 repositories from &lt;code&gt;@0xnicc0&lt;/code&gt;'s list as interchangeable, here is how they rank in our production &lt;strong&gt;CodingCat.dev&lt;/strong&gt; stack based on determinism, GPU efficiency, MCP agent ergonomics, and how heavily we rely on them to build &lt;strong&gt;3D AJ&lt;/strong&gt; and our &lt;strong&gt;Courses&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "_key": "aj3d_tierlist_d57fa109f9",
  "_type": "tierList",
  "ajComment": "We used Three.js, Blender MCP, faster-whisper &amp;amp; FFmpeg to build my 3D GLB rig! 🐾🧊",
  "items": [
    {
      "_key": "aj3d_ti_0_c4bda701f2",
      "_type": "tierItem",
      "category": "Browser 3D &amp;amp; WebGPU",
      "details": [
        {
          "_key": "aj3d_td_0_3_60dddc91b1",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Renders aj-3d-mascot.glb in Aj3dMascotViewer.astro with custom Royal Purple &amp;amp; Electric Lime rim lighting and deterministic window.seek(t) bone posing."
        }
      ],
      "name": "Three.js (mrdoob/three.js)",
      "summary": "The undisputed king of browser 3D. Zero plugin install for users, native glTF 2.0 .glb support, and instant seek(t) scrubbing.",
      "tier": "S"
    },
    {
      "_key": "aj3d_ti_1_c3ea8f2789",
      "_type": "tierItem",
      "category": "Media Compositor &amp;amp; Critic",
      "details": [
        {
          "_key": "aj3d_td_1_3_2b2088076a",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Encodes 1080p MP4 lessons, normalizes audio to -14 LUFS, and generates 6-across contact sheets for agent visual critique."
        }
      ],
      "name": "FFmpeg (FFmpeg/FFmpeg)",
      "summary": "Non-negotiable infrastructure. Every frame pipeline, audio normalizer, and contact-sheet critic ends in FFmpeg.",
      "tier": "S"
    },
    {
      "_key": "aj3d_ti_2_ac3e5e5489",
      "_type": "tierItem",
      "category": "Word-Level Audio Alignment",
      "details": [
        {
          "_key": "aj3d_td_2_3_9bb6db9823",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Runs on our local RTX 5090 in synthesize-voiceover.py to extract sub-20ms word timestamps for caption burn-in and AJ lip-sync."
        }
      ],
      "name": "faster-whisper (SYSTRAN/faster-whisper)",
      "summary": "4x faster than stock Whisper with lower VRAM via CTranslate2. Gives agents an exact millisecond clock for every spoken word.",
      "tier": "S"
    },
    {
      "_key": "aj3d_ti_3_79dde935e4",
      "_type": "tierItem",
      "category": "Agentic 3D Scene Control",
      "details": [
        {
          "_key": "aj3d_td_3_3_e60917bafa",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Bridges Claude / Antigravity over a socket (port 9876) to execute scripts/blender-aj-3d-pipeline.py, verify AJ's 12 rig nodes, and set up 3-point lighting."
        }
      ],
      "name": "Blender MCP (ahujasid/mcp-for-blender)",
      "summary": "Turns Blender from a manual GUI into an agent-programmable 3D compiler. Essential for automated mesh inspection and rigging.",
      "tier": "S"
    },
    {
      "_key": "aj3d_ti_4_cd237ff0af",
      "_type": "tierItem",
      "category": "3D Modeling, Rigging &amp;amp; Baking",
      "details": [
        {
          "_key": "aj3d_td_4_3_750b1734d0",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Headless -b -P verification of AJ's armature hierarchy, PBR material roughness tokens, and .glb export."
        }
      ],
      "name": "Blender (blender/blender)",
      "summary": "The open-source 3D standard. Combined with Python bpy, it eliminates manual 3D artist bottlenecks.",
      "tier": "A"
    },
    {
      "_key": "aj3d_ti_5_df5cd9265c",
      "_type": "tierItem",
      "category": "React Video Composition",
      "details": [
        {
          "_key": "aj3d_td_5_3_f870e184fc",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Declarative &amp;lt;Sequence&amp;gt; and useCurrentFrame() architecture for multi-scene React video compositions and data stories."
        }
      ],
      "name": "Remotion (remotion-dev/remotion)",
      "summary": "Best-in-class DX when your team already builds in React and Tailwind CSS. Deterministic frame rendering out of the box.",
      "tier": "A"
    },
    {
      "_key": "aj3d_ti_6_1f681ee5e6",
      "_type": "tierItem",
      "category": "Agent Procedural Memory",
      "details": [
        {
          "_key": "aj3d_td_6_3_fb2f3e34c3",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Teaches coding agents how to write idiomatic Remotion compositions, spring interpolations, and audio sync without hallucinating APIs."
        }
      ],
      "name": "Remotion Skills (remotion-dev/skills)",
      "summary": "Crucial context upgrade. Without this skill, LLMs write brittle React effects instead of pure useCurrentFrame() math.",
      "tier": "A"
    },
    {
      "_key": "aj3d_ti_7_01b72c0a65",
      "_type": "tierItem",
      "category": "Live DOM &amp;amp; Frame Inspection",
      "details": [
        {
          "_key": "aj3d_td_7_3_5ea2bd4e01",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Lets our agent inspect /mascot-lab, verify WebGL canvas sizing, check console errors, and audit rendered frames before MP4 export."
        }
      ],
      "name": "Chrome DevTools MCP (ChromeDevTools/chrome-devtools-mcp)",
      "summary": "Closes the blind-agent gap. Your agent sees the exact DOM, computed styles, and pixel output in real time.",
      "tier": "A"
    },
    {
      "_key": "aj3d_ti_8_9832bfc504",
      "_type": "tierItem",
      "category": "Timeline &amp;amp; UI Motion",
      "details": [
        {
          "_key": "aj3d_td_8_3_dbf414d1e5",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Drives deterministic timeline scrubbing (tl.time(t)) and complex SVG morphs alongside our closed-form spring engine."
        }
      ],
      "name": "GSAP (greensock/GSAP)",
      "summary": "Battle-tested timeline control. Just remember to pause auto-ticking and drive tl.time(t) from window.seek(t) in render mode.",
      "tier": "A"
    },
    {
      "_key": "aj3d_ti_9_b82afdd23f",
      "_type": "tierItem",
      "category": "Agent-Native HTML-to-Video",
      "details": [
        {
          "_key": "aj3d_td_9_3_3527234afe",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Compiles standalone HTML/CSS/JS scenes directly into high-fps video frames with minimal framework overhead."
        }
      ],
      "name": "HyperFrames (heygen-com/hyperframes)",
      "summary": "Purpose-built for coding agents that prefer writing raw HTML/Canvas over full React bundles. Fast and lightweight.",
      "tier": "B"
    },
    {
      "_key": "aj3d_ti_10_9f1ece4f53",
      "_type": "tierItem",
      "category": "Open-Source Voice Synthesis",
      "details": [
        {
          "_key": "aj3d_td_10_3_3b8dee265e",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Zero-shot expressive TTS alternative alongside our RTX 5090 F5-TTS pipeline for generating clean lesson narration at $0 API cost."
        }
      ],
      "name": "Chatterbox (resemble-ai/chatterbox)",
      "summary": "Impressive open-source expressive voice cloning with emotion control. Great local alternative to paid ElevenLabs seats.",
      "tier": "B"
    },
    {
      "_key": "aj3d_ti_11_36fcd0b6a0",
      "_type": "tierItem",
      "category": "Node-Based Diffusion &amp;amp; 3D Gen",
      "details": [
        {
          "_key": "aj3d_td_11_3_94519bb38f",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Local GPU workflow graph for generating multi-view character turnaround sheets (Front, Left, Right) and base video plates for generate-then-trace."
        }
      ],
      "name": "ComfyUI (Comfy-Org/ComfyUI)",
      "summary": "Unmatched local GPU control for image-to-3D plates and texture maps, though JSON workflow graphs require disciplined versioning.",
      "tier": "B"
    },
    {
      "_key": "aj3d_ti_12_d8d0b0c4c6",
      "_type": "tierItem",
      "category": "Automated UI &amp;amp; Design Critic",
      "details": [
        {
          "_key": "aj3d_td_12_3_92fbe57224",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Audits typography hierarchy, spacing tokens, contrast ratios, and visual polish against banned AI slop patterns."
        }
      ],
      "name": "Impeccable (pbakaus/impeccable)",
      "summary": "Great automated design gate to stop agents from shipping generic purple-gradient SaaS clichés.",
      "tier": "B"
    },
    {
      "_key": "aj3d_ti_13_d153775d03",
      "_type": "tierItem",
      "category": "Reference Media Ingestion",
      "details": [
        {
          "_key": "aj3d_td_13_3_ad6ff13a87",
          "_type": "tierDetail",
          "label": "How We Use It on CodingCat.dev",
          "value": "Pulls reference launch videos and audio tracks so FFmpeg can slice 0.5s reference frames into docs/style_guide.md."
        }
      ],
      "name": "yt-dlp (yt-dlp/yt-dlp)",
      "summary": "Indispensable utility for reference grammar extraction, though strictly an ingestion CLI rather than a rendering engine.",
      "tier": "C"
    }
  ],
  "subtitle": "Ranked from S-Tier to C-Tier across deterministic window.seek(t) support, GPU performance, MCP agent integration, and how we use them for 3D AJ.",
  "title": "Alex's 2026 Code-Driven Video &amp;amp; 3D Web Tier List (All 14 Repos Ranked)"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Deep Dive: How We Built and Upgraded 3D AJ the Cat Across CodingCat.dev
&lt;/h2&gt;

&lt;p&gt;Before this upgrade, AJ the Cat lived in two separate worlds on &lt;strong&gt;CodingCat.dev&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Static 3D Turnaround Renders&lt;/strong&gt;: High-resolution Pixar-style vinyl-toy studio JPEGs (&lt;code&gt;assets/AJ-3D-Headphones-Front.jpg&lt;/code&gt;, &lt;code&gt;Left.jpg&lt;/code&gt;, &lt;code&gt;Right.jpg&lt;/code&gt;) used in YouTube thumbnails and video bumpers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2D Articulated Vector SVG (&lt;code&gt;AjAnimatedMascot.astro\&lt;/code&gt;)&lt;/strong&gt;: A 57-path inline SVG rig with 14 bone pivot groups (&lt;code&gt;#aj-head-group&lt;/code&gt;, &lt;code&gt;#aj-arm-right&lt;/code&gt;, &lt;code&gt;#aj-tail&lt;/code&gt;, etc.) driven by CSS &lt;code&gt;@keyframes&lt;/code&gt; and random &lt;code&gt;setTimeout&lt;/code&gt; blinks.&lt;/li&gt;
&lt;/ol&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%2Fcdn.sanity.io%2Fmedia-libraries%2Fmlttp0BZbCpV%2Fimages%2F29778ee0988438e6be3bf30b0ac24eee4375007c-1376x768.png%3Ffit%3Dmax%26auto%3Dformat" 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%2Fcdn.sanity.io%2Fmedia-libraries%2Fmlttp0BZbCpV%2Fimages%2F29778ee0988438e6be3bf30b0ac24eee4375007c-1376x768.png%3Ffit%3Dmax%26auto%3Dformat" alt="Unified AJ Rig Architecture Diagram" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While the 2D SVG rig had zero external JavaScript dependencies, its CSS &lt;code&gt;@keyframes&lt;/code&gt; and &lt;code&gt;Math.random()&lt;/code&gt; blink timers meant &lt;strong&gt;it was not frame-seekable&lt;/strong&gt; for headless video rendering, and visitors could not orbit or inspect a real 3D mesh in the browser.&lt;/p&gt;

&lt;p&gt;Here is the exact 4-stage architecture we implemented to unify &lt;strong&gt;2D Vector AJ&lt;/strong&gt; and &lt;strong&gt;3D GLB AJ&lt;/strong&gt; under a single deterministic motion engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 1: Programmatic 3D Vinyl-Toy GLB Generation (scripts/build-aj-3d-glb.mjs) &amp;amp; Blender MCP Verification
&lt;/h3&gt;

&lt;p&gt;To ensure 3D AJ matches every single anatomical law in our Design System (&lt;code&gt;09-assets.md&lt;/code&gt;) while keeping the binary payload compact (&lt;code&gt;756 KB&lt;/code&gt;) and 100% deterministic, we built &lt;code&gt;scripts/build-aj-3d-glb.mjs&lt;/code&gt; and paired it with our headless &lt;strong&gt;Blender MCP&lt;/strong&gt; verification script (&lt;code&gt;scripts/blender-aj-3d-pipeline.py&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Every anatomical feature of AJ is mapped to a named glTF 2.0 node so both &lt;strong&gt;Blender&lt;/strong&gt; (&lt;code&gt;bpy.data.objects&lt;/code&gt;) and &lt;strong&gt;Three.js&lt;/strong&gt; (&lt;code&gt;gltf.scene.getObjectByName&lt;/code&gt;) can target the exact same bones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AjRoot&lt;/code&gt; -&amp;gt; &lt;code&gt;AjPedestal&lt;/code&gt; + &lt;code&gt;AjBodyRoot&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AjTorso&lt;/code&gt; (Matte-black &lt;code&gt;#0B0B0E&lt;/code&gt; PBR fur with roughness &lt;code&gt;0.62&lt;/code&gt; + dark charcoal &lt;code&gt;#2D2D30&lt;/code&gt; oval belly patch)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AjCollar&lt;/code&gt; + &lt;code&gt;AjHexTag&lt;/code&gt; (Soft Lavender &lt;code&gt;#B4A7D6&lt;/code&gt; collar with hexagonal gold &amp;amp; Royal Purple &lt;code&gt;"AJ"&lt;/code&gt; tag)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AjHeadGroup&lt;/code&gt; -&amp;gt; &lt;code&gt;AjEarLeft&lt;/code&gt;, &lt;code&gt;AjEarRight&lt;/code&gt;, &lt;code&gt;AjWhiskersLeft&lt;/code&gt;, &lt;code&gt;AjWhiskersRight&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AjEyeLeftPupil&lt;/code&gt; &amp;amp; &lt;code&gt;AjEyeRightPupil&lt;/code&gt; (Electric Lime Green &lt;code&gt;#C5E86C&lt;/code&gt; eyes with vertical black pupils and dual white catchlights)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AjJawMouth&lt;/code&gt; (Articulated jaw and pink tongue viseme group for 120 BPM audio-reactive lip-sync)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;AjHeadphonesGroup&lt;/code&gt; (&lt;code&gt;CodingCat.dev Podcast&lt;/code&gt; charcoal headband + Royal Purple &lt;code&gt;#7C3AED&lt;/code&gt; &amp;amp; Soft Lavender &lt;code&gt;#B4A7D6&lt;/code&gt; earcups fitting directly over his cat ears)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# scripts/blender-aj-3d-pipeline.py
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;bpy&lt;/span&gt;

&lt;span class="n"&gt;TOKENS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fur_black&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.043&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.043&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.055&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;       &lt;span class="c1"&gt;# #0B0B0E
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;belly_charcoal&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.176&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.176&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.188&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="c1"&gt;# #2D2D30
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;eye_lime&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.773&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.910&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.424&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;        &lt;span class="c1"&gt;# #C5E86C
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;royal_purple&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.486&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.227&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.929&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;    &lt;span class="c1"&gt;# #7C3AED
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;soft_lavender&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.706&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.655&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.839&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;   &lt;span class="c1"&gt;# #B4A7D6
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;import_and_verify_aj_glb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;glb_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;export_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Import AJ 3D GLB, verify canonical node hierarchy for seek(t), and re-export optimized GLB.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;bpy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ops&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_factory_settings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;use_empty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;bpy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ops&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;import_scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gltf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filepath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;glb_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;required_nodes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjRoot&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjBodyRoot&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjTorso&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjHeadGroup&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjHeadphonesGroup&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjEyeLeftPupil&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjEyeRightPupil&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjJawMouth&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjArmLeft&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjArmRight&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjTail&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AjHexTag&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;present&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;obj&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;bpy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;missing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;required_nodes&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;present&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;missing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Missing canonical 3D AJ rig nodes: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;missing&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;bpy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ops&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;export_scene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;gltf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filepath&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;export_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;export_format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GLB&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;export_yup&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Stage 2: Closed-Form Springs &amp;amp; Deterministic window.seek(t) (src/lib/aj-motion-engine.ts)
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;@0xnicc0&lt;/code&gt; and &lt;code&gt;@seeconvm&lt;/code&gt;'s guide, the secret to lifelike motion that remains 100% seekable at any arbitrary frame &lt;code&gt;t&lt;/code&gt; is &lt;strong&gt;stacking closed-form harmonic springs&lt;/strong&gt;:&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="nf"&gt;track&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;v0&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nc"&gt;Σ &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;v_i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nf"&gt;v_&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;spring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;t_i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because &lt;code&gt;closedFormSpring(dt, omega, zeta)&lt;/code&gt; is a pure analytical equation using &lt;code&gt;Math.exp(-zeta * omega * dt)&lt;/code&gt; and &lt;code&gt;Math.cos(omegaD * dt)&lt;/code&gt;, evaluating frame &lt;code&gt;812&lt;/code&gt; (&lt;code&gt;t = 13.533s&lt;/code&gt;) requires &lt;strong&gt;zero knowledge of frames &lt;code&gt;0\&lt;/code&gt; through &lt;code&gt;811\&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is the production motion engine we shipped in &lt;code&gt;apps/site/src/lib/aj-motion-engine.ts&lt;/code&gt;:&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;// apps/site/src/lib/aj-motion-engine.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;hashUint32&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&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="kr"&gt;number&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mh"&gt;0x9e3779b9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&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;imul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mh"&gt;0x85ebca6b&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&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;imul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mh"&gt;0xc2b2ae35&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;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&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;function&lt;/span&gt; &lt;span class="nf"&gt;seededUnitFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;seed&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="nx"&gt;step&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="kr"&gt;number&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;hashUint32&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;seed&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;747796405&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;step&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2891336453&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;4294967295&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;function&lt;/span&gt; &lt;span class="nf"&gt;closedFormSpring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;dt&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="nx"&gt;omega&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;18.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;zeta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.58&lt;/span&gt;&lt;span class="p"&gt;,&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="nx"&gt;dt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&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;dt&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&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;zeta&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;1&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;omegaD&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;omega&lt;/span&gt; &lt;span class="o"&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;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;zeta&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;zeta&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;env&lt;/span&gt; &lt;span class="o"&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;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;zeta&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;omega&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;dt&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;cosTerm&lt;/span&gt; &lt;span class="o"&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;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;omegaD&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;dt&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;sinTerm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;zeta&lt;/span&gt; &lt;span class="o"&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;sqrt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;zeta&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;zeta&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&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;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;omegaD&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cosTerm&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;sinTerm&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;env&lt;/span&gt; &lt;span class="o"&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;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;omega&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;omega&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;dt&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;Both &lt;code&gt;&amp;lt;AjAnimatedMascot /&amp;gt;&lt;/code&gt; (2D SVG) and &lt;code&gt;&amp;lt;Aj3dMascotViewer /&amp;gt;&lt;/code&gt; (3D Three.js GLB) subscribe to &lt;code&gt;window.seek(t)&lt;/code&gt; (&lt;code&gt;cc:seek&lt;/code&gt; custom event) and call &lt;code&gt;computeAjPoseAtTime(t, state)&lt;/code&gt;. You can test this live right now on &lt;a href="https://dev.to/mascot-lab"&gt;&lt;code&gt;/mascot-lab\&lt;/code&gt;&lt;/a&gt; using the &lt;strong&gt;&lt;code&gt;window.seek(t)\&lt;/code&gt; frame scrubber&lt;/strong&gt; or by opening DevTools and running &lt;code&gt;window.seek(4.25)&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 3: Zero-LCP-Penalty 3D Three.js Viewer (Aj3dMascotViewer.astro)
&lt;/h3&gt;

&lt;p&gt;A common mistake when adding &lt;strong&gt;Three.js&lt;/strong&gt; to a content site is mounting a heavy WebGL canvas above the fold that blocks Largest Contentful Paint (LCP).&lt;/p&gt;

&lt;p&gt;On &lt;strong&gt;CodingCat.dev&lt;/strong&gt;, we kept our zero-JS 57-path 2D SVG rig as the instant-paint SSR default and added an interactive &lt;strong&gt;2D SVG / 3D GLB toggle&lt;/strong&gt; in the Homepage Hero (&lt;code&gt;AnimatedHero.astro&lt;/code&gt;) and on &lt;a href="https://dev.to/mascot-lab"&gt;&lt;code&gt;/mascot-lab\&lt;/code&gt;&lt;/a&gt;. When you switch to &lt;code&gt;3D GLB&lt;/code&gt;, &lt;code&gt;Aj3dMascotViewer.astro&lt;/code&gt; loads &lt;code&gt;/models/aj-3d-mascot.glb&lt;/code&gt; (&lt;code&gt;756 KB&lt;/code&gt;), lights AJ with ACES Filmic tone mapping plus Royal Purple (&lt;code&gt;#7C3AED&lt;/code&gt;) and Electric Lime (&lt;code&gt;#C5E86C&lt;/code&gt;) spot rim lights, and binds cursor coordinates to &lt;code&gt;AjEyeLeftPupil&lt;/code&gt; and &lt;code&gt;AjEyeRightPupil&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 4: 120 BPM Audio-Reactive Lip-Sync on Podcast Pages &amp;amp; Video Studio
&lt;/h3&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%2Fcdn.sanity.io%2Fmedia-libraries%2Fmlttp0BZbCpV%2Fimages%2Fc61a43a6a0bfde0d1546d7750250dff1012cbb22-1376x768.png%3Ffit%3Dmax%26auto%3Dformat" 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%2Fcdn.sanity.io%2Fmedia-libraries%2Fmlttp0BZbCpV%2Fimages%2Fc61a43a6a0bfde0d1546d7750250dff1012cbb22-1376x768.png%3Ffit%3Dmax%26auto%3Dformat" alt="Audio Clock &amp;amp; Lip-Sync Architecture Diagram" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Section 6 of the Opus 5.5 Motion Design guide (&lt;em&gt;"Springs and Sound, or Why Cheap Motion Feels Cheap"&lt;/em&gt;), sound and picture must share the exact same clock. We wired &lt;code&gt;PodcastListen.astro&lt;/code&gt; and &lt;code&gt;/podcasts&lt;/code&gt; to &lt;code&gt;window.setAjAudioAmplitude(amp, bpm)&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whenever you play an episode in &lt;code&gt;PodcastListen.astro&lt;/code&gt; (or click &lt;strong&gt;Test AJ 120 BPM Beat Sync&lt;/strong&gt; on &lt;code&gt;/podcasts&lt;/code&gt;), AJ's jaw viseme (&lt;code&gt;#aj-talking-frame&lt;/code&gt; in 2D SVG and &lt;code&gt;AjJawMouth&lt;/code&gt; in 3D GLB), head nod, and ear bounce lock to the audio envelope at 120 BPM.&lt;/li&gt;
&lt;li&gt;In our local RTX 5090 &lt;code&gt;tools/video-studio/synthesize-voiceover.py&lt;/code&gt; pipeline, &lt;strong&gt;faster-whisper&lt;/strong&gt; extracts word-level timestamps into &lt;code&gt;storyboard.json&lt;/code&gt; so every rendered Course Lesson video aligns captions, diagram transitions, and AJ reactions to the millisecond.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;AJ Pro-Tip Callout: Never Use &lt;code&gt;Math.random()\&lt;/code&gt; or Unpaused Timelines in Headless Video Renders&lt;/strong&gt; When capturing frames with Playwright or Headless Chrome, even a single &lt;code&gt;Math.random()&lt;/code&gt; inside a blink timer or particle emitter will cause a visual stutter at your video's loop point. Always derive blinks and noise from &lt;code&gt;hashUint32(seed + Math.floor(t * 60))&lt;/code&gt; and drive every animation from &lt;code&gt;window.seek(t)&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  4. Full Course Roadmap: 5 Flagship Stack Courses + 14 Deep-Dive Tool Courses
&lt;/h2&gt;

&lt;p&gt;To help you master this entire code-driven media and 3D web stack without paying &lt;code&gt;$1,200&lt;/code&gt; per launch video, we have prepped &lt;strong&gt;19 new Courses&lt;/strong&gt; (5 Flagship Architectural Stack Courses + 14 dedicated Tool-by-Tool Courses, totaling &lt;strong&gt;95 Lessons&lt;/strong&gt;) in the &lt;strong&gt;CodingCat.dev&lt;/strong&gt; Course Factory (&lt;code&gt;/courses&lt;/code&gt;):&lt;/p&gt;

&lt;h3&gt;
  
  
  The 5 Flagship Stack Courses
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Flagship 1: Programmatic Video with React, Remotion &amp;amp; Agent Skills&lt;/strong&gt; (&lt;code&gt;Remotion&lt;/code&gt; + &lt;code&gt;Remotion Skills&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flagship 2: Agentic 3D Web Pipelines with Blender, Blender MCP &amp;amp; Three.js&lt;/strong&gt; (&lt;code&gt;Blender&lt;/code&gt; + &lt;code&gt;Blender MCP&lt;/code&gt; + &lt;code&gt;Three.js&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flagship 3: Deterministic HTML Motion &amp;amp; Visual Critique with HyperFrames, GSAP, Impeccable &amp;amp; Chrome DevTools MCP&lt;/strong&gt; (&lt;code&gt;HyperFrames&lt;/code&gt; + &lt;code&gt;GSAP&lt;/code&gt; + &lt;code&gt;Impeccable&lt;/code&gt; + &lt;code&gt;Chrome DevTools MCP&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flagship 4: Local GPU Audio &amp;amp; Diffusion Pipelines with Chatterbox, faster-whisper &amp;amp; ComfyUI&lt;/strong&gt; (&lt;code&gt;Chatterbox&lt;/code&gt; + &lt;code&gt;faster-whisper&lt;/code&gt; + &lt;code&gt;ComfyUI&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flagship 5: Automated Media Engineering &amp;amp; Reference Extraction with FFmpeg &amp;amp; yt-dlp&lt;/strong&gt; (&lt;code&gt;FFmpeg&lt;/code&gt; + &lt;code&gt;yt-dlp&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The 14 Dedicated Tool-by-Tool Courses (1 Per GitHub Repo)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Course #&lt;/th&gt;
&lt;th&gt;Course Title &amp;amp; Slug (/course/[slug])&lt;/th&gt;
&lt;th&gt;Primary GitHub Repo&lt;/th&gt;
&lt;th&gt;Core Production Deliverable&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;01&lt;/td&gt;
&lt;td&gt;Remotion in Production: React Video Composition (/course/remotion-react-video-production)&lt;/td&gt;
&lt;td&gt;remotion-dev/remotion&lt;/td&gt;
&lt;td&gt;Multi-aspect-ratio 60fps launch video rendered from React + Tailwind CSS.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;02&lt;/td&gt;
&lt;td&gt;Remotion Skills for AI Coding Agents (/course/remotion-skills-ai-agents)&lt;/td&gt;
&lt;td&gt;remotion-dev/skills&lt;/td&gt;
&lt;td&gt;Custom SKILL.md harness that teaches Claude Code &amp;amp; Antigravity deterministic video rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;03&lt;/td&gt;
&lt;td&gt;Blender 5.0 for Web Developers: Headless Python &amp;amp; GLB (/course/blender-headless-python-web-devs)&lt;/td&gt;
&lt;td&gt;blender/blender&lt;/td&gt;
&lt;td&gt;Automated bpy script that builds, lights, and exports a &amp;lt;1MB .glb mascot.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;04&lt;/td&gt;
&lt;td&gt;Blender MCP: Driving 3D Scenes with AI Agents (/course/blender-mcp-agentic-3d-scenes)&lt;/td&gt;
&lt;td&gt;ahujasid/mcp-for-blender&lt;/td&gt;
&lt;td&gt;Live TCP socket MCP server letting an agent model, rig, and render 3D AJ.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;05&lt;/td&gt;
&lt;td&gt;Three.js &amp;amp; WebGPU in Production: Interactive 3D Mascots (/course/threejs-webgpu-3d-mascots)&lt;/td&gt;
&lt;td&gt;mrdoob/three.js&lt;/td&gt;
&lt;td&gt;Lazy-loaded  with orbital camera, rim lights, and seek(t).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;06&lt;/td&gt;
&lt;td&gt;GSAP Deterministic Timelines &amp;amp; SVG Morphing (/course/gsap-deterministic-timelines-svg)&lt;/td&gt;
&lt;td&gt;greensock/GSAP&lt;/td&gt;
&lt;td&gt;Frame-locked tl.time(t) UI morphs and 57-path SVG bone animations.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;07&lt;/td&gt;
&lt;td&gt;HyperFrames: Agent-Native HTML-to-Video Rendering (/course/hyperframes-html-to-video-agents)&lt;/td&gt;
&lt;td&gt;heygen-com/hyperframes&lt;/td&gt;
&lt;td&gt;Zero-React standalone HTML/Canvas video compiler driven by window.seek(t).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;08&lt;/td&gt;
&lt;td&gt;faster-whisper on Local GPU: Word-Level Captions &amp;amp; Lip-Sync (/course/faster-whisper-word-level-captions)&lt;/td&gt;
&lt;td&gt;SYSTRAN/faster-whisper&lt;/td&gt;
&lt;td&gt;Sub-20ms word alignment pipeline driving dynamic captions and mascot visemes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;09&lt;/td&gt;
&lt;td&gt;Chatterbox TTS: Zero-Shot Local Voice Cloning (/course/chatterbox-local-voice-cloning)&lt;/td&gt;
&lt;td&gt;resemble-ai/chatterbox&lt;/td&gt;
&lt;td&gt;Expressive local voiceover synthesizer with phonetic code identifier rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;FFmpeg for AI Video Pipelines &amp;amp; Contact-Sheet Critics (/course/ffmpeg-ai-video-contact-sheet-critics)&lt;/td&gt;
&lt;td&gt;FFmpeg/FFmpeg&lt;/td&gt;
&lt;td&gt;-14 LUFS EBU R128 audio normalization, 6-across contact sheets, and H.264/AV1 mastering.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;Chrome DevTools MCP: Self-Healing Visual Agent Loops (/course/chrome-devtools-mcp-visual-agent-loops)&lt;/td&gt;
&lt;td&gt;ChromeDevTools/chrome-devtools-mcp&lt;/td&gt;
&lt;td&gt;Automated DOM/WebGL inspection loop that catches overlapping text before export.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;Impeccable: Automated Design &amp;amp; Motion Polish Gates (/course/impeccable-automated-design-critique)&lt;/td&gt;
&lt;td&gt;pbakaus/impeccable&lt;/td&gt;
&lt;td&gt;Pre-export design critic enforcing W3C design tokens and banning generic AI gradients.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;ComfyUI for 3D Turnarounds &amp;amp; Generate-Then-Trace (/course/comfyui-3d-turnarounds-video-workflows)&lt;/td&gt;
&lt;td&gt;Comfy-Org/ComfyUI&lt;/td&gt;
&lt;td&gt;Reproducible API workflow for multi-view mascot sheets and base motion plates.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;yt-dlp &amp;amp; Librosa: Reference Grammar &amp;amp; Beat Extraction (/course/yt-dlp-librosa-reference-beat-extraction)&lt;/td&gt;
&lt;td&gt;yt-dlp/yt-dlp&lt;/td&gt;
&lt;td&gt;Automated reference shotlist extractor (style_guide.md) and 120 BPM beats.json generator.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  5. Verdict: Purrfect or Pass?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Purrfect For&lt;/strong&gt;: Developer educators, SaaS founders, and frontend engineers who want agency-grade launch films, interactive 3D mascots (like &lt;strong&gt;3D AJ&lt;/strong&gt;), and automated video courses rendered deterministically from Git-versioned TypeScript and Python code for &lt;code&gt;$0&lt;/code&gt; in licensing fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pass If&lt;/strong&gt;: You need photorealistic live-action human cinema with complex cloth physics (where diffusion video models like Veo 3.1 still belong) or you are unwilling to write a structured &lt;code&gt;brief.md&lt;/code&gt; and &lt;code&gt;window.seek(t)&lt;/code&gt; render contract.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Head over to &lt;a href="https://dev.to/mascot-lab"&gt;&lt;code&gt;/mascot-lab\&lt;/code&gt;&lt;/a&gt; right now to toggle between &lt;strong&gt;2D Vector AJ&lt;/strong&gt; and &lt;strong&gt;3D Three.js GLB AJ&lt;/strong&gt;, scrub the &lt;strong&gt;&lt;code&gt;window.seek(t)\&lt;/code&gt;&lt;/strong&gt; timeline, download &lt;code&gt;aj-3d-mascot.glb&lt;/code&gt;, and explore all 19 new Courses on &lt;a href="https://dev.to/courses"&gt;&lt;code&gt;/courses\&lt;/code&gt;&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>threejs</category>
      <category>blender</category>
      <category>remotion</category>
    </item>
    <item>
      <title>AI in action: Adding AI-powered reviews in Firebase: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Tue, 03 Nov 2026 18:08:11 +0000</pubDate>
      <link>https://dev.to/codingcatdev/ai-in-action-adding-ai-powered-reviews-in-firebase-web-architecture-implementation-guide-5c82</link>
      <guid>https://dev.to/codingcatdev/ai-in-action-adding-ai-powered-reviews-in-firebase-web-architecture-implementation-guide-5c82</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-10-adding-ai-powered-reviews" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-10-adding-ai-powered-reviews&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;AI in action: Adding AI-powered reviews&lt;/strong&gt; by Alexander Nohe, Jeff Huleatt on the &lt;a href="https://firebase.blog/posts/2025/10/adding-ai-powered-reviews/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-10-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. Sometimes, the best AI feature is a subtle one. In our Friendly Eats app, we wanted to automatically suggest a star rating as a user wrote their full review. This not only reduces the friction of submitting a review, but had the unexpected benefit of helping users understand how others might perceive their review.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Mental Model: Why AI in action: Adding AI-powered reviews Matters for Web Devs
&lt;/h2&gt;

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect 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;As the user types in the dialog, the star rating automatically updates based on the content of their review. Importantly, the suggested star rating can also be overridden, because we want the reviewer to have the final say!&lt;/p&gt;

&lt;p&gt;Read on to see what decisions we made to implement this new feature.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design considerations
&lt;/h3&gt;

&lt;p&gt;We chose to use a client side SDK, in this case Firebase AI Logic. The primary reason that we chose to use Firebase AI Logic is to protect our Gemini API key.&lt;/p&gt;

&lt;p&gt;Using a server side SDK will also protect the API keys, but considering that we are not pulling in massive amounts of data and are just running quick inference, we decided to settle on Firebase AI Logic.&lt;/p&gt;

&lt;p&gt;First, Firebase AI Logic lets us use an on-device model if one is available, like Chrome’s Gemini Nano. That can help limit a significant number of calls to our Gemini API key.&lt;/p&gt;

&lt;p&gt;Remote Gemini calls made with AI Logic go through a proxy before reaching the Gemini model endpoints. The proxy stores the API keys so that we don’t need to include our Gemini API key in the client-side code. We can then make requests to the proxy and the proxy validates your app and forwards the API keys to the appropriate endpoint (either Vertex AI with a service account or Google Generative AI with an API key).&lt;/p&gt;

&lt;p&gt;Another feature that Firebase AI Logic provides which helps keep our endpoints secure from abuse is automatic integration with Firebase App Check to ensure that requests originating to our AI endpoints come from your app. This is done through an attestation provider like ReCaptcha Enterprise and its invisible attestation mechanism. It may add a few ms before the first request to Gemini in the app, but is otherwise seamless to the user.&lt;/p&gt;

&lt;p&gt;Picking a model is a tradeoff between cost, speed, and quality. Normally, I start using the largest model and work my way down to the smaller models to determine whether the trade offs from a larger model to a smaller model make sense. Since we are really just asking for a small output of a star rating between 1 and 5, it’s likely that the smaller models will provide the results that we are looking for without the cost and slower performance of a larger model. If the star rating is off, we can fall back on our functionality that lets the reviewer update the rating themselves.&lt;/p&gt;

&lt;p&gt;We narrowed down our choices to &lt;a href="https://developer.chrome.com/docs/ai/get-started" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemini Nano&lt;/strong&gt;&lt;/a&gt; from the &lt;a href="https://firebase.google.com/docs/ai-logic/hybrid-on-device-inference?api=dev" rel="noopener noreferrer"&gt;&lt;strong&gt;Hybrid SDK&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-flash-lite" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemini 2.5 Flash Lite&lt;/strong&gt;&lt;/a&gt; as the fallback option. This allows us to default to the built in AI API for users on supported browsers while falling back to Gemini Flash Lite for our other users. This decision can help us keep costs down for providing this feature as there is no cost for using Gemini Nano from the Hybrid SDK and the cost of Gemini 2.5 Flash Lite is much lower than other models while providing an acceptable amount of fidelity.&lt;/p&gt;

&lt;p&gt;We made two important decisions to design the most reliable prompt we could.&lt;/p&gt;

&lt;p&gt;First, we used &lt;a href="https://firebase.google.com/docs/ai-logic/generate-structured-output?api=dev" rel="noopener noreferrer"&gt;&lt;strong&gt;structured output&lt;/strong&gt;&lt;/a&gt; so we only receive a JSON value containing the star rating back from the model. This helps prevent overly verbose responses for why a star rating was given,constraining the outputs to something that we can parse in our client code.&lt;/p&gt;

&lt;p&gt;The second thing we did to increase the accuracy was give examples in our prompt to guide our model on what we would consider a high rating versus a low rating. This is a great way to tune responses to better fit the culture of your app’s userbase.&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="nx"&gt;Based&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;supplied&lt;/span&gt; &lt;span class="nx"&gt;review&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;translate&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;review&lt;/span&gt;
&lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;star&lt;/span&gt; &lt;span class="nx"&gt;rating&lt;/span&gt; &lt;span class="nx"&gt;that&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;equivalent&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;example&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;The&lt;/span&gt; &lt;span class="nx"&gt;food&lt;/span&gt; &lt;span class="nx"&gt;was&lt;/span&gt; &lt;span class="nx"&gt;wonderful&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;really&lt;/span&gt;
    &lt;span class="nx"&gt;enjoyed&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;amazing&lt;/span&gt; &lt;span class="nx"&gt;experience&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/output&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/example&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;can&lt;/span&gt; &lt;span class="nx"&gt;say&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;certain&lt;/span&gt; &lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;will&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="nx"&gt;eat&lt;/span&gt; &lt;span class="nx"&gt;here&lt;/span&gt; &lt;span class="nx"&gt;again&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/output&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/example&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
&lt;span class="nx"&gt;Input&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;userInput&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are using Firestore to store our reviews and restaurants. Firestore is secured using Firestore security rules. While our original app implementation still needed robust security rules, we did not need to change anything from the original implementation to this implementation as we are not using any new methods to update the reviews. Having said that, we think it’s important to call out what robust security rules would look like for submitting a new review, so I have included what those look like here:&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="nx"&gt;rules_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;service&lt;/span&gt; &lt;span class="nx"&gt;cloud&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firestore&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;databases&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;database&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/documents &lt;/span&gt;&lt;span class="err"&gt;{
&lt;/span&gt;    &lt;span class="c1"&gt;// ommitting for brevity&lt;/span&gt;
    &lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;restaurants&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;restaurantId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// ommitting restaurants rules for brevity&lt;/span&gt;

        &lt;span class="c1"&gt;// Ratings:&lt;/span&gt;
        &lt;span class="c1"&gt;//   - Authenticated user can read&lt;/span&gt;
        &lt;span class="c1"&gt;//   - Authenticated user can create if userId matches&lt;/span&gt;
        &lt;span class="c1"&gt;//   - Deletes and updates are not allowed (default)&lt;/span&gt;
        &lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;ratings&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;ratingId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;allow&lt;/span&gt; &lt;span class="nx"&gt;read&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
          &lt;span class="nx"&gt;allow&lt;/span&gt; &lt;span class="na"&gt;create&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&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;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;!=&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;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rating&lt;/span&gt; &lt;span class="k"&gt;in&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&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="nx"&gt;allow&lt;/span&gt; &lt;span class="na"&gt;update&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&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;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;uid&lt;/span&gt;
                        &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;!=&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;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rating&lt;/span&gt; &lt;span class="k"&gt;in&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&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="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;Here you can see that we do place constraints on the type of reviews that can be submitted. Since we are placing a high value on the text, we make sure that the text is not null. We also want to make sure that since the rating is AI generated, if the AI happens to return a value of six or even negative one, it cannot be written to the database and instead, we can enforce that the value is within an acceptable range through this data validation call.&lt;/p&gt;

&lt;h3&gt;
  
  
  The code
&lt;/h3&gt;

&lt;p&gt;To wrap this up, Let's break down how the actual implementation of this review component looks without all the framework considerations involved and highlight the important parts of our implementation.&lt;/p&gt;

&lt;p&gt;To setup AI logic, we want to use the hybrid model experience where it relies on the browser model (Gemini Nano) and can fall back to the affordable flash lite model when the browser model is not available.&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;getAI&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="nx"&gt;getGenerativeModel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;InferenceMode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Schema&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; 
&lt;span class="k"&gt;import&lt;/span&gt;

&lt;span class="c1"&gt;// Your web app's Firebase configuration&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
  &lt;span class="c1"&gt;//... Config here.&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Initialize Firebase&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;

&lt;span class="c1"&gt;// Setup the output schema&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
  &lt;span class="nx"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;starRating&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Schema&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="nx"&gt;format&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="c1"&gt;// setup the generative model calls.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt;
  &lt;span class="nx"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;InferenceMode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;PREFER_ON_DEVICE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;inCloudParams&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
    &lt;span class="nl"&gt;generationConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;responseMimeType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
      &lt;span class="na"&gt;responseSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;jsonSchema&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;onDeviceParams&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;promptOptions&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;jsonSchema&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;Here you can see that we initialize Firebase AI logic, much the same way that we initialize other services by first getting the AI logic singleton through a call to &lt;code&gt;getAI&lt;/code&gt;. Once we have the AI singleton, we then declare the structured output schema that we are looking to use through calling &lt;a href="https://firebase.google.com/docs/reference/js/ai.schema" rel="noopener noreferrer"&gt;&lt;strong&gt;Schema.object()&lt;/strong&gt;&lt;/a&gt;. This helps us define the schema and guide the model to what each value corresponds to through the use of descriptions and additionally, we can provide optional format options to further specify the format of the response value. Finally, we make a call to &lt;a href="https://firebase.google.com/docs/reference/js/ai.md#getgenerativemodel_c63f46a" rel="noopener noreferrer"&gt;&lt;strong&gt;getGenerativeModel()&lt;/strong&gt;&lt;/a&gt; which allows us to specify our options for our requests.&lt;/p&gt;

&lt;p&gt;Since it still takes time to process the inputs into the generative model, we generally don’t want to overload the model with requests on every single key press. Instead, what we want to do is send a request after a set amount of time (500 ms or longer) from the last key press and if a new keypress has started, cancel the existing requests by cancelling the timeout request.&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;let&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt;
  &lt;span class="k"&gt;switch&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="k"&gt;default&lt;/span&gt;
      &lt;span class="k"&gt;break&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;timeoutIds&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
  &lt;span class="nx"&gt;timeoutIds&lt;/span&gt; 

  &lt;span class="kd"&gt;const&lt;/span&gt;
    &lt;span class="c1"&gt;// Ommitted logic for generating stars here...&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; 

  &lt;span class="nx"&gt;timeoutIds&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;reviewBox&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we ignore the keys that do not change the input for requests which are the modifier keys. After we ignore those keys and return early from the &lt;code&gt;handleKeyUp&lt;/code&gt; function, we clear the timeout using the browsers clearTimeout function and empty the list of timeouts that we are waiting on. We then start a new timeout that runs inference on the user’s input (which we will see in the next section) and add that back to the timeouts array.&lt;/p&gt;

&lt;p&gt;Here we are actually running the code that runs inference.&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;const&lt;/span&gt;
  &lt;span class="nx"&gt;Based&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;supplied&lt;/span&gt; &lt;span class="nx"&gt;review&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;translate&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;review&lt;/span&gt;
    &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;star&lt;/span&gt; &lt;span class="nx"&gt;rating&lt;/span&gt; &lt;span class="nx"&gt;that&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;equivalent&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;example&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;The&lt;/span&gt; &lt;span class="nx"&gt;food&lt;/span&gt; &lt;span class="nx"&gt;was&lt;/span&gt; &lt;span class="nx"&gt;wonderful&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;I&lt;/span&gt;
      &lt;span class="nx"&gt;really&lt;/span&gt; &lt;span class="nx"&gt;enjoyed&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;amazing&lt;/span&gt; &lt;span class="nx"&gt;experience&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/output&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/example&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;can&lt;/span&gt; &lt;span class="nx"&gt;say&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;certain&lt;/span&gt; &lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;will&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="nx"&gt;eat&lt;/span&gt; &lt;span class="nx"&gt;here&lt;/span&gt; &lt;span class="nx"&gt;again&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/input&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/output&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/example&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
  &lt;span class="nx"&gt;Input&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;result&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="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;ratingPicker&lt;/span&gt;&lt;span class="p"&gt;.&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="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, this is a call to &lt;code&gt;generateContent&lt;/code&gt; from our previously defined model which we then parse the JSON for to get our structured output. Once we have that, You can call a function to update the star value In your application.&lt;/p&gt;

&lt;p&gt;While the code snippets above show the feature in a Typescript format, we thought we would share the implementation as a react component here:&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;

import
import

import
  getAI,
  getGenerativeModel,
  GoogleAIBackend,
  InferenceMode,
  Schema,
} 
import

// Initialize the Firebase AI Logic client SDK
const
  {
    // Your web app's Firebase configuration
  }
);
const

// Set up the schema and model
const
  properties: {
    starRating: Schema.
      description: 
    }),
  },
});
const
  mode: InferenceMode.PREFER_ON_DEVICE,
  inCloudParams: {
    model: 
    generationConfig: {
      responseMimeType: 
      responseSchema: starSchema,
    },
  },
  onDeviceParams: {
    promptOptions: {
      responseConstraint: starSchema,
    },
  },
});

// Call the generative model and return the generated star rating
async
  const
  Based on the supplied review, translate the review
  to a star rating that is equivalent:

  &amp;lt;example&amp;gt;
    &amp;lt;input&amp;gt;The food was wonderful and I
    really enjoyed the amazing experience&amp;lt;/input&amp;gt;
    &amp;lt;output&amp;gt;5&amp;lt;/output&amp;gt;
  &amp;lt;/example&amp;gt;

  &amp;lt;example&amp;gt;
    &amp;lt;input&amp;gt;I can say for certain I will never eat here again&amp;lt;/input&amp;gt;
    &amp;lt;output&amp;gt;1&amp;lt;/output&amp;gt;
  &amp;lt;/example&amp;gt;

  Input : 
  `
  const
  const
  return
}

function
  let
  return
    clearTimeout
    timer 
  };
}

function
  const
  const
  const

  const
    () 
      debounce
        console.
        setGeneratingRating
        const
        setGeneratingRating
        setStars
      }, 
    []
  );

  useEffect
    if
      generateStarRating
    }
  }, [generateStarRating, reviewText]);

  return
    &amp;lt;&amp;gt;
      &amp;lt;
        id
        className
        value
        onChange
        placeholder
        autoFocus
      &amp;gt;
      &amp;lt;
        rating
        setRating
          setStars
      /&amp;gt;
      {generatingRating &amp;amp;&amp;amp; &amp;lt;span&amp;gt;Automatically generating a rating&amp;lt;/span&amp;gt;}
    &amp;lt;/&amp;gt;
  );
}

export
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&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;setRating&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nx"&gt;rating&lt;/span&gt;
  &lt;span class="nx"&gt;setRating&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="o"&gt;&amp;lt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
          &lt;span class="p"&gt;{[&lt;/span&gt;
          &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
              &lt;span class="kd"&gt;type&lt;/span&gt;
              &lt;span class="nx"&gt;id&lt;/span&gt;
              &lt;span class="nx"&gt;name&lt;/span&gt;
              &lt;span class="nx"&gt;value&lt;/span&gt;
              &lt;span class="nx"&gt;checked&lt;/span&gt;
              &lt;span class="nx"&gt;onChange&lt;/span&gt;
              &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
              &lt;span class="o"&gt;&amp;amp;&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&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="o"&gt;&amp;lt;&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;**Note: **You’ll see we pass &lt;code&gt;setRating&lt;/code&gt; into the Stars component. That lets reviewers override the AI suggestion if they don’t agree with it. This is an important pattern for any AI suggestion feature.&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;AI in action: Adding AI-powered reviews&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/adding-ai-powered-reviews/" rel="noopener noreferrer"&gt;AI in action: Adding AI-powered reviews on the Official Firebase Blog&lt;/a&gt; (published 2025-10-01 by Alexander Nohe, Jeff Huleatt)&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-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/post/firebase-2025-10-dataconnect-oct25" rel="noopener noreferrer"&gt;Data Connect: get started faster and have more data control&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 AI in action: Adding AI-powered reviews?
&lt;/h3&gt;

&lt;p&gt;AI in action: Adding AI-powered reviews (announced 2025-10-01 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, React, TypeScript, Security workloads. Sometimes, the best AI feature is a subtle one. In our Friendly Eats app, we wanted to automatically suggest a star rating as a user wrote their full review. This not only reduces the friction of submitting a review, but had the unexpected benefit of helping users understand how others might perceive their review. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/10/adding-ai-powered-reviews/" 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 AI in action: Adding AI-powered reviews 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 Studio: Tips and Tricks 2: Web Architecture &amp; Implementation Guide</title>
      <dc:creator>Alex Patterson</dc:creator>
      <pubDate>Tue, 03 Nov 2026 18:08:09 +0000</pubDate>
      <link>https://dev.to/codingcatdev/firebase-studio-tips-and-tricks-2-web-architecture-implementation-guide-54o6</link>
      <guid>https://dev.to/codingcatdev/firebase-studio-tips-and-tricks-2-web-architecture-implementation-guide-54o6</guid>
      <description>&lt;p&gt;Original: &lt;a href="https://codingcat.dev/post/firebase-2025-07-studio-tips-tricks-2" rel="noopener noreferrer"&gt;https://codingcat.dev/post/firebase-2025-07-studio-tips-tricks-2&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 2&lt;/strong&gt; by Tianzi Cai on the &lt;a href="https://firebase.blog/posts/2025/07/studio-tips-tricks-2/" rel="noopener noreferrer"&gt;&lt;strong&gt;Official Firebase Blog&lt;/strong&gt;&lt;/a&gt; (2025-07-07), 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 House ID to a First Person Shooter game, the App Prototyping agent in Firebase Studio has enabled business professionals, hobbyists, and a broad spectrum of software developers to create delightful web applications. Many said that they were able to do so in a dramatically shorter timeframe than working alone and the experience was magical. From a distance, it looks like they were able to do so effortlessly. The truth is, personal background and experience, prompting techniques, and patience all contribute to a successful outcome. In this blog post, I will share prompting tips and tricks, using a basic web application for Enterprise Resource Planning (ERP) built with the Prototyper as an example. By explaining the “why” behind each tip, I hope this blog post will set realistic expectations and lead to a happier developer experience for all, regardless of your technical expertise. Let’s get started.&lt;/p&gt;

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

&lt;p&gt;As a Google Developer Expert (GDE) for Firebase and Senior Solutions Architect 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;Did you miss part one of the Studio Tips and Tricks series? You can &lt;a href="https://firebase.blog/posts/2025/05/studio-tips-tricks" rel="noopener noreferrer"&gt;&lt;strong&gt;read it here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Initial prompt
&lt;/h3&gt;

&lt;p&gt;Initial prompts from as short as two words like “Go game” to as long as thousand-word Product Requirement Documents (PRD) have gone on to produce beautiful and functional web applications. This is possible because the Gemini models behind the prototyper can enrich and extract information from input of various lengths. Extremely short or extremely long prompts are not objectively wrong. However, they may introduce false expectations. As of today, the Prototyper is designed to generate a web application of no more than 10 core features on the first try. When you enter very short or expansive initial prompts, you might not get exactly what you envisioned.&lt;/p&gt;

&lt;p&gt;Generally speaking, it’s better if you approach the initial prompt like an elevator pitch that takes roughly 10-30 seconds to say out loud, and in it you describe what the app is, what it does, and how it looks briefly. This ensures that you get the optimal alignment on application complexity with the prototyper. Here is an example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Build a basic ERP for small businesses with a dashboard showing revenue, expenses, and profit, plus a calendar for appointments.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t worry if your initial prompt isn’t fleshed out yet. We recently added an “Enhance your prompt” option in the input field that appears as you type. Click the link to get an improved version of your prompt. The enhanced prompt of the above example looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“A basic business management app designed to simplify financial tracking and scheduling for small businesses. Key features include a dashboard displaying real-time revenue, expenses, and profit summaries, tools to add and manage income and expense records, and an integrated calendar for scheduling and viewing appointments. Use a clean, professional green and white color scheme.”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re still deciding how your application will work or how it will look, Gemini is a great place to have a back-and-forth conversation. Draft your initial prompt, then ask Gemini 2.5 Flash with Search grounding or Deep research to make it a power prompt, before you head back to Firebase Studio to prototype the application.&lt;/p&gt;

&lt;p&gt;I asked Gemini about the typical features of an ERP application, and it gave me a list of essential functionalities including sales and order management, inventory management, and Customer Resource Management (CRM). After learning more about each feature by asking questions, I felt sufficiently informed on the topic and more confident to carry on.&lt;/p&gt;

&lt;h3&gt;
  
  
  App blueprint
&lt;/h3&gt;

&lt;p&gt;As mentioned before, the prototyper turns your initial prompt into an app blueprint. The app blueprint outlines the core features, style guidelines, and technical stack of your application and acts as an agreement between you and the source code that will be generated. It is also editable.&lt;/p&gt;

&lt;p&gt;When editing the core features of the app blueprint, think about how you expect the user to interact with your application from start to finish. Take note of what you consider to be anchoring experiences along the way. The more atypical these user interactions are, the more important it is to give explicit instructions. Remember that what users must, should, and could do are enabled by product features. Your job is to connect the ideas in user-centric language.&lt;/p&gt;

&lt;p&gt;The prototyper came up with following core features for the ERP application:&lt;/p&gt;

&lt;p&gt;If you haven’t tried this yet, you’ll find the prototyper can output different app blueprints from the same initial prompt. This is expected due to the non-deterministic nature of LLM output, which we can take advantage of through human-in-the-loop involvement. Before generating the source code, I repeat the initial prompt and get a few different versions of the app blueprint. Personally, I enjoy comparing different app blueprints. It encourages me to think instead of clicking ahead hastily. I also become more opinionated as I make decisions on how to mix and match core features and develop a sense of what appeals to my design sensibilities.&lt;/p&gt;

&lt;p&gt;For the ERP application, I included a fourth feature that showed up in a subsequent app blueprint:&lt;/p&gt;

&lt;p&gt;I also changed up the style guides to my liking by tweaking the color scheme.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prototype view
&lt;/h3&gt;

&lt;p&gt;If the app blueprint looks good, it is time to start generating the application. Stay in the Prototyper view to add, modify, and delete parts of the user experience. Don’t ask for all the changes at once. Request one change per conversation turn to keep the Prototyper focused. Think in terms of code changes that need to happen to make the next commit; in other words, identify good stopping points that you aim to get to and you can come back to. This way, if you mess up or don’t like the subsequent changes, you have the option of easy rollback using the Restore feature. The **Restore **button appears next to the files in the **File changes **card in the dialog pane.&lt;/p&gt;

&lt;p&gt;Here is an update I wanted to make in the ERP application:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allow users to upload a receipt when they enter their expense and automatically populate the total expense field from the uploaded receipt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of requesting this as one change, I broke it up into two:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allow users to upload a receipt when they enter their expense&lt;/li&gt;
&lt;li&gt;Automatically populate the total expense field from the uploaded receipt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In case it’s not obvious how to break up certain larger tasks, feel free to ask the prototyper for help and have it step through the implementation one change at a time.&lt;/p&gt;

&lt;p&gt;Asking the Prototyper for alternative designs and plans may come as an afterthought if the initial suggested path failed to lead to a successful end. You can preempt this failure mode by engaging in self-consultation early. Of course, deciding when to do so depends on how much time you have, how familiar you are with the technologies, and how motivated you are to learn. One recommendation for a good time to ask for options is if a particular feature implementation involves different paying services.&lt;/p&gt;

&lt;p&gt;Before asking the Prototyper to proceed with automatically populating the total expense field from the uploaded receipts, I asked it to present a few choices. I knew different Optical Character Recognition (OCR) solutions existed, such as Google Cloud Document AI and Vertex AI Vision. I was interested in how the prototyper weighed the different APIs given its contextual knowledge of my codebase.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tell me at least two ways to implement total amount extraction from receipt images, explain their pros and cons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After reading through the comparisons in the Prototyper’s response, I went with Gemini Flash model for OCR because it had an easier integration with my AI stack. The trade-off in development complexity is well worth the increase in accuracy. I rephrased my request by telling the prototyper exactly what to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before users click “Log Expense”, if a receipt image is uploaded, use a Gemini multimodal model to extract the total amount paid in the uploaded receipt image for the “Amount” field&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything goes smoothly, you continue to grow your application by adding more features and functionalities through prompting. However, as your application becomes more complex, debugging via chat is likely to hit a snag. When that happens, see if you are willing to simplify your more ambitious ideas with mock data temporarily, and come back to flesh them out in the Code view.&lt;/p&gt;

&lt;p&gt;For example, I added a check for duplicates using fake CRM data instead of connecting to a real CRM database.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Before users click “Add Client”, check if the email entered exists in a mock CRM database to avoid duplicates&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Code view
&lt;/h3&gt;

&lt;p&gt;I touched on jumping into the Code view for more advanced feature development and debugging. Another reason you might want to do so is because of the known limitations of the prototyper. You have probably noticed that the technical stack section of the app blueprint is not modifiable today. For AI, the default is Gemini and Genkit. For UI, they are TypeScript, NextJS, and Tailwind CSS. While these are stated as-is and easy to find, limitations introduced in the system prompts of the prototyper aren’t as obvious. Sometimes when you see the prototyper getting stuck, it is due to conflicts between your instructions and its system instructions. You can learn about these limitations by asking about them, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/ask&lt;/code&gt; Tell me about the constraints you have around creating JSON schemas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here, You can run the slash command &lt;code&gt;/ask&lt;/code&gt;. This allows me to have many side conversations for learning purposes without impeding the main conversation flow used for prototyping.&lt;/p&gt;

&lt;p&gt;You can also upgrade from the built-in Gemini 2.0 model to Gemini 2.5 Flash or Pro model for more advanced reasoning and web browsing capabilities. There is a dropdown menu in the input field in the Code view. Follow the on-screen instructions to get an API key from a paying Google Cloud project. Note that Gemini 2.5 Pro &lt;a href="https://ai.google.dev/gemini-api/docs/pricing" rel="noopener noreferrer"&gt;&lt;strong&gt;currently&lt;/strong&gt;&lt;/a&gt; does not offer a free tier. I also recommend learning about its &lt;a href="https://cloud.google.com/vertex-ai/generative-ai/docs/models/gemini/2-5-pro" rel="noopener noreferrer"&gt;&lt;strong&gt;training cutoff dates&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Newer Gemini models have more recent knowledge of many public APIs. If the APIs you want to use have been updated since the training cutoff date, provide the URL to the official documentation to the prototyper when asking it to integrate with those. Similarly, if you want to use private APIs, you can copy and paste relevant API examples.&lt;/p&gt;

&lt;p&gt;I chose to integrate with HubSpot Free CRM in your application. With the correct file that needed the update opened, I prefixed the following prompt using the &lt;code&gt;/generate&lt;/code&gt; command to get the code suggestion:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/generate&lt;/code&gt; create, update, and delete contacts using email lookup as described here: &lt;a href="https://developers.hubspot.com/docs/guides/api/crm/objects/contacts" rel="noopener noreferrer"&gt;&lt;strong&gt;https://developers.hubspot.com/docs/guides/api/crm/objects/contacts&lt;/strong&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&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 2 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 2&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/07/studio-tips-tricks-2/" rel="noopener noreferrer"&gt;Firebase Studio: Tips and Tricks 2 on the Official Firebase Blog&lt;/a&gt; (published 2025-07-07 by Tianzi Cai)&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-07-houseid-studio-showcase" rel="noopener noreferrer"&gt;Bringing architecture to life with Firebase Studio&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-07-supercharge-firebase-studio-with-mcp" rel="noopener noreferrer"&gt;Supercharge your Firebase Studio workflow with MCP servers&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 2?
&lt;/h3&gt;

&lt;p&gt;Firebase Studio: Tips and Tricks 2 (announced 2025-07-07 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, Next.js, TypeScript workloads. From House ID to a First Person Shooter game, the App Prototyping agent in Firebase Studio has enabled business professionals, hobbyists, and a broad spectrum of software developers to create delightful web applications. Many said that they were able to do so in a dramatically shorter timeframe than working alone and the experience was magical. From a distance, it looks like they were able to do so effortlessly. The truth is, personal background and experience, prompting techniques, and patience all contribute to a successful outcome. In this blog post, I will share prompting tips and tricks, using a basic web application for Enterprise Resource Planning (ERP) built with the Prototyper as an example. By explaining the “why” behind each tip, I hope this blog post will set realistic expectations and lead to a happier developer experience for all, regardless of your technical expertise. Let’s get started. Developers can review the primary announcement on the &lt;a href="https://firebase.blog/posts/2025/07/studio-tips-tricks-2/" 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 2 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>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 Architect 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 Architect 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 Architect 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>
  </channel>
</rss>
