> For the complete documentation index, see [llms.txt](https://react-firebase.gitbook.io/rf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://react-firebase.gitbook.io/rf/guides/build-a-react-app-with-firebase-auth-and-realtime-database/add-firebase.md).

# Add Firebase

Install the [firebase](https://www.npmjs.com/package/firebase) JS client.

```bash
yarn add firebase
# Or 
npm i firebase
```

Change `PROJECT_NAME` to your project name and grab your firebase config here :&#x20;

`https://console.firebase.google.com/project/PROJECT_NAME/settings/general/`

Your config file should look something like this :&#x20;

{% code title="src/test-credentials.ts" %}

```javascript
// Firebase Config
export const config = {
  apiKey: "API_KEY",
  projectId: "PROJECT_ID",
  databaseURL: "DATABASE_URL",
  authDomain: "AUTH_DOMAIN",
  // OPTIONAL
  storageBucket: "STORAGE_BUCKET",
  messagingSenderId: "MESSAGING_SENDER_ID"
};
```

{% endcode %}

{% hint style="info" %}
In the example repo this file is located in `src/test-credentials.ts` but you won't be able to find it because it's added to the `.gitignore`

Make sure you do the same if your repository is public.
{% endhint %}

### Git Commit
