Skip to content

Repository files navigation

Dosegame

CI Live demo

A focused browser quiz for studying the historical radiation-therapy tolerance-dose estimates published by Emami et al. in 1991.

Open the live demo

Educational use only. Dosegame presents historical, population-level estimates for recall practice. They are not current dose constraints, prescriptions, treatment-planning guidance, or a substitute for institutional policy and clinical judgment.

Dosegame quiz showing a historical TD 5/5 brainstem question, three dose choices, session progress, and source context

Why this project exists

The first Dosegame was a small PyQt study tool I prototyped in 2022 while learning software development. In 2026, I revisited the idea with an AI-assisted workflow and rebuilt it as a tested, dependency-free web application. The result retains the original learning goal while adding explicit clinical boundaries, reproducible game logic, responsive interaction, and automated QA.

This repository demonstrates more than a quiz screen: it separates source data, domain-neutral state transitions, and browser rendering so each concern can be reviewed and verified independently.

Features

  • Ten-question study sessions drawn from 57 available facts across 25 anatomic structures
  • Historical TD 5/5 framing shown prominently throughout the experience
  • Volume-based prompts plus the source's special spinal-cord length and skin-area scenarios
  • Three distinct choices per question, immediate feedback, score and streak tracking
  • Completion review that calls out missed facts and supports a fresh session
  • Keyboard controls (1, 2, 3, and Enter), visible focus, and live feedback announcements
  • Responsive two-column layout that becomes a single focused column on smaller screens
  • Permanent educational disclaimer and direct source context
  • No runtime dependencies, tracking, accounts, or external media assets

Quick start

Dosegame is a static site. Serve the repository root rather than opening index.html directly so browser ES modules load consistently.

Python

git clone https://github.com/CmackRadOnc/dosegame.git
cd dosegame
python -m http.server 8000

Node.js

If Node.js is your preferred local runtime, the following uses a temporary static-server command:

git clone https://github.com/CmackRadOnc/dosegame.git
cd dosegame
npx --yes serve . --listen 8000

Then open http://localhost:8000. The Node option downloads the small serve command into npm's cache on first use; it does not add a project dependency or modify package.json. Use the Python option for a fully offline, zero-download launch.

Test and verify

The automated suite uses Node's built-in test runner, so there is no dependency installation step:

npm test
npm run check

npm test covers dataset invariants and quiz-state behavior. npm run check syntax-checks the browser modules. GitHub Actions runs both commands on Node.js 22 and 24 for every push and pull request.

See docs/verification.md for the QA traceability matrix, manual review checklist, and the boundaries of what these checks do—and do not—establish.

Architecture

Path Responsibility
index.html Semantic application shell and safety messaging
styles.css Responsive visual system, focus states, and layout
src/data.js Historical study facts and source metadata
src/quiz.js Question construction and deterministic session state
src/app.js DOM rendering, events, and keyboard interaction
tests/ Data-integrity and quiz-engine regression tests
TherapyGamewithClasses.pyw Read-only legacy prototype retained for project history

The quiz engine is independent of the DOM. Randomness is injected at its boundary, allowing state transitions and question generation to be exercised predictably in tests.

Data provenance

The study set is a transcription of historical normal-tissue tolerance estimates associated with:

QUANTEC is cited as important later context, not as a claim that this quiz implements modern guidance:

The application intentionally labels the dataset by year and source. It does not blend the historical table with current institutional constraints or convert it into treatment advice.

QA traceability

The repository links safety and behavior claims to concrete evidence:

  • Dataset tests pin the expected 25-structure and 57-fact inventory.
  • Scenario tests preserve the distinct spinal-cord length and skin-area prompt wording.
  • Quiz tests check choice integrity, answer handling, progression, and completion.
  • Syntax checks cover every browser JavaScript module.
  • A manual checklist covers responsive layout, keyboard flow, visible focus, live feedback, and persistent safety messaging.

This traceability is aimed at maintainability and regression prevention. It is software QA, not clinical validation.

Limitations and safety boundary

  • The source material is historical and does not represent current clinical guidance.
  • The values are population-level estimates, not patient-specific recommendations.
  • The quiz does not model fractionation, treatment technique, comorbidities, concurrent therapy, or institutional policy.
  • The dataset is intentionally finite and is not a comprehensive organ-at-risk reference.
  • Passing tests confirms internal software rules and recorded dataset invariants only; it does not establish clinical correctness or fitness for clinical use.
  • Dosegame must not be used for prescription, planning, plan review, or treatment decisions.

Legacy prototype

TherapyGamewithClasses.pyw is the original PyQt-era prototype, preserved to show the project's evolution. It is not the current application entry point, is not part of the browser test suite, and should not be interpreted as a maintained clinical tool.

Development note

The 2026 browser version was developed with AI assistance under human direction and review. Architecture, clinical boundaries, acceptance criteria, and final verification remain human responsibilities.

License

No open-source license is granted. The code is publicly viewable as a portfolio project; all rights are reserved unless a license is added later.

About

Historical TD 5/5 radiation-tolerance study game with accessible browser UI, tests, and explicit clinical safeguards.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages