This is a travel demo using Firebase Data Connect to find ideal itineraries from a database of travel plans. To learn more about how this demo was created, please see this blog article. To build a version of this demo for yourself with Firestore, please see this codelab.
If you want to try out an early preview of Data Connect, we have instructions below for you to follow!
⚠️ WARNING⚠️ You must be part of the Firebase Data Connect Private Preview to run this app as emulator support is required.
We recommend trying this project in IDX since it handles all dependencies for you. You are able to launch this project in IDX and get going testing with only slight configuration required.
-
A new Firebase project.
-
Acceptance into the Firebase Data Connect Private Preview
Then click the Open In IDX button above. Once the project is launched in IDX, please do the following:
-
Wait for the terminal tasks to finish running. The terminal tasks do things like initialize a PostGRES database for you, download the JSON files using git lfs, and install all the dependencies for the NextJS project. You can tell that the terminal tasks have been completed when the README.md appears as the main editor window and the web preview for the NextJS app has appeared as well.
-
Next click on the Firebase icon Extension to open the Firebase Extension Tab window.
-
You will be prompted to trust the workspace. Check the box to
Allow the workspace to access Google cloud resources using my Google Account
. and clickContinue
. -
Login with your Google account
-
In the Firebase extension, under the config window, click
Sign in with Google
to specifically authenticate with the Firebase extension. -
In the terminal window at the bottom of the screen, you should be prompted to
Allow Firebase to collect CLI and Emulator Suite usand and error reporting information
. You can select the default by pressingenter
or you can deny by entering an
and pressingenter
. -
You will see a prompt for visiting a URL to authenticate the extension. Go and visit that URL to authenticate and paste the authorization code back into the terminal.
-
Once you have finished authenticating with the Firebase extension, click on the
Connect a Firebase Project
button n theConfig
section of the Firebase extension. -
Select the Firebase project you had previously created before launching this project in IDX.
-
Click on the
Start Emulator
button in the Firebase Extension. Note: If the emulators fail to start with a 403 unauthorized access warning, please see the prerequitsites about being accepted into the Firebase Data Connect Private Preview. -
Launch a new terminal and run the following command:
(cd loadData/ && node loadData.js)
This will load all of our preview data into your local PostGRES instance.
-
Activate the AI Platform using the following command:
gcloud services enable aiplatform.googleapis.com
IDX will likely ask you to select the project you would like to use, so select your Firebase project. This will activate the Firebase app and will charge you for generating embeddings and generating text responses from Gemini.
-
Hard restart your web app by clicking the drop down in the preview window and selecting
Hard Restart
or by pressing(CMD/CTRL) + SHIFT + P
to launch the command palette and searching forProject IDX: Hard Restart Previews
-
Test and use the app as usual from the preview window.
This is not an officially supported Google product