Demo · Adaptive Workflow Engine

Config-driven multi-step flows
with resumable sessions.

A small, deployable reference architecture for behavioural research instruments. FastAPI engine + Next.js renderer. The instrument is authored as JSON. The engine evaluates branching, persists sessions, and exports flat results.

Config-driven

A single JSON document defines steps, sections, branching rules, validation, and progress. Nothing is hardcoded in the UI.

Adaptive branching

Per-step show_if conditions are evaluated against the live answer set. The path adapts as the respondent moves through the flow.

Resumable sessions

Session state is persisted server-side. Refresh the browser, switch devices, or come back later — the engine drops you back at the right step.

Clean export

Flat JSON export of every answer plus session metadata. The same plumbing extends to SPSS or CSV without touching the engine.

Architecture

backend/app/
  engine/      # pure step-resolution + branching + validation
  storage/     # SQLAlchemy models + repository
  routes/      # FastAPI endpoints
  config/      # study JSON + loader
  schemas/     # Pydantic wire schemas
frontend/src/
  api/         # typed fetch client
  engine/      # shared workflow types
  components/  # question renderers + chrome
  app/         # Next.js routes