This is a webapp that runs a mock interactive Trust Game between 2 people. It's built using:
- SvelteJS as an intuitive javascript framework for layout and logic
- TailwindCSS for styling
- Firebase for server-less data storage (and real-time updates)
- Netlify for automatic deploying and hosting from github
- Investor receives endowment and makes decision; Trustee sees endowment make prediction rating.
- Investor makes 1st order expectation rating; Trustee make prediction rating and 2nd order expectation rating
- Trustee makes decision
- Both see trial outcome
- Both rate how guilty they feel given partner's expectation as well as give counterfactual guilt rating
- Fixation
In order to actually make any stored/static files (i.e. mp3s, videos, etc) accessible by the app you must set the CORS access policy on google cloud:
- Download gsutil
- Unzip it,
cd
into the unzipped folder, and run:install.sh
- Then run
gcloud init
and login with the same google account you used to create your firebase project - Create a file called
cors.json
that contains the following:
[
{
"origin": ["*"],
"method": ["GET"],
"maxAgeSeconds": 3600
}
]
- Find your google storage URL which should be something like
gs://yourproject.appspot.com
- Run
gsutil cors set cors.json yourURL