Firebase Data Sync

Demo to preview the settings

Introduction

The Firebase Data Sync plugin provides a seamless solution for exporting and synchronizing data from your Bubble app across various applications. With features such as exporting Bubble data, syncing across different apps, offline persistent storage, and running data as JavaScript/jQuery, this plugin offers a robust toolkit for managing and utilizing your app's data effectively. Whether you need to integrate data with external platforms or ensure offline functionality, the Firebase Data Sync plugin streamlines the process with its powerful capabilities.
In Firebase, collections are containers for documents, and documents are individual records within those collections. A Firebase project can have multiple collections, each containing documents.
Collections are used to organize and query data in Firestore, which is Firebase's flexible, scalable database for mobile, web, and server development. Firestore collections can be thought of as similar to tables in a traditional relational database, but with some key differences. For example, Firestore collections don't require a predefined schema, and they can contain nested objects and arrays.
The Firebase Data Sync plugin is compatible only with Firestore. To work with Realtime Database, please use the Firebase Realtime Database plugin.

Prerequisites

You must have an account with Firebase to interact with the Firebase. Create you development account at: https://firebase.google.com/
Image without caption

How to setup

Plugin element - Data Layer

Image without caption

Exposed States

Element Events

Element Actions

Plugin Server Side Actions

Export Bubble Data (1)

Workflow example

Here's a basic workflow example to get started with the Firebase Data Sync plugin:
  1. Setup Initial Connection:
      • Add a Data Layer element to your page.
      • Use the "Initialize Data Layer" action on page load with your main collection names (e.g., "users,posts,settings").
  1. User Authentication:
      • Create a login form with email and password fields.
      • Connect the login button to the "Log User In" action.
      • Handle successful login with the "Signed In" event.
      • Display user information using the exposed states.
  1. Data Retrieval:
      • Once authenticated, use "Get Data" to retrieve specific information.
      • Display the retrieved data in your app using states like "String Output" or "Number Output".
  1. Data Writing:
      • Create a form to collect user input.
      • Connect the form submission to the "Write Data" action.
      • Use the "Data Layer Updated" event to provide feedback.
  1. Working Offline:
      • Implement "Make Data Offline" functionality for offline usage.
      • When connection is restored, use "Make Data Online" to sync.
Image without caption

Changelogs