demo(ai-studio): add the Heirloom Recipes export, unmodified - #799
Open
tyler-reitz wants to merge 1 commit into
Open
demo(ai-studio): add the Heirloom Recipes export, unmodified#799tyler-reitz wants to merge 1 commit into
tyler-reitz wants to merge 1 commit into
Conversation
Exported from aistudio.google.com/apps/bundled/heirloom_recipes and committed exactly as exported, per the requirements protocol: the framework swap on the follow-up branch must not add functionality, so the vanilla half stays untouched. Two things a reviewer will notice, both intentional and both upstream: - It points at the Google-internal project makersuite-showcase, with a named Firestore database. It cannot run against that project from outside, and firestore.rules gates every collection behind auth, with recipes additionally requiring household membership. Repointing at a project we control is a follow-up, not part of this commit. - It does not use Firebase AI Logic. src/services/geminiService.ts uses @google/genai with an API key that vite.config.ts inlines into the client bundle. Verified by building with a sentinel key and finding it in dist, with a keyless rebuild as the negative control. Vite 6 SPA on React 19 and firebase 12.9, no SSR and no emulator use. npm run build succeeds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The vanilla half of the second ReactFire comparison from the demo requirements doc: the Heirloom Recipes app exported from Google AI Studio, committed byte-for-byte as exported at
bb676b6. The follow-up PR swaps its two live Firestore subscriptions for ReactFire, and the diff between the two is the deliverable.Not a merge candidate. This branch and its framework counterpart exist to be compared and read, not landed.
What it is
A Vite 6 + React 19 SPA whose entire app is
src/App.tsx(1426 lines): Google sign-in, shared households, live recipes, and AI generation. Per the requirements doc, the export is kept exactly as generated, one giant file included.The finding worth knowing before reading anything else
Heirloom does not use Firebase AI Logic. Its AI path is
@google/genaiwith a Gemini API key compiled into the client bundle byvite.config.ts. Verified in the 08-18 spike by building with a sentinel key and finding it indist, with a keyless rebuild returning zero. The key is injected from the AI Studio user's own secrets, so in its hosted context it is their key in their applet, but it is a client-side key with no App Check, which is the pattern AI Logic exists to replace.Why it cannot run as exported
It hard-codes the Google-internal project
makersuite-showcasewith a named Firestore database, and its rules gate every collection behind auth plus household membership. There is no read-only mode. The framework branch repoints it in a separate first commit so this export stays untouched.