From 5a9ed65440c3d471657ab77289cc781f59d80d1f Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Thu, 22 Jun 2023 19:25:09 -0400 Subject: [PATCH 01/32] docs: add documentation on how to set up a online experiment via Firebase --- docs/online-experiments/firebase.md | 111 ++++++++++++++++++++++++++++ docs/online-experiments/index.md | 4 + mkdocs.yml | 3 + 3 files changed, 118 insertions(+) create mode 100644 docs/online-experiments/firebase.md create mode 100644 docs/online-experiments/index.md diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md new file mode 100644 index 000000000..9bfcef8c1 --- /dev/null +++ b/docs/online-experiments/firebase.md @@ -0,0 +1,111 @@ +# Firebase Integration + +Here we explain how to set up a [Firebase](https://firebase.google.com/) website to collect observations for an AutoRA workflow. [Here](user-guide/experiment-runners/experimentation-managers/firebase/) you find information on how to connect AutoRA to a Firebase website. Additionally, [here](user-guide/experiment-runners/recruitment-managers/prolific/) we explain how to include [Prolific](https://www.prolific.co/) to automatically recruit participants. + +For setting up the online experiment, we recommend using either the [user cookiecutter template](https://github.com/AutoResearch/autora-user-cookiecutter) or the [create-react-app template](https://github.com/AutoResearch/cra-template-autora-firebase). + +!!! hint + The cookiecutter template also provides a template for the AutoRA workflow used in online experiments. + +## Installation + +To make sure that node is installed on your system, run the following command. +```shell +node -v +``` +If you don't see a version number or the version number is bellow 16.0, install or update node following the instruction on the [node.js website](https://nodejs.org/en/). + +When node is available on your system, you can use ***create-react-app*** by running the following command. +```shell +npx create-react-app path/to/react/pp --template autora-firebase +``` +If you want to use ***cookiecutter***, run the following command and follow the instructions. +```shell +cookiecutter https://github.com/AutoResearch/autora-user-cookiecutter +``` +This creates your ***project folder***. Before writing code for your website, you also need to set up a Firebase project. + +## Setting up a Firebase project + +### Initializing firebase account and project + +- Create and login to a firebase account on the [Firebase website](https://firebase.google.com/). +- Create a firebase project by clicking add project and enter a project name. +- You can choose to disable google analytics in the next page if you are not planning on using it for your project. + +### Copying web app credentials + +- Navigate to the [Firebase console](https://console.firebase.google.com/) and select the project +- To create a new web app, click on `Add App` or the `<>` symbol and follow the prompts +- Enter a name for the Firebase app (could be the same as the project name) +- Check `Also set up Firebase Hosting for this app` +- Click `Register App`. This auto-generates a script with several values that you need to copy for the next step. +- Copy the auto-generated values from the Firebase console to the corresponding variables in the .env file in the project folder that was created on your system using create-react-app or cookiecutter +```dotenv +REACT_APP_apiKey= +REACT_APP_authDomain= +REACT_APP_projectId= +REACT_APP_storageBucket= +REACT_APP_messagingSenderId= +REACT_APP_appId= +REACT_APP_devNoDb="True" +REACT_APP_useProlificId="False" +``` +- Click on `Next` +- You will not need to run the command that is prompted in after clicking next, click `Next` again +- Click `Continue to console` + +### Setting up Firestore +Autora includes cloud storage for task data using Firestore. Follow these steps to initialize Firestore: + +- Navigate to the current project in the developer console and select Firestore Database from the sidebar under build. +- Click `Create Database` +- Select production mode and click `Next` +- choose the current location and click `Enable` + +### Configure your project for Firebase +In the project folder, write the following commands in your terminal: +First login to your firebase account using +```shell +firebase login +``` +Then initialize the firebase project to this folder by running: +```shell +firebase init +``` +An interactive init process will now run in your command line. For the first question, select these options: + +- Firestore: Configure security rules and indexes files for Firestore +- Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys +- As a Firebase project, use the one, you created earlier +- Use the default options for the Firestore Rules and the Firestore indexes. +- ***!!! IMPORTANT !!!*** Use the build directory instead of the public directory here. +- When asked for the directory, write `build` and press `Enter`. +- Configure as a single-page app, don't set up automatic builds and deploys with GitHub. +- Don't overwrite the index.html file if the question pops up. + +## Write code for your experiment +To write code for your experiment, use the `main.js` file in the `src/design` folder. For example, you can use [jsPsych](https://www.jspsych.org/7.3/) and install packages using npm. The main function should return an observation (the data created by a participant). + +You can test the experiment locally using +```shell +npm start +``` +During the development, the Firestore database will not be used. If you want to load conditions from the database, you need to upload them first (for example using the [AutoRA Firebase experimentation manager](user-guide/experiment-runners/experimentation-managers/firebase/)) and set `REACT_APP_devNoDb="False"` in the .env file. + +### Using Prolific Ids +If you want to recruit participants via Prolific (for example using the [AutoRA Prolific participant manager](user-guide/experiment-runners/recruitment-managers/prolific/)), we ***highly recommend*** setting `REACT_APP_useProlificId="True"`. This will speed up the recruitment of participants. + +## Build and deploy the project to Firebase +To serve the website to the internet, you need to build and deploy it to Firebase. +To build the project, run +```shell +npm run build +``` +To deploy to Firebase, run +```shell +firebase deploy +``` +This will expose the website to the web. You can find the url of the website in the command line or on the Firebase console of your project under `Hosting`. + + diff --git a/docs/online-experiments/index.md b/docs/online-experiments/index.md new file mode 100644 index 000000000..a788935c0 --- /dev/null +++ b/docs/online-experiments/index.md @@ -0,0 +1,4 @@ +# Online Experiments To Collect AutoRA Observations + +AutoRA offers functionality to set up websites that integrate with an AutoRA workflow. These websites enable the utilization of observations gathered from participants online in a closed loop system. + diff --git a/mkdocs.yml b/mkdocs.yml index 7035fa257..8c3545ebd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -195,6 +195,9 @@ nav: - Recruitment Managers: - Prolific: '!import https://github.com/autoresearch/autora-experiment-runner-recruitment-manager-prolific/?branch=main&extra_imports=["mkdocs/base.yml"]' - Workflow: '!import https://github.com/autoresearch/autora-workflow/?branch=main&extra_imports=["mkdocs/base.yml"]' + - Online Experiments: + - Home: 'online-experiments/index.md' + - Firebase: 'online-experiments/firebase.md' - Contributor Guide: - Home: 'contribute/index.md' - Modules: From b810e41fb549b29427b3b74afde5cd49d6205505 Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 07:54:01 -0400 Subject: [PATCH 02/32] Update docs/online-experiments/firebase.md Co-authored-by: benwandrew --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 9bfcef8c1..609f794af 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -9,7 +9,7 @@ For setting up the online experiment, we recommend using either the [user cookie ## Installation -To make sure that node is installed on your system, run the following command. +To make sure that `node` is installed on your system, run the following command. ```shell node -v ``` From 335a83ea63d8dafff8c786ec83f156b783ba496d Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 07:54:30 -0400 Subject: [PATCH 03/32] Update docs/online-experiments/firebase.md Co-authored-by: benwandrew --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 609f794af..43cc77751 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -13,7 +13,7 @@ To make sure that `node` is installed on your system, run the following command. ```shell node -v ``` -If you don't see a version number or the version number is bellow 16.0, install or update node following the instruction on the [node.js website](https://nodejs.org/en/). +If you don't see a version number or the version number is below 16.0, install or update `node` following the instruction on the [node.js website](https://nodejs.org/en/). When node is available on your system, you can use ***create-react-app*** by running the following command. ```shell From 78e40b171bf924c90b906fc69747a5f56ba77e0a Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 07:57:41 -0400 Subject: [PATCH 04/32] Update docs/online-experiments/firebase.md Co-authored-by: benwandrew --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 43cc77751..9e79f0a1a 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -94,7 +94,7 @@ npm start During the development, the Firestore database will not be used. If you want to load conditions from the database, you need to upload them first (for example using the [AutoRA Firebase experimentation manager](user-guide/experiment-runners/experimentation-managers/firebase/)) and set `REACT_APP_devNoDb="False"` in the .env file. ### Using Prolific Ids -If you want to recruit participants via Prolific (for example using the [AutoRA Prolific participant manager](user-guide/experiment-runners/recruitment-managers/prolific/)), we ***highly recommend*** setting `REACT_APP_useProlificId="True"`. This will speed up the recruitment of participants. +If you want to recruit participants via Prolific (for example using the [AutoRA Prolific Recruitment Manager](user-guide/experiment-runners/recruitment-managers/prolific/)), we ***highly recommend*** setting `REACT_APP_useProlificId="True"`. This will speed up the recruitment of participants. ## Build and deploy the project to Firebase To serve the website to the internet, you need to build and deploy it to Firebase. From 281d84a14192cab66956912c4ab13244294d6d66 Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 07:57:54 -0400 Subject: [PATCH 05/32] Update docs/online-experiments/firebase.md Co-authored-by: benwandrew --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 9e79f0a1a..d41e80290 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -15,7 +15,7 @@ node -v ``` If you don't see a version number or the version number is below 16.0, install or update `node` following the instruction on the [node.js website](https://nodejs.org/en/). -When node is available on your system, you can use ***create-react-app*** by running the following command. +When `node` is available on your system, you can use ***create-react-app*** by running the following command. ```shell npx create-react-app path/to/react/pp --template autora-firebase ``` From 45fe07acc074e0bbe7a85e771972693c73786a5a Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 07:58:10 -0400 Subject: [PATCH 06/32] Update docs/online-experiments/firebase.md Co-authored-by: benwandrew --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index d41e80290..08addebc2 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -97,7 +97,7 @@ During the development, the Firestore database will not be used. If you want to If you want to recruit participants via Prolific (for example using the [AutoRA Prolific Recruitment Manager](user-guide/experiment-runners/recruitment-managers/prolific/)), we ***highly recommend*** setting `REACT_APP_useProlificId="True"`. This will speed up the recruitment of participants. ## Build and deploy the project to Firebase -To serve the website to the internet, you need to build and deploy it to Firebase. +To serve the website on the internet, you must build and deploy it to Firebase. To build the project, run ```shell npm run build From 823289c783a76e2de59b4e731671e95b71639dcf Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 07:58:26 -0400 Subject: [PATCH 07/32] Update docs/online-experiments/firebase.md Co-authored-by: benwandrew --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 08addebc2..62c00bee7 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -106,6 +106,6 @@ To deploy to Firebase, run ```shell firebase deploy ``` -This will expose the website to the web. You can find the url of the website in the command line or on the Firebase console of your project under `Hosting`. +This will make the website available on the web. You can find the URL of the website in the command line or on the Firebase console of your project under `Hosting`. From a4758a0468ea9c3b806dd116fc0624451acff39b Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 07:58:47 -0400 Subject: [PATCH 08/32] Update docs/online-experiments/index.md Co-authored-by: benwandrew --- docs/online-experiments/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/index.md b/docs/online-experiments/index.md index a788935c0..4ab5d9ef9 100644 --- a/docs/online-experiments/index.md +++ b/docs/online-experiments/index.md @@ -1,4 +1,4 @@ # Online Experiments To Collect AutoRA Observations -AutoRA offers functionality to set up websites that integrate with an AutoRA workflow. These websites enable the utilization of observations gathered from participants online in a closed loop system. +AutoRA provides functionality to set up websites that integrate with AutoRA workflows. These websites allow observations gathered from participants online to be used in a closed-loop system. From f12a01f966bee148738dabeff34122fda39fd097 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 08:59:28 -0400 Subject: [PATCH 09/32] Update docs/online-experiments/firebase.md Co-authored-by: Younes Strittmatter --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 62c00bee7..ab962efff 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -1,6 +1,6 @@ # Firebase Integration -Here we explain how to set up a [Firebase](https://firebase.google.com/) website to collect observations for an AutoRA workflow. [Here](user-guide/experiment-runners/experimentation-managers/firebase/) you find information on how to connect AutoRA to a Firebase website. Additionally, [here](user-guide/experiment-runners/recruitment-managers/prolific/) we explain how to include [Prolific](https://www.prolific.co/) to automatically recruit participants. +On this page, you can find information on how to set up a [Firebase](https://firebase.google.com/) website to collect observations for an AutoRA workflow. You can find information on how to connect such a website to AutoRA and how to automatically recruit participants via [Prolific](https://www.prolific.co/) at the following pages, respectively: [AutoRA Firebase Experimentation manager](user-guide/experiment-runners/experimentation-managers/firebase/), [AutoRA Prolific Recruitment Manager](user-guide/experiment-runners/recruitment-managers/prolific/). For setting up the online experiment, we recommend using either the [user cookiecutter template](https://github.com/AutoResearch/autora-user-cookiecutter) or the [create-react-app template](https://github.com/AutoResearch/cra-template-autora-firebase). From 0ed97006c9814de6cf4295a81bf44966b0e83f61 Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 09:00:27 -0400 Subject: [PATCH 10/32] Update docs/online-experiments/firebase.md Co-authored-by: benwandrew --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index ab962efff..a9a0ee4b8 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -25,7 +25,7 @@ cookiecutter https://github.com/AutoResearch/autora-user-cookiecutter ``` This creates your ***project folder***. Before writing code for your website, you also need to set up a Firebase project. -## Setting up a Firebase project +## Firebase Project Setup ### Initializing firebase account and project From 8f390eeda4d07795644097949bc834fc68f30c52 Mon Sep 17 00:00:00 2001 From: Younes Strittmatter Date: Fri, 23 Jun 2023 09:01:27 -0400 Subject: [PATCH 11/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index a9a0ee4b8..012c28b24 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -96,7 +96,7 @@ During the development, the Firestore database will not be used. If you want to ### Using Prolific Ids If you want to recruit participants via Prolific (for example using the [AutoRA Prolific Recruitment Manager](user-guide/experiment-runners/recruitment-managers/prolific/)), we ***highly recommend*** setting `REACT_APP_useProlificId="True"`. This will speed up the recruitment of participants. -## Build and deploy the project to Firebase +## Build And Deploy To Firebase To serve the website on the internet, you must build and deploy it to Firebase. To build the project, run ```shell From a69e7f213f6ba6751904b646acb24e0d3af9f954 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:07:45 -0400 Subject: [PATCH 12/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 012c28b24..5e2827cb9 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -27,7 +27,7 @@ This creates your ***project folder***. Before writing code for your website, yo ## Firebase Project Setup -### Initializing firebase account and project +### Initialize Firebase Account And Project - Create and login to a firebase account on the [Firebase website](https://firebase.google.com/). - Create a firebase project by clicking add project and enter a project name. From efa9cd76ab17cc71cee939ac8f2f62fc278928ce Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:08:02 -0400 Subject: [PATCH 13/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 5e2827cb9..aeba1087f 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -29,7 +29,7 @@ This creates your ***project folder***. Before writing code for your website, yo ### Initialize Firebase Account And Project -- Create and login to a firebase account on the [Firebase website](https://firebase.google.com/). +- Create and log in to a Firebase account on the [Firebase website](https://firebase.google.com/). - Create a firebase project by clicking add project and enter a project name. - You can choose to disable google analytics in the next page if you are not planning on using it for your project. From 65f9447c4487e50583de52a2c040eb4bd04e385a Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:08:14 -0400 Subject: [PATCH 14/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index aeba1087f..df44b4c98 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -30,7 +30,7 @@ This creates your ***project folder***. Before writing code for your website, yo ### Initialize Firebase Account And Project - Create and log in to a Firebase account on the [Firebase website](https://firebase.google.com/). -- Create a firebase project by clicking add project and enter a project name. +- Create a Firebase project by clicking add project and enter a project name. - You can choose to disable google analytics in the next page if you are not planning on using it for your project. ### Copying web app credentials From fbad35bb7a35f1d739084950d8359665af564716 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:08:21 -0400 Subject: [PATCH 15/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index df44b4c98..639050880 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -33,7 +33,7 @@ This creates your ***project folder***. Before writing code for your website, yo - Create a Firebase project by clicking add project and enter a project name. - You can choose to disable google analytics in the next page if you are not planning on using it for your project. -### Copying web app credentials +### Copy Web App Credentials - Navigate to the [Firebase console](https://console.firebase.google.com/) and select the project - To create a new web app, click on `Add App` or the `<>` symbol and follow the prompts From 25d7cf2207c9b5c4a74f87ae360e4831e7f2e58b Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:08:43 -0400 Subject: [PATCH 16/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 639050880..031e42033 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -40,7 +40,7 @@ This creates your ***project folder***. Before writing code for your website, yo - Enter a name for the Firebase app (could be the same as the project name) - Check `Also set up Firebase Hosting for this app` - Click `Register App`. This auto-generates a script with several values that you need to copy for the next step. -- Copy the auto-generated values from the Firebase console to the corresponding variables in the .env file in the project folder that was created on your system using create-react-app or cookiecutter +- Copy the auto-generated values from the Firebase console to the corresponding variables in the `.env` file in the project folder that was created on your system using create-react-app or cookiecutter ```dotenv REACT_APP_apiKey= REACT_APP_authDomain= From b54e3b1452960e5619dea5bad83f89a1355a0f24 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:08:53 -0400 Subject: [PATCH 17/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 031e42033..b98abb5be 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -55,7 +55,7 @@ REACT_APP_useProlificId="False" - You will not need to run the command that is prompted in after clicking next, click `Next` again - Click `Continue to console` -### Setting up Firestore +### Firestore Setup Autora includes cloud storage for task data using Firestore. Follow these steps to initialize Firestore: - Navigate to the current project in the developer console and select Firestore Database from the sidebar under build. From d138db55f106793f0dcd97a0a35931134ade0221 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:09:02 -0400 Subject: [PATCH 18/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index b98abb5be..20ae48b26 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -56,7 +56,7 @@ REACT_APP_useProlificId="False" - Click `Continue to console` ### Firestore Setup -Autora includes cloud storage for task data using Firestore. Follow these steps to initialize Firestore: +AutoRA includes cloud storage for task data using Firestore. Follow these steps to initialize Firestore: - Navigate to the current project in the developer console and select Firestore Database from the sidebar under build. - Click `Create Database` From 0895db91ba1e3bf719f10390b8ab350f32a9d19b Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:09:13 -0400 Subject: [PATCH 19/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 20ae48b26..3ad04a82c 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -58,7 +58,7 @@ REACT_APP_useProlificId="False" ### Firestore Setup AutoRA includes cloud storage for task data using Firestore. Follow these steps to initialize Firestore: -- Navigate to the current project in the developer console and select Firestore Database from the sidebar under build. +- Navigate to the current project in the developer console and select `Firestore Database` from the sidebar under `Build`. - Click `Create Database` - Select production mode and click `Next` - choose the current location and click `Enable` From 6d1e5c2a1b018638ca10d423f5a315d8e66fe5cb Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:09:20 -0400 Subject: [PATCH 20/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 3ad04a82c..af1b814b1 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -61,7 +61,7 @@ AutoRA includes cloud storage for task data using Firestore. Follow these steps - Navigate to the current project in the developer console and select `Firestore Database` from the sidebar under `Build`. - Click `Create Database` - Select production mode and click `Next` -- choose the current location and click `Enable` +- Choose the current location and click `Enable` ### Configure your project for Firebase In the project folder, write the following commands in your terminal: From 05b6dc50c926e79898d2707de82183c3db4bb6ff Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:09:28 -0400 Subject: [PATCH 21/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index af1b814b1..021c02972 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -63,7 +63,7 @@ AutoRA includes cloud storage for task data using Firestore. Follow these steps - Select production mode and click `Next` - Choose the current location and click `Enable` -### Configure your project for Firebase +### Configure Your Project For Firebase In the project folder, write the following commands in your terminal: First login to your firebase account using ```shell From ee6f85dcce5646454ed8f0a785ec2314bdcb6786 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:09:36 -0400 Subject: [PATCH 22/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 021c02972..4270ce9df 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -64,7 +64,7 @@ AutoRA includes cloud storage for task data using Firestore. Follow these steps - Choose the current location and click `Enable` ### Configure Your Project For Firebase -In the project folder, write the following commands in your terminal: +In the project folder, enter the following commands in your terminal: First login to your firebase account using ```shell firebase login From 4317765aa0c557177a0d377596c4cec3a090972b Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:09:43 -0400 Subject: [PATCH 23/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 4270ce9df..e3cbdf723 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -65,7 +65,7 @@ AutoRA includes cloud storage for task data using Firestore. Follow these steps ### Configure Your Project For Firebase In the project folder, enter the following commands in your terminal: -First login to your firebase account using +First log in to your Firebase account using ```shell firebase login ``` From a705e5b15011a68ccb42901df7ab0d14328b5f3d Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:09:53 -0400 Subject: [PATCH 24/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index e3cbdf723..f2d078f72 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -69,7 +69,7 @@ First log in to your Firebase account using ```shell firebase login ``` -Then initialize the firebase project to this folder by running: +Then initialize the Firebase project in this folder by running: ```shell firebase init ``` From b52d3c81478400e43fa9d3a9b4091d5b7ac8d9a0 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:10:01 -0400 Subject: [PATCH 25/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index f2d078f72..da5811c8e 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -73,7 +73,7 @@ Then initialize the Firebase project in this folder by running: ```shell firebase init ``` -An interactive init process will now run in your command line. For the first question, select these options: +An interactive initialization process will now run in your command line. For the first question, select these options: - Firestore: Configure security rules and indexes files for Firestore - Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys From 1d230cbc324574054508fdb6af74cd1b87c5a20e Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:10:13 -0400 Subject: [PATCH 26/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index da5811c8e..7cf765663 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -77,7 +77,7 @@ An interactive initialization process will now run in your command line. For the - Firestore: Configure security rules and indexes files for Firestore - Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys -- As a Firebase project, use the one, you created earlier +- For a Firebase project, use the one you created earlier - Use the default options for the Firestore Rules and the Firestore indexes. - ***!!! IMPORTANT !!!*** Use the build directory instead of the public directory here. - When asked for the directory, write `build` and press `Enter`. From d8f78b1db6113507486733542ed7e641dae2ae51 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:11:32 -0400 Subject: [PATCH 27/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 7cf765663..237bbf2c4 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -78,7 +78,7 @@ An interactive initialization process will now run in your command line. For the - Firestore: Configure security rules and indexes files for Firestore - Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys - For a Firebase project, use the one you created earlier -- Use the default options for the Firestore Rules and the Firestore indexes. +- Use the default options for the Firestore rules and the Firestore indexes. - ***!!! IMPORTANT !!!*** Use the build directory instead of the public directory here. - When asked for the directory, write `build` and press `Enter`. - Configure as a single-page app, don't set up automatic builds and deploys with GitHub. From efb4ebbe0b797181af9d73db47d9ba651fa7cc9f Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:11:54 -0400 Subject: [PATCH 28/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 237bbf2c4..7512b9899 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -52,7 +52,7 @@ REACT_APP_devNoDb="True" REACT_APP_useProlificId="False" ``` - Click on `Next` -- You will not need to run the command that is prompted in after clicking next, click `Next` again +- You will not need to run the command that is displayed after first clicking `Next`, so click `Next` again - Click `Continue to console` ### Firestore Setup From 6de0237c2bef164469646c9b53e474884e6554c6 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:12:37 -0400 Subject: [PATCH 29/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 7512b9899..fecdaa46e 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -81,7 +81,7 @@ An interactive initialization process will now run in your command line. For the - Use the default options for the Firestore rules and the Firestore indexes. - ***!!! IMPORTANT !!!*** Use the build directory instead of the public directory here. - When asked for the directory, write `build` and press `Enter`. -- Configure as a single-page app, don't set up automatic builds and deploys with GitHub. +- Configure as a single-page app; don't set up automatic builds and deploys with GitHub. - Don't overwrite the index.html file if the question pops up. ## Write code for your experiment From e4649450b456d276996fd9361d96b8e41da90f40 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:12:44 -0400 Subject: [PATCH 30/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index fecdaa46e..b48c21ad6 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -84,7 +84,7 @@ An interactive initialization process will now run in your command line. For the - Configure as a single-page app; don't set up automatic builds and deploys with GitHub. - Don't overwrite the index.html file if the question pops up. -## Write code for your experiment +## Write Code For Your Experiment To write code for your experiment, use the `main.js` file in the `src/design` folder. For example, you can use [jsPsych](https://www.jspsych.org/7.3/) and install packages using npm. The main function should return an observation (the data created by a participant). You can test the experiment locally using From 7a3255d3ff424b2ff36bc66a559a66c4b7f7a0e7 Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:13:01 -0400 Subject: [PATCH 31/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index b48c21ad6..89b904c9e 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -85,7 +85,7 @@ An interactive initialization process will now run in your command line. For the - Don't overwrite the index.html file if the question pops up. ## Write Code For Your Experiment -To write code for your experiment, use the `main.js` file in the `src/design` folder. For example, you can use [jsPsych](https://www.jspsych.org/7.3/) and install packages using npm. The main function should return an observation (the data created by a participant). +To write code for your experiment, use the `main.js` file in the `src/design` folder. For example, you can use [jsPsych](https://www.jspsych.org/7.3/) and install packages using `npm`. The main function should return an observation (the data created by a participant). You can test the experiment locally using ```shell From 8a5f7a6d5116b3a1e4038ca0dc0807fef531d94b Mon Sep 17 00:00:00 2001 From: benwandrew Date: Fri, 23 Jun 2023 09:13:16 -0400 Subject: [PATCH 32/32] Update docs/online-experiments/firebase.md --- docs/online-experiments/firebase.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/online-experiments/firebase.md b/docs/online-experiments/firebase.md index 89b904c9e..1f227eda3 100644 --- a/docs/online-experiments/firebase.md +++ b/docs/online-experiments/firebase.md @@ -91,7 +91,7 @@ You can test the experiment locally using ```shell npm start ``` -During the development, the Firestore database will not be used. If you want to load conditions from the database, you need to upload them first (for example using the [AutoRA Firebase experimentation manager](user-guide/experiment-runners/experimentation-managers/firebase/)) and set `REACT_APP_devNoDb="False"` in the .env file. +During development, the Firestore database will not be used. If you want to load conditions from the database, you need to upload them first (for example using the [AutoRA Firebase Experimentation Manager](user-guide/experiment-runners/experimentation-managers/firebase/)) and set `REACT_APP_devNoDb="False"` in the `.env` file. ### Using Prolific Ids If you want to recruit participants via Prolific (for example using the [AutoRA Prolific Recruitment Manager](user-guide/experiment-runners/recruitment-managers/prolific/)), we ***highly recommend*** setting `REACT_APP_useProlificId="True"`. This will speed up the recruitment of participants.