Skip to content

Commit 46cb919

Browse files
authored
Merge pull request #166 from revisit-studies/2.3
2.3
2 parents be087b3 + db86d22 commit 46cb919

242 files changed

Lines changed: 1213 additions & 8789 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

blog/2024-06-20-release-1.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ReVISit is implemented as a (mostly) server-less application, meaning that you d
4242

4343
If you’re running a local study, you can get away without this – you can just download the data from your browser after a study is complete. For online studies, we use Google Firebase to store data.
4444

45-
Currently, [setting up Firebase for a reVISit study](https://revisit.dev/docs/data-and-deployment/firebase/firebase-setup/) might be the most challenging part of working with reVISit. On the plus side, Firebase is a tried-and-true system where you have full control over your data. You even have options to choose the locale of your server so that you are compliant with your country's regulations on data storage.
45+
Currently, [setting up Firebase for a reVISit study](https://revisit.dev/docs/data-and-deployment/firebase/setup/) might be the most challenging part of working with reVISit. On the plus side, Firebase is a tried-and-true system where you have full control over your data. You even have options to choose the locale of your server so that you are compliant with your country's regulations on data storage.
4646

4747
### Data Analysis
4848

docs/analysis/data-export.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Data Export and Basic Analysis
22

3-
43
reVISit allows you to export in [Tidy](https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-data.html) format for analysis in Python notebooks or R.
54

65
The exported tidy data includes all the responses from the participants, including the participant ID, trial ID, trial order, and response ID. Additionally, we provide the parameters and correct answers that were set in the study configuration file (or by dynamic block). This data can be used to analyze the performance of participants, the accuracy of responses, and the time taken to complete the study.
@@ -129,6 +128,35 @@ To download audio from specific participants, select the participants in the tab
129128
If you are using Firebase, it will download the transcript of the audio file as well.
130129
:::
131130

131+
## Download Screen Recording
132+
133+
There are two ways to download screen recording video files if you have enabled `recordScreen: true` in your study. For applying screen recording feature in your study, please visit [Record Screen](../../designing-studies/record-screen).
134+
135+
### Download Participants' Audio
136+
137+
1. Navigate to the **Analysis** platform for the current study.
138+
139+
2. Open the **Participant View**, then click on the **Download participants screen recording** button.
140+
141+
![Download participants screen recording](./img/screen-recording-export-all.png)
142+
143+
:::note
144+
To download screen recording from specific participants, select the participants in the table.
145+
:::
146+
147+
148+
### Download Single Participant's Screen Recording
149+
150+
1. Navigate to the **Analysis** platform for the current study.
151+
152+
2. Open the **Participant View**, then expand the participant’s timeline by clicking the expand button.
153+
![Download task audio](./img/audio-export-task-1.png)
154+
155+
3. Click on the task.
156+
![Download task audio](./img/audio-export-task-2.png)
157+
158+
3. Click on the **Download Screen Recording** button.
159+
![Download screen recording video](./img/screen-recording-export-single.png)
132160

133161

134162
import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLinks.tsx';
85.3 KB
Loading
617 KB
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Connecting to a Cloud Database
22

3-
ReVISit is inherently a serverless program. As such, we developed a storage engine architecture in order to store the data that is gathered from users as they move through the study. While you can test the program locally using the browser's local storage, you will need to set up some sort of cloud database in order to save study participant data. Our intention is that those who create the study have full control over the data that is generated by participants -- no data is ever linked back to the reVISit repository or those who have contributed to its creation. See the <a href="#deploying-to-a-static-website">Deployment</a> section for more information about deploying your study to GitHub.io once the connection to Firebase has been set up.
3+
ReVISit is inherently a serverless program. As such, we developed a storage engine architecture in order to store the data that is gathered from users as they move through the study. While you can test the program locally using the browser's local storage, you will need to set up some sort of cloud database in order to save study participant data. Our intention is that those who create the study have full control over the data that is generated by participants -- no data is ever linked back to the reVISit repository or those who have contributed to its creation. See the <a href="../deploying-to-static-website">Deployment</a> section for more information about deploying your study to GitHub.io once the connection to Firebase has been set up.
44

55
We provide multiple storage engines and an abstract class that you can extend to create your own storage engine. There are two cloud databases that reVISit supports out of the box: Firebase and Supabase. Firebase is a Google product that provides a real-time NoSQL database and storage solution, while Supabase is an open-source alternative that provides similar functionality that can be self-hosted (perfect for researchers who operate under strict data privacy regulations).
66

docs/data-and-deployment/deploying-to-static-website.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Deploying To a Static Website
22

3-
4-
53
## Deploying using GitHub
64

75
Deploying your study should be relatively simple. We include a GitHub action that will build your study and deploy it to GitHub pages. The only item that the user must adjust is in the `.env` file in the root of the repository. At the top of this file, you should see `VITE_BASE_PATH="/study/"`. Change "/study/" to `"/<repo-name>/"`.
@@ -31,7 +29,7 @@ Here we will be able to deploy the site to the Github pages. In the 'Branch' sec
3129
Click 'Save' once you have made the switch. After a short period of time, your reVISit application will deploy to `<username>.github.io/<repository-name>`. If you want to deploy to a custom domain, you can do that as well by following the instructions on [GitHub](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site).
3230

3331
:::info
34-
If you would like to enable admin sign ins when you deploy your static website, you will have to make sure that Firebase has your domain name set as an authorized domain. Please see [here](../firebase/adding-removing-ui/#adding-authorized-domains) to add your custom domain.
32+
If you would like to enable admin sign ins when you deploy your static website, you will have to make sure that Firebase has your domain name set as an authorized domain. Please see [here](../firebase/enabling-authentication/#adding-authorized-domains) to add your custom domain.
3533
:::
3634

3735
## Deploying using Netlify
@@ -62,12 +60,12 @@ The first build will take a bit, but once it runs, your experiment should be rea
6260

6361
If you are using netlify as a secondary venue for anonymization purposes, you can specify which branch netlify will use to deploy from. For instance a branch called `for-review' might remove all personnel and affiliation information.
6462

65-
63+
<!-- Importing Links -->
6664
import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLinks.tsx';
6765

6866
<StructuredLinks
69-
referenceLinks={[
70-
{name: "GitHub Pages", url: "https://docs.github.com/en/pages/quickstart"},
71-
{name: "GitHub Custom Domain", url: "https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site"}
72-
]}
67+
referenceLinks={[
68+
{name: "GitHub Pages", url: "https://docs.github.com/en/pages/quickstart"},
69+
{name: "GitHub Custom Domain", url: "https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site"}
70+
]}
7371
/>

docs/data-and-deployment/firebase/adding-removing-ui.md renamed to docs/data-and-deployment/firebase/enabling-authentication.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
# Setting Up Authentication
22

3-
import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLinks.tsx';
4-
5-
<StructuredLinks
6-
referenceLinks={[
7-
{name: "Firebase Setup", url: "../firebase-setup"},
8-
{name: "Firebase Authentication", url: "https://firebase.google.com/products/auth"},
9-
]}
10-
/>
113

124
:::warning
13-
In order to use authentication, you must have a Firebase application already configured. To set up your firebase application, please see [here](../firebase-setup).
5+
In order to use authentication, you must have a Firebase application already configured. To set up your firebase application, please see [here](../setup).
146
:::
157

168
## Enabling Authentication in Firebase
@@ -41,7 +33,7 @@ Once you have deployed your reVISit application to a website, you'll need to ens
4133
Note that if your application has been deployed but you have _not_ added your custom authorized domain, then attempting to enable authentication will result in an error.
4234
:::
4335

44-
Through the navigation panel on the right of your reVISit application, navigate to the "settings" page. Here, you will see that authentication will be currently disabled with a button to enable authentication.
36+
Through the settings cog on the right of your reVISit application, navigate to the "settings" page. Here, you will see that authentication will be currently disabled with a button to enable authentication.
4537

4638
When you first enable authentication, you will be prompted to sign in using Google SSO. The account chosen will automatically be added as a user. Any other account attempting to log in to reVISit and access these protected routes will be redirected to the login screen.
4739

@@ -54,3 +46,13 @@ To add another administrator, simply navigate to the settings page (where you en
5446
### Removing A User
5547

5648
In the "Enabled Users" section, you will see the "delete" icon to the right of each user aside from yourself. Any administrator is capable of deleting any user from the reVISit system. The only restriction is that you cannot delete yourself and there can never be less than one user.
49+
50+
<!-- Importing Links -->
51+
import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLinks.tsx';
52+
53+
<StructuredLinks
54+
referenceLinks={[
55+
{name: "Firebase Setup", url: "../setup"},
56+
{name: "Firebase Authentication", url: "https://firebase.google.com/products/auth"},
57+
]}
58+
/>

docs/data-and-deployment/firebase/firebase-user-management.md

Lines changed: 0 additions & 46 deletions
This file was deleted.

docs/data-and-deployment/firebase/firebase-setup.md renamed to docs/data-and-deployment/firebase/setup.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
# Configuring Firebase
22

3-
import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLinks.tsx';
4-
5-
<StructuredLinks
6-
referenceLinks={[
7-
{name: "Firebase", url: "https://firebase.google.com/"},
8-
{name: "Firebase Tier Limits", url: "https://cloud.google.com/storage/pricing#cloud-storage-always-free"},
9-
{name: "Google Recaptcha", url: "https://www.google.com/recaptcha/admin/create"},
10-
{name: "Deploying to GitHub", url: "../../deploying-to-static-website"}
11-
]}
12-
/>
133

144
<a href="https://firebase.google.com/" target="_blank" >Firebase</a> is an app development platform that has extremely useful tools such as storage and real-time synchronization. With Firebase alone, a study creator can capture all data from participants and then export that data for further analysis. In what follows, there are two main products we will be using: the Firestore database and Firebase's storage product.
155

@@ -120,7 +110,7 @@ We are now going to set up the authentication so that your browser is authorized
120110
![Console](./img/firebase_steps/step15.jpg)
121111

122112
:::info
123-
In addition to what is shown above, you will want to enable "Google Authentication" in the same section of Firebase. You can do this by choosing the "Google" sign in method under the "Additional Providers" section. The anonymous sign-in is used for particpants taking the study. It allows them to access and send data to the Firestore without external authentication. The Google sign-in method is used to authenticate administrators for managing studies and data. Please see [here](../adding-removing-ui) for more detailed authentication information and set up instructions.
113+
In addition to what is shown above, you will want to enable "Google Authentication" in the same section of Firebase. You can do this by choosing the "Google" sign in method under the "Additional Providers" section. The anonymous sign-in is used for particpants taking the study. It allows them to access and send data to the Firestore without external authentication. The Google sign-in method is used to authenticate administrators for managing studies and data. Please see [here](../enabling-authentication) for more detailed authentication information and set up instructions.
124114
:::
125115

126116
#### App Check
@@ -213,3 +203,15 @@ When running `yarn build`, reVISit automatically uses the Firebase storage engin
213203
### Deployment
214204

215205
If you intending to deploy your reVISit application to a static website, we suggest following our [guide to deploy to Github pages](../../deploying-to-static-website). In this, you'll see that there is an additional step that you will need to follow in Firebase so that your custom domain can authorize users.
206+
207+
<!-- Importing Links -->
208+
import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLinks.tsx';
209+
210+
<StructuredLinks
211+
referenceLinks={[
212+
{name: "Firebase", url: "https://firebase.google.com/"},
213+
{name: "Firebase Tier Limits", url: "https://cloud.google.com/storage/pricing#cloud-storage-always-free"},
214+
{name: "Google Recaptcha", url: "https://www.google.com/recaptcha/admin/create"},
215+
{name: "Deploying to GitHub", url: "../../deploying-to-static-website"}
216+
]}
217+
/>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Setting Up Authentication
2+
3+
:::warning
4+
In order to use authentication, you must have a Supabase application already configured. To set up your Supabase application, please see [here](../setup).
5+
:::
6+
7+
## Enabling Authentication in Supabase
8+
9+
Supabase provides a variety of authentication methods, but reVISit only supports GitHub OAuth for authentication. To enable GitHub OAuth, start by navigating to GitHub and creating a new OAuth application [here](http://github.com/settings/developers).
10+
11+
Give your application a name, such as `ReVISit Supabase`. For the "Homepage URL", enter the URL where your reVISit application will be hosted (e.g., `https://my-revisit-app.com`). This must include the `https://` prefix.
12+
13+
Lastly set the "Authorization callback URL" to `https://<your-supabase-domain>/auth/v1/callback`, replacing `<your-supabase-domain>` with your actual Supabase domain (e.g., `https://supabase.organizaion.com/auth/v1/callback`).
14+
15+
![GitHub OAuth Setup](./img/github-oauth-setup.png)
16+
17+
After creating the OAuth application, you will be provided with a Client ID. Copy this in to the `supabase/.env` file in the `GITHUB_OAUTH_CLIENT_ID` field.
18+
19+
Next, generate a new Client Secret by clicking the "Generate a new client secret" button. Copy this in to the `supabase/.env` file in the `GITHUB_OAUTH_CLIENT_SECRET` field.
20+
21+
Now, set the `GITHUB_OAUTH_REDIRECT_URI` field in the `supabase/.env` file to the same URL you used for the "Authorization callback URL" in GitHub.
22+
23+
Finally, ensure that your `SITE_URL` field in the `supabase/.env` file is set to the URL where your reVISit application will be hosted (e.g., `https://my-revisit-app.com/study`). If this is not set, the redirects won't work properly.
24+
25+
## Enabling Authentication in reVISit
26+
27+
Through the settings cog on the right of your reVISit application, navigate to the "settings" page. Here, you will see that authentication will be currently disabled with a button to enable authentication.
28+
29+
When you first enable authentication, you will be prompted to sign in using GitHub Oauth. The account chosen will automatically be added as a user. Any other account attempting to log in to reVISit and access these protected routes will be redirected to the login screen.
30+
31+
## Manage Administrators in reVISit
32+
33+
### Adding Additional Users
34+
35+
To add another administrator, simply navigate to the settings page (where you enabled authentication) and click on the 'Add User' icon to the right of the "Enable Users" section. Enter the Google account email for the user and click save. They will now be an administrator and will immediately be able to log into your reVISit application
36+
37+
### Removing A User
38+
39+
In the "Enabled Users" section, you will see the "delete" icon to the right of each user aside from yourself. Any administrator is capable of deleting any user from the reVISit system. The only restriction is that you cannot delete yourself and there can never be less than one user.
40+
41+
<!-- Importing Links -->
42+
import StructuredLinks from '@site/src/components/StructuredLinks/StructuredLinks.tsx';
43+
44+
<StructuredLinks
45+
referenceLinks={[
46+
{name: "Supabase Setup", url: "../setup"},
47+
{name: "Supabase Authentication", url: "https://supabase.com/docs/guides/auth"},
48+
]}
49+
/>

0 commit comments

Comments
 (0)