Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 47 additions & 6 deletions docs/integrations/firebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Once complete, Dreamflow will confirm the connection with a **Connected** status
</div>
<p></p>

### First-Time Firebase Project Setup
### Initial Firebase Project Setup

If this is your first time connecting to Firebase, you must create a new project in the Firebase Console and accept the Terms of Service before continuing.

Expand Down Expand Up @@ -250,17 +250,55 @@ Here’s an example of enabling email/password authentication:

Dreamflow lets you add sample data to your Firebase project for easier development and testing. The generated data follows your app’s schema, so you can quickly check how your app works with populated users, collections, and documents.

To add sample data from Dreamflow, go to the **Firebase** module **> Add Sample Data to Firebase**. Enter the email address of your test account in the **User Email** field. This account will be associated with the generated sample data. Click **Generate Sample Data**.
To add sample data from Dreamflow, go to the **Firebase > Sample Data**, and follow the instructions below:

Once the process is complete, you will see the generated sample data entries inside your **Cloud Firestore** under the respective collections defined in your schema.
- **For Apps with Login Functionality:** First, sign up in your app using an email and password. After logging in, enter the same email address in the **User Email** field and click **Generate Sample Data**. This will generate sample records linked to that user account.

![add-sample-data-firebase-with-login.avif](imgs/add-sample-data-firebase-with-login.avif)

- **For Apps without Login Functionality:** You can skip the email step, as it’s optional. Simply click **Generate Sample Data** to generate test documents directly in your Firestore Database.

![add-sample-data-firebase-without-login.avif](imgs/add-sample-data-firebase-wihtout-login.avif)

:::warning

You can only generate sample data **once.** If you need to modify or remove the sample data later, you can do so directly in the **Firebase Console** under **Firestore Database**.

:::

:::info

This process only inserts sample data into the **Firestore Database** for the specified user email. It does **not** create a user in Firebase Authentication. Make sure the user with the specified email exists in Firebase Authentication to be able to access the data.

:::
You can directly add a user to Firebase Authentication. To do so, open the Firebase Console and navigate to **Authentication > Users**. Click **Add user** in the top-right corner, enter the user’s email and password, and then click **Add User** to create the account.

![add-sample-data.avif](imgs/add-sample-data.avif)
<div style={{
position: 'relative',
paddingBottom: 'calc(52.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
height: 0,
width: '100%'}}>
<iframe
src="https://demo.arcade.software/VYKJVNzPMjQjb8wU4mcJ?embed&show_copy_link=true"
title=""
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
colorScheme: 'light'
}}
frameborder="0"
loading="lazy"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
allow="clipboard-write">
</iframe>
</div>
<p></p>

:::

## Enable Billing

Expand Down Expand Up @@ -298,9 +336,12 @@ To enable billing on your Firebase project, open the Firebase Console. On the pr

## FAQs
<details>
<summary> Why do cloud function deployments fail? </summary>
<summary>
Why am I getting the error `functions predeploy error: Command terminated with non-zero exit code 2` when deploying Cloud Functions from Dreamflow?
</summary>

<p>
![cloud-fn-deploy-failed](imgs/cloud-fn-deploy-failed.avif)
Cloud function deployments usually fail when your Google Cloud Platform (GCP) or Firebase project hasn’t been fully set up with the necessary APIs and permissions.

By default, when you create a new Firebase project, some APIs required by Cloud Functions are not enabled automatically. In addition, the default compute service account may not have the correct roles to deploy functions. Without these APIs and permissions, Dreamflow cannot deploy functions successfully, and you’ll see deployment errors.
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions docs/integrations/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,7 @@ Why can’t I log in with the email I used to generate sample data?
If you generated sample data before adding authentication to your app, logging in with that same email will fail — and this is expected behavior.

When sample data is created, it inserts records directly into the Supabase database, including user details, but it doesn’t go through the actual authentication process. As a result, those users exist in the database but don’t have valid authentication credentials in Supabase Auth.

To fix it, you can delete the dummy user record from the Auth table and then sign up again in your app with that email.
</p>
</details>