Alleviate the tension between students and teachers. A forward-only set of math and reasoning problems that shows whether a student can't start, won't start, or doesn't yet know enough to start, and whether they are reading or rushing. Version 1.0.2.
Everything is plain HTML, CSS and JavaScript with no runtime dependencies and no server. Build needs only Python 3.
dist/site/ is the finished site. Open dist/site/index.html, or upload the whole folder to any web host.
| File | What it is |
|---|---|
index.html |
Landing page with a student link builder |
test.html |
The student test (forward-only, resumes on refresh) |
viewer.html |
Teacher results viewer: classifies students, compares conditions, exports CSV |
print.html |
Printable booklet builder (Form A or B, choose sections, ?key=1 for the answer key) |
booklet-formA.pdf, booklet-formB.pdf, booklet-key.pdf |
Ready-to-print booklets |
dist/artifact/ has the landing, test and viewer without the document wrapper, for publishing as claude.ai artifacts.
python3 build.py
Reads src/ and site.json, writes dist/site/ and dist/artifact/. Python standard library only.
site.json sets where the landing page sends people. static is for the self-hosted folder (relative links work as is).
artifact holds the claude.ai links. Change them if you republish under new links.
src/bank.js item bank, forms A/B, settings (title, stakes banners, instructions, version, api)
src/test.html student test UI and engine
src/tension.js elastic cords and stretchy wordmarks (spring physics, no dependencies), inlined into every page
src/analysis.js merging results and the classification rules
src/viewer.html results viewer
src/print.html printable booklet builder
src/landing.html landing page (tokens __TEST_URL__, __VIEWER_URL__, __SHARE_NOTE__ come from site.json)
src/sample-codes.json the viewer's built-in sample class (made by `npm run sample`)
site.json link targets for the landing page
build.py inlines the JS into each page and writes dist/
tools/make_logo.py generates the animated logo SVGs into brand/
brand/ animated and static logo SVGs, app-icon mark
src/theme.css the shared palette and chalk/dust styles; src/defs.html is the chalk filter
docs/TEACHER-GUIDE.md how to run it in a class and read the results
tests/ node tests (see below)
worker/index.js is a Cloudflare Worker that serves dist/site/ and a small API backed by D1 (migrations/).
- In the viewer, enter your teacher token, type a label ("P4 Form A") and press New session code.
- Give students the code, or press Copy student link (
/test.html?c=CODE). They type their name and the code. The label becomes their class in the viewer. - When they finish, the test sends results to the Worker. If sending fails they get Try sending again, the file download and the copy-code, as before.
- In the viewer press Load results on the session (press again to refresh). Close a session to stop accepting results; delete it to erase them.
Results can be overwritten by the same student name and form (a retake replaces the earlier one). Limits: 512 KB per result, 400 results per session, sessions expire after 7 to 30 days. Only the teacher token can read results.
Set up once:
wrangler d1 create tenshion # copy the database_id into wrangler.jsonc
wrangler secret put TEACHER_TOKEN # choose a long random string; this is your teacher password
npm run db:init # create the tables
npm run deploy # builds, then deploys the Worker with the site
npm run dev # local preview at http://localhost:8787 (set TEACHER_TOKEN in .dev.vars)
npm run api tests the Worker, npm run e2e drives a teacher and a student through it. Student names, answers and timing are stored in your Cloudflare account; check your district's rules on student data, and consider first names only.
Options go in the address as a query (test.html?form=B&len=short) or, on hosted pages that drop queries, as hash
tokens (test.html#form-B_len-short).
| Option | Query | Hash token |
|---|---|---|
| Form A or B (default: assigned by name) | form=A |
form-A |
| Short version, about 25 minutes | len=short |
len-short |
One sitting: ABC, DGKH, or FEXS |
blocks=ABC |
blocks-ABC |
| Session code | c=K7QM4X2T |
c-K7QM4X2T |
| Prefill class (no session code) | class=P4 |
class-P4 |
| Teacher preview bar | teacher=1 |
teacher |
| Clear a saved session | reset=1 |
reset |
All in CONFIG at the top of src/bank.js:
stakes: the two banner texts (not graded, teacher reads it). The test carries no credit, so neither banner may promise any. Keep only wording you will honor: the teacher banner says you will read the answer.instructions,title,submitHelp: what students read.api: base path of the results API (default/api, served byworker/index.js). Set''to turn session codes off and use file download and copy-code only.version,released: see below.
Semantic: bump major when scoring or what an item means changes (old and new results should not be pooled), minor when items or screens are added, patch for wording, layout and fixes. Every results file records version; the viewer lists the versions it has loaded and warns when major versions differ. After changing version in src/bank.js also update package.json and add a changelog entry in src/landing.html.
npm install
npx playwright install chromium
npm test
npm test builds, checks every answer key, drives the real test in Chromium with five scripted student profiles, checks that the
viewer classifies them as intended, and tests forward-only behavior, resume, the stakes banner by form, hash links, the results code round trip, and phone layout.
npm run checkruns the answer-key and analysis checks only (no browser).npm run samplerebuilds the viewer's sample class from the latest simulated runs.npm run pdfsregenerates the three booklet PDFs intodist/site/(needs Chromium).npm run logoregeneratesbrand/(needspip install fonttools brotli).
The simulated students are scripted, so the classification tests show the rules do what they were written to do. They do not show the cutoffs are right for real students. Run one class and calibrate.
Publish dist/artifact/test.html and viewer.html with the downloads capability, and landing.html with the three booklet PDFs
alongside it. Hosted pages cannot read a ?query, send results to you, or open a print dialog, so students save a file or copy the results code, and print.html stays a file.
On the landing page and the bands of the test, drag the cord (or the wordmark) and let go: the cord swings back and settles. The wordmark uses Archivo's width axis, so the pulled side stretches while the other side bunches, then swings with the cord. The landing cord has a keyboard button (arrow keys). With reduced motion on there is no intro, no hint and no swing, but dragging still works. npm run tension tests it in Chromium. Tune the feel with K (stiffness) and C (damping) at the top of src/tension.js.
The palette is "Eraser dust": a warm graphite board with dusty chalk colors, and a dusty desk-paper light mode. Everything is driven by src/theme.css, which build.py inserts into the test, viewer and landing page; edit the tokens there and rebuild. src/defs.html holds the SVG chalk filter that roughens big type and cords, and the .dust class adds the grain and haze on the board-colored bands. To turn the texture off everywhere, set --chalk: none; in theme.css and delete the .dust::before rule.
brand/ holds the animated logos. In tenshion-logo.svg the letters on one side of SH stretch while the other side bunches up, it swings the other way, and settles while the cord goes slack.
tenshion-logo.svg: adaptive (dusty paper by day, the board in dark mode), chalkedtenshion-logo-clean.svg: same without the chalk texture, for small sizestenshion-logo-on-board.svg: on its own graphite board with graintenshion-logo-loop.svg: replays with a re-tensiontenshion-logo-static.svg,tenshion-mark-static.svg: no animationtenshion-mark.svg: SH app icon
Regenerate with npm run logo after changing the colors at the top of tools/make_logo.py (keep them in step with theme.css). The wordmark outlines come from Archivo (SIL Open Font License, tools/fonts/OFL-Archivo.txt).