safeeyes
Protect your eyes from eye strain using this simple and beautiful, yet extensible break reminder
翻訳待ち
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Pure-TypeScript, cohort-level organ-outlook simulation library. It computes how an organ's modeled parameters change when a clinician toggles a set of interventions (drug classes + lifestyle changes), one after another, and emits a versioned JSON contract for a separate 3D viewer (COR Studio).
No UI. No network. No third-party simulation framework. One runtime dependency
(zod, for contract validation).
Demo (3D): https://cor-outlook-web.vercel.app — an interactive Next.js +
react-three-fiber page (source in web/). A clinician toggles
drug/lifestyle interventions and sees, in 3D, how an organ (Heart or Brain)
looks in 5 years with vs without treatment, as either a side-by-side view
(untreated left, treated right) or a ghost overlay (treated solid, untreated
translucent). A year slider (0–5) scrubs the trajectory; a parameter table shows
baseline → year-5 for both scenarios with best/worst ranges, contributors, and
engine warnings. Baseline is a synthetic example. The Monte Carlo runs
entirely in the browser; no data leaves the page. 3D meshes are open and
licence-cleared (see docs/attributions.md); if WebGL
is unavailable the viewer shows a fallback and the table still works.
The engine also exposes a cited time-trajectory API (trajectory()): a 0–N
year untreated (natural course) vs treated series per parameter with a seeded
likely/best/worst band. Natural-course rates are cited (brain ageing: Barnes
2009, Fjell 2009, de Leon 1989); the untreated heart is held flat ("no
progression modelled") because no single defensible cohort rate exists.
Intervention effects are applied with a documented linear ramp to their
trial follow-up and labelled "modelled time course". See
docs/evidence.md.
⚠️ Cohort-level decision support, not an individual prediction. Every output is derived from published trial/meta-analysis data at the cohort level and carries a notice to that effect. It is not a forecast for any specific patient and must not be used as one.
docs/evidence.md, but have not been
independently verified against the original papers..kiro/specs); design and evidence
review by the author.verified: false and excluded from computation (never invented).npm install
npm run build # compile to dist/
npm test # vitest
npm run lint # eslint
npm run typecheck # tsc --noEmit
import { simulate } from "cor-outlook-engine";
const contract = simulate({
organ: "heart",
baseline: { lvmi: 135, ef: 38 }, // parameterId -> value (units per model)
interventions: ["ace_inhibitor_arb", "sglt2_inhibitor"],
seed: 1, // optional, default 1 (deterministic Monte Carlo)
iterations: 2000, // optional, default 2000
});
console.log(contract.parameters); // [{ id, baseline, value, low, high, unit, ... }]
console.log(contract.warnings); // excluded unverified effects, caps, clamps
console.log(contract.notice); // cohort-level, not-a-prediction notice
# list interventions
node dist/cli/index.js list --organ heart
# simulate (baseline is a JSON object of parameterId -> number)
node dist/cli/index.js simulate \
--organ heart \
--baseline examples/heart.synthetic.json \
--on ace_inhibitor_arb,sglt2_inhibitor,beta_blocker \
--seed 1 --iterations 2000
The contract prints to stdout; warnings print to stderr; invalid input
exits non-zero. examples/heart.synthetic.json is synthetic sample data,
not a real patient.
Effects compose as value = baseline * Π (1 + delta_i) in relative-change
space. This gives:
0.9 × 0.9), not −20%.The aggregate relative change per parameter is capped (default ±60%) and every value is clamped to physiological bounds, with warnings when either binds.
See docs/evidence.md for the full effect table with
sources and evidence grades, and the list of effects that could not be
sourced (and are therefore excluded from computation). Every contract also
embeds its own provenance (citations, seed, iterations, excluded-unverified
list).
Not every (intervention × parameter) pair has a usable published effect size;
those pairs are excluded and listed in docs/evidence.md.
MIT — see LICENSE.