Svelte app for interacting with Amazon's Mechanical Turk and storing data in Firebase. Designed to be lightweight, offering a way to store data and interact with Mturk without all the complications of setting up a backend or database server. Hopefully this can grow into a viable simple alternative to something like PsiTurk + JsPsych.
- AWS has more-or-less unified their APIs (including Mturk) and make much of their functionality available on the browser-side.
- Firebase offers an easy way to read, write, and subscribe to a dynamic database from the browser alone.
- Netlify and similar providers like Now and Surge make it fast and easy to deploy and host a static web app.
- Together these provide the bulk of the infrastructure needed to run modern web-applications without the need for server management
This project is inspired by the server-less JAMStack architecture philosophy
The project can provide a single static web-app that should be able to plug in to pretty much any other setup. That's because after a Svelte project is build, it produces just 3 files needed to run everything: index.html
, bundle.js
, and bundle.css
. In theory you should be able to drop these files into any existing project (probably renaming index.html
or something like admin.html
) and then have a full adminstrative interface whenever you navigate to youproject.com/admin
.
One way to try this out to is create a web-app/experiment with the Svelte app project starter and then integrating it with svelte-turk.
- Install npm (if you don't have it)
- Fork to your account on github
git clone https://github.com/yourName/svelte-turk.git
cd svelte-turk
npm install
npm run dev
and navigate tolocalhost:5000
in your browser
- Because there's no backend all application state is stored in the browser and a user will need to re-authorize if they refresh the page (there are ways around this e.g. saving state within firebase, but this is not currently implemented)
- Has no dependencies except for SvelteStrap for styling
- Loads in Mturk Javascript API from a CDN
- Loads in Firebase from a CDN
- Loads in Bootstrap CSS from a CDN