Setup Firebase

Setup Firebase

To configure Firebase for ShipFast, follow these steps:

Steps to set up Firebase

1. Create a Firebase Project

2. Get Firebase Config Object

  • Once the project is created, navigate to "Project Settings" by clicking on the gear icon in the top left corner.

  • Scroll to the "Your apps" section and click on the "Web" icon to register your app.

  • After registering, Firebase will provide a config object that looks like this:

    const firebaseConfig = {
      apiKey: "<your_api_key>",
      authDomain: "<your_auth_domain>",
      projectId: "<your_project_id>",
      storageBucket: "<your_storage_bucket>",
      messagingSenderId: "<your_messaging_sender_id>",
      appId: "<your_app_id>",
      measurementId: "<your_measurement_id>"
    };

3. Configure the Firebase Project

  • Create a firebase-config.js file in your project root and paste the Firebase config object into it:

    // firebase-config.js
    const firebaseConfig = {
      apiKey: "<your_api_key>",
      authDomain: "<your_auth_domain>",
      projectId: "<your_project_id>",
      storageBucket: "<your_storage_bucket>",
      messagingSenderId: "<your_messaging_sender_id>",
      appId: "<your_app_id>",
      measurementId: "<your_measurement_id>"
    };
     
    export { firebaseConfig };
  1. Export Firebase Configuration
    • Ensure that the firebaseConfig constant is exported so it can be imported and used in other parts of the application.

You have successfully set up Firebase for your ShipFast app.