1. Home
  2. Docs
  3. Admin Panel Documentation
  4. Firebase Integration

Firebase Integration

In this section we will show you how you can update your admin panel to use your own database.

We start by going to the firebase console and to your project, then go to Project settings -> Service accounts, and now click Generate new private key. This will generate a new JSON file that contains your private key.

Next you have to do is to go into the admin panel’s folder and go to /db/firebaseDB and remove the .json file and replace it with your own file that you got from the last step.

Lastly you have to edit index.js that is found in the same folder, in db/firebaseDB and change the highlighted lines of code.
Change the first line of code

const serviceAccount = require("./production-a9404-firebase-adminsdk-nin6u-d632b424d4.json");

to:

const serviceAccount = require("./Your-Private-Key-File-You-Received.json");

And then get your link from where you generated the key and change the second line of code

const dbURL = "https://production-a9404.firebaseio.com";

to:

const dbURL = "Your-Link";

Now you can just start your admin panel, and start editing your own database!