> Canonical URL: https://codingcat.dev/post/firebase-2025-06-fueld-ai-app-coach

# Fueld.AI's nutrition coach with Firebase and Google Cloud: Web Architecture & Implementation Guide

![CodingCat.dev tutorial cover image](https://cdn.sanity.io/images/hfh83o0w/production/86495abeedb4d1ea86d7d23d7e3865ee1eb4c0a4-1200x630.svg?w=1200&q=82&fit=max&auto=format)[![Alex Patterson](https://cdn.sanity.io/images/hfh83o0w/production/a606dfaa381aab08ddbe16a33fe1d3e1fb37c927-400x400.jpg?w=96&h=96&q=82&fit=max&auto=format)Alex Patterson](/author/alex-patterson)June 26, 2025

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 **Fueld.AI's nutrition coach with Firebase and Google Cloud**  by Raïssa Tona on the [**Official Firebase Blog**](https://firebase.blog/posts/2025/06/fueld-ai-app-coach/) (2025-06-25), here is our hands-on CodingCat.dev breakdown of what actually shipped, how it works under the hood, and how we wire it into production TypeScript, Next.js, Astro, SvelteKit, React, and Angular applications. In today’s competitive app environment, building and shipping new features quickly is imperative. That’s why Fueld.AI’s two engineers turned to Firebase to create their health and nutrition app, which transforms the photo of a meal into insights and actionable health guidance. By using Firebase, the team was able to quickly bring their app to market and continue to add new AI features.

## The Mental Model: Why Fueld.AI's nutrition coach with Firebase and Google Cloud Matters for Web Devs

As a Google Developer Expert (GDE) for Firebase and Senior Solutions Engineer at CodingCat.dev, I evaluate every Firebase update through one lens: does it reduce boilerplate while keeping our runtime security and cloud bills predictable? Firebase AI Logic lets you invoke Gemini and Imagen models from client and edge apps using the Firebase Web SDK while keeping your API credentials off the wire, enforcing Firebase App Check, and managing server-side prompt templates centrally.

> AJ Pro-Tip from Alex: Combine Firebase AI Logic with server prompt templates, Firebase Remote Config feature flags, and project spend caps so you can iterate on prompts or swap Gemini models instantly without redeploying your Next.js or Astro frontend.

## How It Works: Technical Breakdown & Implementation

### Laying a Firebase foundation

Fueld.AI’s mission is to improve nutrition at scale by capturing meal insights, providing personalized AI coaching, and securely sharing data with health professionals.

Fueld.AI began building their app using Firebase and Google Cloud tools and services:

- [**Firebase Authentication**](https://firebase.google.com/docs/auth) enables single sign-on with a user’s Google and Apple accounts.
- [**Cloud Storage for Firebase**](https://firebase.google.com/docs/storage) stores an image once it’s taken. The app then retrieves and displays it on-demand across devices or the web for users or approved professionals to review a past meal.
- [**Cloud Functions for Firebase**](https://firebase.google.com/docs/functions) sends the photo from Cloud Storage via Genkit to Gemini for analysis to identify each food and nutritional values, then writes the data to Cloud Firestore.
- Cloud [**Firestore**](https://firebase.google.com/docs/firestore), a flexible, NoSQL, database enables real-time synchronization, immediately returning meal data to the user, as granular access controls let coaches review client data to formulate dietary recommendations.
- [**Firebase Hosting**](https://firebase.google.com/docs/hosting) updates and distributes Fueld’s mobile and web apps, leveraging Google Cloud’s content delivery network for high availability and speed.
- [**Google Analytics**](https://developers.google.com/analytics) serves crucial insights for optimizing onboarding flows and attributing marketing traffic, while [**Google Cloud Logging**](https://cloud.google.com/logging) helps with debugging and monitoring AI in production.

“In previous companies, I needed a full backend engineering team,” Fueld.AI’s Co-Founder Glenn Smith says. “I wouldn’t have been able to iterate at the early stages of your application as easily if I needed to manage and update the databases.”

Fueld.AI’s two engineers found multiple ways to replicate the capabilities of larger teams using Firebase tools. For instance, deploying Cloud Functions independently of the app store releases enables rapid iteration and agile development of features in response to customer feedback. According to Smith, this was key to fixing issues, streamlining services, and achieving a near 100% uptime with automatic failover strategies.

### Upping the culinary game with Genkit

As Fueld.AI’s membership grew, the team began investigating bringing more advanced AI capabilities to their app. One example lets users take a picture of the ingredients in their fridge or cupboards, and Gemini generates a unique recipe based on their dietary preferences, trainer’s recommendations, and nutritional needs.

While Smith and the Fueld.AI team spent long hours hand-coding the AI tools and logic for the initial build of the app, they switched to [**Genkit**](https://genkit.dev/) to automate AI workflows.

Using this new process to transform a photo into a recipe:

- Genkit chains together API calls and instructions to Google’s Gemini and Imagen models via Vertex AI.
- Gemini 2.0 Flash deconstructs the contents of the image and determines what ingredients are on hand.
- Gemini studies notes from the user’s trainer, dietician, and meal diary secured in Firestore and Cloud Storage for Firebase to create the recipe. If there’s no photograph to accompany the dish, Genkit calls Vertex AI to prompt Imagen to develop a preview and then stores the photo for future clients.
- To further save time and resources, Fueld.AI built internal tools that reuse the same Genkit flow for quality assurance, and automatically regenerates AI images that fail to meet their standards.
- Throughout the entire lifecycle, Gemini Pro 2.5 acts as a ‘junior developer,’ diagnosing and contextualizing errors, generating tailored code, boosting the small team’s abilities.

### Two engineers, one platform

Only a few short years ago, building and scaling an always-available, AI-driven app and portal with such a small team would have been extremely difficult. “your app would be nowhere near as good or capable without Firebase supporting it,” Smith declares. “It’s super fast to set up new apps and easy to scale.”

Experience for yourself how [**Firebase**](https://firebase.google.com/)’s comprehensive suite of tools, Gemini 2.5 Pro’s advanced coding performance, and Genkit’s flexible framework can accelerate your development workflows and automate your AI backend.

## Show Me the Code: TypeScript & Web SDK Setup

Here is the production baseline pattern we use at CodingCat.dev when wiring Fueld.AI's nutrition coach with Firebase and Google Cloud into a modern TypeScript web application:

```
import { initializeApp } from "firebase/app";
import { getAI, getGenerativeModel, GoogleAIBackend } from "firebase/ai";
import { initializeAppCheck, ReCaptchaEnterpriseProvider } from "firebase/app-check";

const app = initializeApp({
  apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
  projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
});

// Protect AI endpoints in web apps with Firebase App Check
if (typeof window !== "undefined") {
  initializeAppCheck(app, {
    provider: new ReCaptchaEnterpriseProvider(process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY!),
    isTokenAutoRefreshEnabled: true,
  });
}

const ai = getAI(app, { backend: new GoogleAIBackend() });
export const geminiModel = getGenerativeModel(ai, { model: "gemini-2.5-flash" });
```

## Production Web Architecture & Security Checklist

Whether we are deploying on [**Firebase App Hosting**](https://firebase.google.com/docs/app-hosting), Cloudflare Workers, or Vercel, shipping AI features to production requires defense-in-depth across three layers:

- **Enforce Firebase App Check & Attestation: ** Protect your web endpoints, Cloud Functions, Data Connect GraphQL resolvers, and Firebase AI Logic calls against unauthorized replay or billing abuse using [**Firebase App Check with reCAPTCHA Enterprise**](https://firebase.google.com/docs/app-check).
- **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.
- **Keep Server & 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.

## Conclusion

Accelerate your full-stack web and AI development by pairing **Fueld.AI's nutrition coach with Firebase and Google Cloud**  with strict Security Rules, Firebase App Check, and local emulator testing. Come tell us on [**X (@CodingCatDev)**](https://x.com/CodingCatDev) and [**LinkedIn (CodingCat.dev)**](https://www.linkedin.com/company/codingcatdev) how you are using Firebase in your stack, and subscribe to the [**CodingCat.dev YouTube Channel**](https://www.youtube.com/@CodingCatDev?sub_confirmation=1) so you don't miss what we build next!

## Watch Our Related Firebase Video Tutorial on YouTube

Want to see how we architect and debug Firebase web applications live? Watch our related CodingCat.dev session [**Firebase SQL with Data Connect**](https://youtu.be/N25khadfUag) below, and make sure to [**Subscribe to CodingCat.dev on YouTube**](https://www.youtube.com/@CodingCatDev?sub_confirmation=1) for weekly full-stack web and AI deep dives:

## Resources, Official Docs & Related CodingCat.dev Guides

- **Primary Release Source: ** [Fueld.AI's nutrition coach with Firebase and Google Cloud on the Official Firebase Blog](https://firebase.blog/posts/2025/06/fueld-ai-app-coach/) (published 2025-06-25 by Raïssa Tona)
- **Official Firebase Documentation: ** [Firebase Developer Docs & Web SDK Reference](https://firebase.google.com/docs/web/setup)
- **Related on CodingCat.dev: [Introducing hybrid on-device inference using Firebase AI Logic](/post/firebase-2025-06-hybrid-inference-firebase-ai-logic)**
- **Related on CodingCat.dev: [Simplify development with public ports in Firebase Studio](/post/firebase-2025-07-firebase-studio-public-ports)**
- **Related on CodingCat.dev: [Firebase SQL with Data Connect](/podcast/firebase-sql-with-data-connect)**
- **Related on CodingCat.dev: [Build a Custom No-Code App in 90 Minutes](/podcast/build-a-custom-no-code-app-in-90-minutes)**

## Frequently Asked Questions (FAQ)

### What are the key capabilities introduced in Fueld.AI's nutrition coach with Firebase and Google Cloud?

Fueld.AI's nutrition coach with Firebase and Google Cloud (announced 2025-06-25 by the Firebase team) enhances the platform for Firebase, Google Cloud, Web Dev, AI, TypeScript, Serverless workloads. In today’s competitive app environment, building and shipping new features quickly is imperative. That’s why Fueld.AI’s two engineers turned to Firebase to create their health and nutrition app, which transforms the photo of a meal into insights and actionable health guidance. By using Firebase, the team was able to quickly bring their app to market and continue to add new AI features. Developers can review the primary announcement on the [**Firebase Blog**](https://firebase.blog/posts/2025/06/fueld-ai-app-coach/) alongside our implementation patterns and production checklist above.

### How do web developers use Fueld.AI's nutrition coach with Firebase and Google Cloud with Next.js, SvelteKit, React, or Angular?

Web developers can integrate these features using the modular Firebase JavaScript/TypeScript SDK, Firebase Data Connect web bindings, and [**Firebase App Hosting**](https://firebase.google.com/docs/app-hosting). Always pair client-side SDK initialization with Firebase App Check and strict Security Rules, and test locally with the Firebase Local Emulator Suite before deploying.

### Where can I watch video tutorials on Firebase Web and AI development?

You can watch our hands-on Firebase video walkthroughs on the [**CodingCat.dev YouTube Channel**](https://www.youtube.com/@CodingCatDev?sub_confirmation=1), including [**Firebase SQL with Data Connect**](https://youtu.be/N25khadfUag), and follow us on [**X (@CodingCatDev)**](https://x.com/CodingCatDev) for weekly full-stack tutorials.

## Recent Posts

[View More](/blog/page/1)[![PHP2Shell (CVE-2026-109618): How AI Found a Decade-Old Bug in 70% of the Web](https://cdn.sanity.io/images/hfh83o0w/production/e83065d0a4e2f841ce64d3f4aea8ddbbf07e5cb9-1376x768.jpg?w=1376&q=82&fit=max&auto=format)](/post/php2shell-cve-2026-109618-ai-php-security-scramble)

### [PHP2Shell (CVE-2026-109618): How AI Found a Decade-Old Bug in 70% of the Web](/post/php2shell-cve-2026-109618-ai-php-security-scramble)

October 22, 2026

Two critical pre-authentication RCE flaws in PHP (CVE-2026-109618 and CVE-2026-109619), uncovered by AI models from OpenAI and Google Gemini, sparked a global patching scramble across 70% of the web. Here is how PHP2Shell works and how to patch your servers.

[![Alex Patterson](https://cdn.sanity.io/images/hfh83o0w/production/a606dfaa381aab08ddbe16a33fe1d3e1fb37c927-400x400.jpg?w=96&h=96&q=82&fit=max&auto=format)Alex Patterson](/author/alex-patterson)[![Sanity Knowledge Bases](https://cdn.sanity.io/images/hfh83o0w/production/38b0f021c51d97043c8a1ebf31d505a0ea877b7c-2752x1536.jpg?w=1920&q=82&fit=max&auto=format)](/post/sanity-knowledge-bases)

### [Sanity Knowledge Bases](/post/sanity-knowledge-bases)

October 17, 2026

Eliminate query-time guessing in your AI agents. Learn how Sanity Context Knowledge Bases compile structured datasets, crawled documentation websites, and uploaded files ahead of time, resolve conflicting facts, and serve a compact outline over Context MCP.

[![Alex Patterson](https://cdn.sanity.io/images/hfh83o0w/production/a606dfaa381aab08ddbe16a33fe1d3e1fb37c927-400x400.jpg?w=96&h=96&q=82&fit=max&auto=format)Alex Patterson](/author/alex-patterson)