Firestore
A NoSQL cloud database service provided by Firebase, designed for mobile and web application development. It supports real-time data synchronization, offline access, and flexible security rules configuration.
Core Facts
Firebase AI Logic packages Google Cloud's Gemini model capabilities into an SDK suitable for direct client-side invocation, with built-in API Key management, security rules integration, and linkage with the Firebase ecosystem such as Firestore and App Check.
Cloud Firestore is a NoSQL document database where single-field queries are automatically indexed, but composite queries involving multi-field filtering or sorting must have composite indexes created manually.
Timeline (last 90 days)
Firestore does not support complex transactional queries across documents, and denormalized redundancy is a common practice.
The complete response is returned to the client as an inline card and is written to Firestore only after the user clicks "accept", in order to avoid ghost overwrites.
For storing the weekly view, the "loose-leaf notebook" approach was ultimately chosen, i.e. one document holds the whole week with each day's training nested inside, so that all information is retrieved with a single database call.
Firestore billing and latency are calculated by the number of documents read and written: reading N documents in a subcollection counts as N reads, while reading multiple fields in a nested document counts as only one read.
The maximum Firestore document size is 1 MiB.
Testing revealed a production risk of conflicts between SQLite writes and cloud storage; the patch was not sufficient to solve it, so the entire persistence layer was migrated to Firestore, which is now live.
Firestore is a managed document database that provides transactions, concurrency control, and horizontal scaling, naturally suited to stateless containers and multi-instance deployment; the cost is that the data access layer must be rewritten and the differences in document model and query approach must be accepted.
Google Cloud Skills cover individual implementation modules within an architecture, such as deploying an API to Cloud Run or connecting Cloud Run with Firestore.
The architecture chosen in the demo was: the feedback API deployed on Cloud Run, Firestore used to collect raw feedback, raw data synced to BigQuery for analysis, and finally a dashboard presented in Looker.
After integrating Firestore, the overall data flow is: Firestore data → app logic → Firebase AI Logic → Gemini → AI response.
29 more timeline events
All Facts (20)
Firebase AI Logic packages Google Cloud's Gemini model capabilities into an SDK suitable for direct client-side invocation, with built-in API Key management, security rules integration, and linkage with the Firebase ecosystem such as Firestore and App Check.
65%VerifiedCloud Firestore is a NoSQL document database where single-field queries are automatically indexed, but composite queries involving multi-field filtering or sorting must have composite indexes created manually.
65%UnverifiedFirestore's default test mode allows anyone to freely read and write all data, and misconfigured Security Rules can lead to data leaks or high bills.
60%UnverifiedFor storing the weekly view, the "loose-leaf notebook" approach was ultimately chosen, i.e. one document holds the whole week with each day's training nested inside, so that all information is retrieved with a single database call.
50%UnverifiedThe complete response is returned to the client as an inline card and is written to Firestore only after the user clicks "accept", in order to avoid ghost overwrites.
50%UnverifiedFirestore does not support complex transactional queries across documents, and denormalized redundancy is a common practice.
50%UnverifiedFirestore billing and latency are calculated by the number of documents read and written: reading N documents in a subcollection counts as N reads, while reading multiple fields in a nested document counts as only one read.
50%UnverifiedThe maximum Firestore document size is 1 MiB.
50%UnverifiedFirestore is a managed document database that provides transactions, concurrency control, and horizontal scaling, naturally suited to stateless containers and multi-instance deployment; the cost is that the data access layer must be rewritten and the differences in document model and query approach must be accepted.
50%UnverifiedGoogle Cloud Skills cover individual implementation modules within an architecture, such as deploying an API to Cloud Run or connecting Cloud Run with Firestore.
50%UnverifiedAfter integrating Firestore, the overall data flow is: Firestore data → app logic → Firebase AI Logic → Gemini → AI response.
50%UnverifiedA typical complete request flow is: the user initiates a request, AI Logic calls Gemini, Firestore provides the data, Gemini generates a response, and the app processes the result and ultimately presents it to the user.
50%UnverifiedIn RAG design, the scale of retrieval results must be controlled: stuffing in too many documents drives up token costs and dilutes key information; and retrieval must occur within the scope of data the user has permission to access to avoid indirect leakage of unauthorized data.
50%UnverifiedIn the Firestore scenario, the retrieval step of RAG is usually implemented with vector search or ordinary queries filtered by field.
50%UnverifiedRAG first retrieves segments relevant to the user's question from its own data sources, then stitches these segments into the prompt as context for Gemini to generate an answer, which differs from fine-tuning that fixes knowledge into the model weights.
50%UnverifiedBudget Lover's tech stack includes Flutter and Dart, Provider for state management, Firebase Authentication and Firestore, Firebase AI Logic with Gemini, and Flutter's PDF and printing packages.
50%UnverifiedBoth Firestore and Realtime Database support real-time data synchronization, but Realtime Database has lower latency and near-instant synchronization, while Firestore is more suitable for scenarios with complex structures.
50%UnverifiedThe course recommends using Firestore for apps with complex data and many fields such as e-commerce and bookkeeping apps, and using Realtime Database for scenarios requiring zero-latency push such as real-time chat, online status, real-time location and notifications.
50%UnverifiedThe free quotas of Firestore and Realtime Database are each 1GB of data storage, and notification and analytics services are basically unlimited; at the initial stage no payment is needed, but the free quotas have limits.
50%UnverifiedFirestore's Production Mode denies all unauthenticated read and write requests by default, making it more secure than test mode.
50%