A Beginner's Guide to Firebase Firestore for App Developers
Firebase Firestore is a flexible, scalable database built for mobile and web applications. It supports hierarchical data structures, expressive queries, realtime updates, offline support, and seamless integration with other Firebase and Google Cloud products. If you are building a mobile app and need a reliable cloud database, Firestore is an excellent choice.
This article walks you through the steps required to create a Firebase project, set up a Firebase Firestore database, add data, and read data from it.
TL:DR – This article goes through the setup steps required to get it going.
Contents
- A Beginner's Guide to Firebase Firestore for App Developers
- What Is Firebase Firestore?
- Step 1: Create and Set Up a Firebase Project
- 1.1 Create a New Firebase Project
- Firebase Firestore
- Check your email for confirmation
- Enable Anonymous Authentication
- Create a Firebase Firestore Database
- Step 3: Add Data to Firestore
- Adding Data via the Firebase Console
- Adding Data Programmatically
- Step 4: Read Data from Firestore
- Step 5: Set Up the Firebase CLI
- Install the Firebase CLI
- Summary
- Further Reading
What Is Firebase Firestore?
Firebase Firestore is a horizontally scaling, document-model NoSQL database hosted in the cloud. Unlike traditional relational databases, Firestore organises data into collections and documents, making it well suited to the dynamic, nested data structures common in mobile applications.
Key features include:
- Realtime updates: Your app receives instant notifications when data changes.
- Offline support: Data is cached locally so your app remains functional without a network connection.
- Scalability: Firestore scales automatically to handle growing user bases.
- Integration: It works seamlessly with other Firebase and Google Cloud products.
Step 1: Create and Set Up a Firebase Project
Before you can use Firestore, you need a Firebase project. Follow these steps to get started.
1.1 Create a New Firebase Project
- Go to the Firebase Console.
- Click Add project.
- Enter a name for your project. Take note of the project ID, or click the Edit icon to set a custom one.
- Click Continue.
- Optionally, enable Google Analytics for your project.
- Click Create project.

Enable Google Analytics (Optional).

Firebase console (Optional).

Enable anonymous guest accounts

Firebase Firestore
Firebase Firestore is specifically designed to allow you to store and sync app data at global scale.
See also : Explainer video, Documentation, Firebase Firestore website.
Check your email for confirmation
If all went well you'll get a nice confirmation email too.
"Welcome to Firebase! You're now part of a community of hundreds of thousands of developers using Firebase to build better mobile and web apps, as well as grow their businesses. Congrats on creating your first project."
Create Database

Start in test mode. Note the warning - this database will need to be secured for production use.

Firebase Firestore The locations cannot be changed so if geographic location is important for example for data protection then it is important to pick an appropriate one. This is an app for the UK so europe-west2 was chosen as it is in London.
Enable Anonymous Authentication
Anonymous authentication allows your application to silently sign users in without requiring them to create an account. This is useful for letting users interact with your app before committing to registration.
- In the Firebase console, handle to the Authentication section under Build.
- Click Get started.
- Select the Anonymous sign-in provider and enable it.
Create a Firebase Firestore Database
With your Firebase project ready, you can now create a Firestore database.
- In the Firebase console, handle to Firestore Database under the Build section.
- Click Create database.
- Select Start in test mode.
Important: Test mode allows open read and write access to your database. This is acceptable for development, but you must configure proper security rules before deploying to production.
- Choose a Firebase Firestore location. This setting is permanent and cannot be changed later. If data residency or geographic proximity matters for your use case, choose carefully. For example, if your app serves users in the United Kingdom, selecting
europe-west2(London) is a sensible choice. - Click Enable.
Your Firestore database is now live and ready to use.

Step 3: Add Data to Firestore
Firestore stores data as documents organised into collections. A document is a set of key-value pairs, and a collection is a container for documents.
Adding Data via the Firebase Console
The simplest way to add data when getting started is through the Firebase console:
- Open your Firestore database in the console.
- Click Start collection and give it a name, such as
restaurants. - Add a document by providing a Document ID (or letting Firestore generate one automatically).
- Add fields to your document, such as
name,category, andrating, along with their respective values. - Click Save.
Adding Data Programmatically
In a Flutter application, you can add data to Firestore using the cloud_firestore package.
Step 4: Read Data from Firestore
Reading data from Firestore can be done as a one-time fetch or as a realtime stream that updates your UI whenever the data changes. Using a stream is the recommended approach for mobile apps because it keeps your UI in sync with the database without requiring manual refresh calls.
Step 5: Set Up the Firebase CLI
The Firebase Command Line Interface (CLI) is required to use Firebase development tools, including deploying security rules and hosting assets.
Note: The Firebase CLI is installed via npm, which introduces a dependency on Node.js. Before adding any third-party dependency to your project, it is good practice to review its maturity, licensing, and rate of change, and to maintain a record of all external dependencies along with any associated cost implications.
Install the Firebase CLI
Run the following command in your terminal:
- Install the CLI using npm -g install firebase-tools
- Verify the installation using firebase --version. It should return the version number if successful.
- Authorize the Firebase CLI by running firebase login
Follow the prompts to sign in with your Google account. Once authorised, close the success window in your browser.

Summary
Here is a quick recap of the steps covered in this article:
- Create a Firebase project in the Firebase console.
- Enable Anonymous Authentication.
- Create a Firebase Firestore database in test mode, selecting an appropriate geographic location.
- Add data to Firestore via the console or programmatically using the
cloud_firestorepackage. - Read data using one-time fetches or realtime streams.
- Install and configure the Firebase CLI.
- Associate your app with your Firebase project.