Skip to content
BigSimmoPublic

About

Ward Flow — a mental health ward and bed-coordination prototype using synthetic data.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9,244 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ward Flow

Updated 2026-10-24 - link the operations runbook and the release tags; Documentation owns.

A ward and bed-coordination prototype for mental health services: referrals, patient movements, transport, delays and capacity.

All patient data is synthetic. This is a development prototype, not an approved system for real patient care. Never enter real patient information.

Open the hosted prototype.

Quick start

You need Node.js >=24.22.1 <25 (the exact release is pinned in .nvmrc) and npm 11. Any OS works.

npm ci            # installs dependencies and the Git hooks
npm run ensure    # starts or reuses the dev server and prints its URL

Open the printed URL plus /ward-flow. No credentials are needed: by default the app runs on synthetic, browser-local state. See local first run for the details.

The shared backend has its own packages. Install them once before npm run test:backend (which builds the backend engine, then runs its tests):

npm ci --prefix backend/ward-flow

Everyday commands

Task Command
One unit test file (fast) node scripts/run-vitest.mjs run tests/ward-model.test.ts
Unit tests for your changes npm run test:related
All unit tests npm run test
Lint (zero warnings allowed) npm run lint
Typecheck npm run typecheck
Format the files you changed npm run format -- --files <paths>
Ward browser journeys npm run test:e2e:ward-journeys
Release gate journeys (desktop Chrome, phone WebKit) npm run test:e2e:release-gate
Shared backend tests npm run test:backend
Pre-push checks for your change npm run verify:pr-local

How it fits together

  • Framework: Next.js 16 with React 19 and TypeScript. Styling is CSS Modules.
  • Screens: routes live under src/app/ward-flow/. Screen components and the workflow engine live under src/components/ward-management/.
  • State: one reducer holds the ward flow (referrals, movements, beds, transport, delays). Screens dispatch actions to it, and the synthetic seed data lives beside it.
  • Shared workspace (optional): backend/ward-flow/ saves the shared state to Ward Flow's own synthetic-only database. The current provider is in DATABASE.md. Ward Flow must never connect to PsychSift's Supabase or Railway resources.
  • Tests: Vitest unit and DOM tests in tests/, Playwright journeys in tests/*.spec.ts.

Continuous integration and deploys

  • Every pull request runs Ward Flow CI. Its scope plan selects executable static checks, four unit shards, browser journeys, the release gate and a production build; documentation checks and a secret scan still run for narrower changes. See scope by change. Ward Flow required checks the selected results and permitted skips.
  • Dependabot opens grouped dependency updates each Monday.
  • Railway deploys the live branch, not main. A daily release workflow at 6 am Perth moves live to the newest CI-passed main commit (HOW-WE-WORK §4), so merging into main does not change the live site. Build, start and health check settings are recorded in hosting; day-to-day checks and rollback are in the operations runbook. A green CI run does not prove a deploy; check the hosted app directly.
  • Each main commit that passes CI is tagged release-YYYY-MM-DD-<short sha> (release tag workflow), giving a named point to compare or roll back to.

Where to read next

Licence

The existing licence is retained. Public visibility does not grant an additional open-source licence.

About

Ward Flow — a mental health ward and bed-coordination prototype using synthetic data.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages