Code Monkey home page Code Monkey logo

compass-travel-planning-sample's Introduction

Compass Project Demo

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.

Try it out today!

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.

Try in IDX

Getting Started

Prerequisites

  1. A new Firebase project.

  2. Acceptance into the Firebase Data Connect Private Preview

  3. Activate billing on your Google Cloud / Firebase Project

Setup IDX

Then click the Open In IDX button above. Once the project is launched in IDX, please do the following:

  1. 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.

  2. Next click on the Firebase icon Extension to open the Firebase Extension Tab window.

  3. 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 click Continue.

  4. Login with your Google account

  5. In the Firebase extension, under the config window, click Sign in with Google to specifically authenticate with the Firebase extension.

  6. 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 pressing enter or you can deny by entering a n and pressing enter.

  7. 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.

  8. Once you have finished authenticating with the Firebase extension, click on the Connect a Firebase Project button n the Config section of the Firebase extension.

  9. Select the Firebase project you had previously created before launching this project in IDX.

  10. 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.

  11. 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.

  12. 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.

  13. 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 for Project IDX: Hard Restart Previews

  14. Test and use the app as usual from the preview window.

This is not an officially supported Google product

compass-travel-planning-sample's People

Contributors

nohe427 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.