> For the complete documentation index, see [llms.txt](https://docs.unibooker.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unibooker.app/vendor-web-setup/code-setup.md). Agents can also search and read this documentation through its [MCP server](https://docs.unibooker.app/~gitbook/mcp).

# Code Setup

1 - Vendor Firebase Credentials : To enable Firebase functionality in UniBooker for notifications and chatting, you need to configure the Firebase credentials in the system.

* Locate the file **chat.blade.php** in your project directory by navigating to:\
  `/your_domain/resources/views/vendor/chat`.
* Open the file and update the Firebase credentials as shown in the image below

<figure><img src="https://711470638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNrqBQwpT6hMobocP8mG%2Fuploads%2FZhs9JQtGHLJhfgcU3jp2%2Ffirebase_credentials.png?alt=media&amp;token=2bf39ef1-8075-40d5-bb24-7ea5447baec8" alt="" width="563"><figcaption></figcaption></figure>

* Save the changes to the **chat.blade.php** file. This will ensure that the Firebase functionality is properly configured.

2 - Vendor OneSignal Key: To enable push notifications on vendor web portal, you need to configure the OneSignal App ID in the admin panel.

* Log in to the admin panel and navigate to **Settings -> General Settings -> Push Notification Settings**.
* Locate the field to enter the **OneSignal App ID** and input the key provided by OneSignal.
* Refer to the image below for guidance

<figure><img src="https://711470638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNrqBQwpT6hMobocP8mG%2Fuploads%2FOXVKpSI1GfPWnw5RZ2Yw%2Fonesignal_key.png?alt=media&amp;token=3735be78-c144-4c65-9bd2-eccd7a683b01" alt="" width="563"><figcaption></figcaption></figure>

* Save the changes. Push notifications will now be enabled for your vendor web.

3 - Google Client ID and Secret ID: To enable Google login for the vendor web portal, you need to update the Google Client ID and Secret Id and configure the necessary settings in the Google Console.

* Locate the file **GoogleAuthController** in your project directory by navigating to:\
  `/your_domain/app/Http/Controllers/VendorAuth`.
* Open the file and update the **client\_id and secret id** fields with the Google Client ID and secret id provided by Google. Refer to the image below:

<figure><img src="https://711470638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNrqBQwpT6hMobocP8mG%2Fuploads%2FiK3nu5GP4Jv2bcArBwQY%2Fgoogle_client_id.png?alt=media&amp;token=a9f6c489-8fc4-4d25-926b-26b45b2f9010" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://711470638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNrqBQwpT6hMobocP8mG%2Fuploads%2F9lDC5XQ4qd4iYDvsnnpn%2Fgoogle_secret_id.png?alt=media&amp;token=07b2d8f3-79e9-4ad1-8350-d10ae42b56d7" alt="" width="516"><figcaption></figcaption></figure>

* To enable Google login, go to the [Google Cloud Console](https://console.cloud.google.com/) and create a new project. In the API section, add the following details:
  * **Web App Name:** Provide a name for your web app.
  * **Authorized JavaScript Origins:** Add your domain name (e.g., `/yourdomain.com`).
  * **Authorized Redirect URIs:** Add the URL in the format:\
    `/yourdomain.com/google/call-back`.
* For a step-by-step guide on creating a Google Client ID, you can follow the simple steps in this video

{% embed url="<https://youtu.be/OKMgyF5ezFs?si=RuzKEui5wsPYJ3B9>" fullWidth="false" %}

* Save the changes in both the GoogleAuthController file and the Google Console. Google login will now be enabled for the vendor web portal.
