Skip to content

ETH-PEACH-Lab/wizard-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wizard-of-Oz Study App

A small Wizard-of-Oz study web app built with Node.js, Express, and Socket.IO. It uses a simple shared permission switch between a researcher and any number of participants.

Interfaces

  • / — links to both interfaces
  • /participant — participant interface
  • /wizard — researcher interface
  • /health — returns { "status": "ok" }

Shared State

The server is authoritative and keeps two Boolean values in memory:

{
  "permissionRequested": false,
  "permissionGranted": false
}
  • The researcher clicks Ring for permission to set permissionRequested to true.
  • Any participant can click Allow agent to talk to set permissionGranted to true.
  • One grant is sufficient; other participants are not required.
  • The researcher clicks Reset to set both values back to false.

Running Locally

  1. Install dependencies:
    npm install
  2. Start the server:
    npm start
  3. Open the interfaces:
  4. To test multiple participants, open several browser tabs pointed at http://localhost:3000/participant. The researcher page shows the live participant count.

Deploying to Railway

  1. Push this repository to GitHub.
  2. In Railway, create a new project and deploy from the GitHub repository.
  3. Railway runs the app with npm start (defined in package.json).
  4. In the service settings, generate a public domain.
  5. Open these routes on the generated domain:
    • /participant
    • /wizard

Notes

  • No database, authentication, or session IDs are used.
  • All state is stored in server memory and will reset whenever the Railway service restarts (redeploys, crashes, or sleeps).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors