PsyCloud

Hosted Backend

PsyCloud can be used offline for authoring and preview, but real participant collection uses the hosted backend. The backend is the control plane for researchers and the runtime host for participants: it stores study metadata, immutable releases, run links, sessions, telemetry, counterbalancing state, recruitment bindings, assets, and export jobs.

Hosted-only boundary

Studio authoring, SDK authoring, Project Bundle validation, compile, inspect, and workbench checks work locally. Publishing releases, creating active runs, joining through study links, ingesting telemetry, recruitment, monitoring, and data export require the backend.

Local vs hosted

WorkflowLocal onlyHosted backend
Author and preview a studyYesOptional
Validate, inspect, and compile a Project BundleYesOptional
Publish an immutable releaseNoYes
Create a run and share participant linksNoYes
Allocate counterbalanced assignmentsPreview simulation onlyYes, with persisted allocation state
Store participant telemetry and sessionsNoYes
Monitor sessions and export CSV/JSON/snapshotsNoYes
Recruit through Prolific or MTurkNoYes

Use Running Studies & Recruitment for the researcher workflow and the full CLI reference for exact command flags.

Control-plane model

The backend schema centers on the same lifecycle Studio shows.

ObjectWhat it representsNotes
WorkspaceA research group or tenantOwns projects, connectors, storage mode, and membership.
ProjectA container inside a workspaceGroups related studies.
StudyThe named research objectHolds drafts, bundles, runs, and counterbalance config.
StudyDraftEditable authoring stateStores IR, design recipe, semantics, and asset index.
BundleImmutable releaseContent-addressed by bundleHash with IR, manifest lock, and asset manifest.
RunParticipant-facing deploymentPoints at one bundle, has status, config, links, sessions, and datasets.
RunLinkShareable entry codeLets one run have per-channel links with caps/expiry/active state.
SessionOne participant executionStores pseudonymous subject id, assignment, token hash, status, and timing.
TelemetryEventRuntime event envelopeOrdered by session sequence number and tied to run/session provenance.
Dataset / DataExportDerived analysis outputsCSV, JSON, and snapshot exports are generated from run/session events.
WorkspaceConnectorRecruitment credentialsStores encrypted provider configuration for Prolific, MTurk, and future providers.

Route families

The public API is mounted under /api unless noted.

FamilyWhat it powers
/api/auth, /api/auth/oauthRegistration, login, refresh, logout, password reset, email verification, OAuth.
/api/projects, /api/studies, /api/studies/:studyId/draftsWorkspace authoring and draft history.
/api/studies/:studyId/bundles, /api/bundlesPublishing releases, bundle metadata, downloads, and preflight reports.
/api/runs, /api/runs/:runId/linksRun creation, activation, pausing, completion, join URLs, and study links.
/run, /s, /runtime/bundle.jsParticipant entry, session bootstrap, completion, and runtime delivery.
/api/telemetry, /ws/eventsRuntime event ingest, cursor reads, session summaries, errors, and live streams.
/api/monitorMonitor dashboards, session details, review queues, and incremental polling.
/api/assetsAsset upload, existence checks, and participant asset delivery.
/api/exportsDataset derivation, CSV/JSON/snapshot downloads, raw event exports, and QC.
/api/runs/:runId/counterbalance/...Persisted allocation, assignment status, epoch reports, and audit lookups.
/api/workspaces/:workspaceId/connectors/...Provider connector setup, webhook setup, reconciliation, and disabling.
/api/webhooksProvider webhook receipt and idempotency.

Participant data path

  1. Researcher publishes

    A draft or Project Bundle becomes an immutable Bundle with a content hash, runtime version, telemetry schema version, manifest index, and asset manifest.

  2. Researcher creates a run

    The run points at the bundle and gets one or more RunLinks. Activation controls whether participants can join.

  3. Participant joins

    /run/:code resolves the link, allocates a session, assigns counterbalance state when needed, and redirects to /s/:sessionId with a session token.

  4. Runtime boots

    /runtime/bundle.js loads the participant runtime, then /api/sessions/:sessionId/bootstrap returns the bundle, assignment, and API endpoints for telemetry.

  5. Events are stored

    Runtime events are batched to /api/telemetry/events; exports derive trial tables and raw event files from the stored envelopes.

Operations checklist

For a production-like deployment, the server refuses to start unless the security-critical configuration is explicit.

AreaRequired posture
DatabaseDATABASE_URL points at PostgreSQL.
JWT/session secretsJWT_ACCESS_SECRET, JWT_REFRESH_SECRET, and JWT_SESSION_SECRET are set in production.
CORSCORS_ORIGINS is an explicit allowlist in production, not *.
Public URLsBASE_URL and FRONTEND_URL match the deployed API and Studio origins.
StorageSTORAGE_PROVIDER is local, s3, or minio; remote storage requires bucket, region, keys, and MinIO endpoint when used.
EmailEMAIL_PROVIDER=resend plus Resend key/from settings for real verification and reset email.
OAuthGoogle, GitHub, and ORCID credentials are optional; missing providers simply are not available.
RecruitmentProlific and MTurk connectors are workspace-scoped and should be tested in sandbox before production collection.

See Data Governance for retention and participant-data handling.

Alpha limits

  • Hosted collection is the source of truth for participant data; local preview data is for debugging and is not exportable through the hosted Data perspective.
  • Self-service deletion and retention controls are still alpha-era operations. Treat retained data as durable unless an operator or self-host administrator explicitly deletes it.
  • BattleLab and preflight harness routes are development/verification surfaces, not researcher product workflows.
  • A production deployment needs access control, explicit CORS, real secrets, managed database backups, object-storage lifecycle policy, and provider sandbox checks before collecting real participant data.

Next