Free, browser-based stratified block randomization tool for RTSM and IRT workflows - equipose.org
Equipose is a free, open-source web utility designed to help biostatisticians and clinical trial managers rapidly design, simulate, and export stratified block randomization schemas for RTSM, IRT, and IWRS clinical trials.
Built entirely as a client-side Angular application, it ensures that sensitive trial design parameters never leave the user's browser. It supports complex multi-strata designs, variable block sizes, and custom treatment ratios.
Note
Clinical Compliance & Scientific Validity
The schemas generated directly within the Web UI are cryptographically identical to the outputs of the generated R, Python, SAS, and Stata scripts. You can use either the Web UI or the downloaded scripts within your organisation's validated statistical environment for your source of truth.
- Complex Ratios: Define custom allocation ratios (e.g., 1:1, 2:1, 3:1:1) across multiple treatment arms.
- Stratified Block Randomization: Ensure treatment balance across multiple clinical sites and dynamic stratification factors (e.g., Age, Gender, Region).
- Dynamic Stratum Caps: Set specific maximum enrollment caps for unique stratum combinations.
- Variable Block Sizes: Randomise across multiple block sizes within the same study to resist unblinding.
- Math Failsafes: Built-in validation ensures block sizes are exact multiples of the total allocation ratio.
- Code Generation: Instantly export the exact randomization logic to R, Python (pandas/numpy), or SAS scripts for integration into your Statistical Analysis Plan (SAP).
- Reproducible: Every schema carries a random seed that can be re-entered to reproduce the exact same allocation. The system guarantees 100% bit-for-bit sequence parity between the Web UI (TypeScript) and all target statistical software exports (Python, R, SAS, and Stata).
- Zero-Trust Architecture: 100% client-side execution. No data is stored on or transmitted to external servers.
| Layer | Technology |
|---|---|
| Framework | Angular 21 (Standalone Components, Signals, @for Control Flow) |
| State management | NgRx SignalStore 21 |
| Concurrency | Web Workers (off-main-thread schema generation) |
| Styling | Tailwind CSS 4 |
| PRNG | Mersenne Twister (MT19937) |
| PDF export | jspdf + jspdf-autotable |
| Unit testing | Vitest 4 + Angular TestBed (jsdom environment) |
| E2E testing | Playwright 1.58 (Chromium, Firefox, WebKit) |
| Linting | ESLint 9 + angular-eslint + strict domain boundary rules |
| Versioning | semantic-release (Conventional Commits → GitHub Releases) |
| Deployment | Cloudflare Pages (static SPA) at equipose.org |
All project documentation, including architecture concepts, developer commands, compliance checklists, and testing protocols, is centralized in our Documentation Hub.
This project follows a Domain-Driven Design structure with three bounded contexts:
randomization-engine- pure TypeScript algorithm, Web Worker, fallback-safe facade.study-builder- reactive form, NgRx SignalStore, preset definitions.schema-management- results grid, PDF/CSV export, code generation modal.
ESLint no-restricted-imports rules enforce that the study-builder UI can only
talk to the engine through the facade, never through internal service or worker files.
For the full architectural breakdown including Mermaid diagrams, see docs/explanation/ARCHITECTURE_CONCEPTS.md and docs/reference/ARCHITECTURE_REFERENCE.md.
Please refer to the Developer Command Reference for full details on:
- Local environment setup and prerequisites (Node.js, Python, R)
- Local development commands
- Testing, linting, and verification commands
- Logic verification and golden fixture generation
Pushes to main automatically trigger the deployment workflow,
which builds the Angular app as a static Single Page Application (SPA) compatible with Cloudflare Pages
and deploys it at https://equipose.org.
To enable this on a fork:
- Connect the repository to your Cloudflare account.
- Configure the build command as
pnpm run buildand output directory asdist/app/browser.
Releases are automated via semantic-release. Merging a feat: or fix: commit to
main automatically bumps package.json, updates CHANGELOG.md, and creates a
tagged GitHub Release. The new version is stamped into every generated CSV, PDF, and
code script via src/environments/version.ts.
GNU Affero General Public License v3.0 - see LICENSE for details.