Participant journey
How a participant moves through the platform. Step names come from client/src/constants/experimentSteps.js (shared with the admin live monitor).
Entry points
| Path | Who | What happens |
|---|---|---|
/ | Anyone | Home: join experiment (university + code), friends, or solo |
/survey/[university] | Official experiment | ExperimentRouter loads GET /api/experiments/{university}/current, then ExperimentSurvey runs steps |
/play/[roomCode] | Friends / solo | Waiting + play without the full survey battery |
/survey | Fallback | Survey landing |
Friends/solo skip the university survey pipeline and go straight to play after room creation/join.
Official experiment steps (0–11)
Canonical labels:
| Step | Name | Typical UI |
|---|---|---|
| 0 | Connecting… | Socket / session coming up |
| 1 | Entry | Username / user details (may skip if already known) |
| 2 | Consent Form | UCF or USU consent components |
| 3 | SQ Survey | SQSurveyBlock |
| 4 | EQ Survey | EQSurveyBlock |
| 5 | StPSQ Survey | StPSQSurveyBlock |
| 6 | Game Instructions | GameInstructionsBlock |
| 7 | Single Player | SinglePlayerForaging |
| 8 | Arithmetic Test | Arithmetic UI (skippable when stress task disabled → jump toward multiplayer) |
| 9 | Multiplayer | MultiplayerForaging |
| 10 | Exit Survey | ExitSurveyBlock → POST /api/exit-survey |
| 11 | Complete | Completion screen; clears local session storage |
ExperimentRouter does not own the step index — it only supplies the current experiment config. Step progression lives in the survey/experiment UI (ExperimentSurvey and related blocks).
Backend touchpoints
| Phase | Mechanisms |
|---|---|
| Experiment discovery | HTTP /api/experiments/... |
| Surveys / exit | Participant routes + POST /api/exit-survey; socket helpers in surveySocket.js |
| Rooms & foraging | roomSocket / foragingSocket + RoomService / ForagingGame |
| Arithmetic | arithmeticSocket + ArithmeticTest |
| Persistence | Prisma models User, SurveyResponse, ExitSurvey, foraging tables, GameSession / PlayerSession |
Admin visibility
Live monitor and dashboard step colors use the same STEP_NAMES / STEP_COLORS so moderator views match what participants experience. Moderator operations are covered in Phase 2 (experiment-flow/moderator-guide, Admin category).