|
| 1 | +# Firebase Data Connect Quickstart |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This quickstart is a movie review app to demonstrate the use of Firebase Data Connect with a Cloud SQL database. For more information about Firebase Data Connect visit [the docs](https://firebase.google.com/docs/data-connect/). |
| 6 | + |
| 7 | + |
| 8 | +## Getting Started |
| 9 | + |
| 10 | +Follow these steps to get up and running with Firebase Data Connect. For more detailed instructions, check out the [official documentation](https://firebase.google.com/docs/data-connect/quickstart). |
| 11 | + |
| 12 | +### 1. Connect to your Firebase project |
| 13 | + |
| 14 | +1. If you haven't already, create a Firebase project. |
| 15 | + 1. In the [Firebase console](https://console.firebase.google.com), click |
| 16 | + **Add project**, then follow the on-screen instructions. |
| 17 | +2. Enable Email/Password Sign-in method [here](https://console.firebase.google.com/project/_/authentication/providers). |
| 18 | + |
| 19 | +### 2. Cloning the repository |
| 20 | + |
| 21 | +1. Clone this repository to your local machine: |
| 22 | + ```sh |
| 23 | + git clone https://github.com/firebase/quickstart-flutter.git |
| 24 | + ``` |
| 25 | +2. Configure flutterfire |
| 26 | +This will automatically download and set up firebase for your project: |
| 27 | +```sh |
| 28 | +flutterfire configure -y -a com.example.dataconnect |
| 29 | +``` |
| 30 | + |
| 31 | + |
| 32 | +### 3. Open in Visual Studio Code (VS Code) |
| 33 | + |
| 34 | +1. Click on the Firebase Data Connect icon on the VS Code sidebar to load the Extension. |
| 35 | + a. Sign in with your Google Account if you haven't already. |
| 36 | +2. Click on "Connect a Firebase project" and choose the project where you have set up Data Connect. |
| 37 | +3. Click on "Start Emulators" - this should generate the Kotlin SDK for you and start the emulators. |
| 38 | + |
| 39 | +### 4. Populate the database |
| 40 | +In VS Code, open the `quickstart-flutter/dataconnect/dataconnect/moviedata_insert.gql` file and click the |
| 41 | + `Run (local)` button at the top of the file. |
| 42 | + |
| 43 | +If you’d like to confirm that the data was correctly inserted, |
| 44 | +open `quickstart-flutter/dataconnect/movie-connector/queries.gql` and run the `ListMovies` query. |
| 45 | + |
| 46 | +### 5. Running the app |
| 47 | + |
| 48 | +Press the Run button in VS Code to run the sample app on your device. |
0 commit comments