# Configuring Firebase

Before you do step change the package name, you must do this step for firebase project configuration

Vist Firebase console: <https://console.firebase.google.com>

<figure><img src="https://2794514790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmjJuk8j1ruVTJbUPyXz%2Fuploads%2FI5XUbIJqkLldBxYMgCvZ%2Ffcm1.png?alt=media&#x26;token=7d248cbd-a4e4-4c89-be96-6d29d2799d30" alt=""><figcaption><p>firebase console</p></figcaption></figure>

Please register or log in first and then select create new project. In the dialog window enter the name of the project that will be created and the contents of the state and then click the create project to continue.

1\) Add a new project&#x20;

2\) Get started by adding firebase to your project. Select the flutter icon.&#x20;

3\) The easiest way to get you started is to use the FlutterFire CLI.

Before you continue, make sure to:

* Install the [Firebase CLI](https://firebase.google.com/docs/cli?authuser=0\&hl=en#install_the_firebase_cli) and log in (run `firebase login`)
* Create a Flutter project (run `flutter create`)

4\) In firebase CLI Install standalone binary and npm

<figure><img src="https://2794514790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmjJuk8j1ruVTJbUPyXz%2Fuploads%2FRz3J0CK0dIOhJjv7uScw%2Fimage.png?alt=media&#x26;token=631e4678-44aa-4d33-b6f1-be63dd1d3b27" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2794514790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmjJuk8j1ruVTJbUPyXz%2Fuploads%2FAqjzENAfRveJ6Kfdm7uq%2Fimage.png?alt=media&#x26;token=5589dc61-d5e3-40db-9df7-b7955623d55b" alt=""><figcaption></figcaption></figure>

5\) Log in and test the Firebase CLI&#x20;

```
firebase login
firebase projects:list
```

6\) Install and run the FlutterFire CLI

<figure><img src="https://2794514790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmjJuk8j1ruVTJbUPyXz%2Fuploads%2FxMbzTDf7LK7Tj54Tv7Zm%2Fimage.png?alt=media&#x26;token=2e68a5ff-e883-401f-a984-5c61ce9aa1e9" alt=""><figcaption></figcaption></figure>

7\) Initialize firebase

<figure><img src="https://2794514790-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmjJuk8j1ruVTJbUPyXz%2Fuploads%2Fpk0FHyF3Y1NNSxbWufIT%2Fimage.png?alt=media&#x26;token=d488fd3c-2589-41da-b047-1fbc3e9f6f4a" alt=""><figcaption></figcaption></figure>

8\) For firestore database setup see the clip below:<br>

{% embed url="<https://www.youtube.com/clip/UgkxCo1H9eY8WMbB3nAQOdNrzN47SZyzo3cw>" %}

9\) Next go to the firestore database -> 'Rules' tab and replace the code with the following snippet:<br>

```
rules_version = '2';

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}
```

10\) Once this is completed Please repeat step 5 and 6.
