Purna: clay diyas light up on a dark table, the right half first, then a warm beam on the left edge, then the left half

Inspiration

After a stroke on the right side of the brain, many people stop noticing the left half of space. They eat the right half of the plate, read the right half of the page, bump the left door frame, and usually don't know it. It's called left spatial neglect.

Therapists train it with paper "cancellation" sheets: cross out every target on the page. It works in the clinic, but between visits there's little to practise with, and paper can't see where your head turns. Purna (पूर्ण) means "whole".

What the research told us

  • How common it is. Neglect follows roughly 40% of right-hemisphere strokes (UEA review).
    • So the left side is the default, and the right side is one setting away.
  • What it does to a day. Food left on one side of the plate, words missed, the door frame bumped, and families upset when the person doesn't look at them (StrokEngine).
    • So the practice happens at the dining table, the place where it shows most.
  • How scarce the help is. In a multicentre study in India, 76% of stroke survivors got physiotherapy but only 7.6% got occupational therapy, the therapy that usually treats neglect (INSPIRE).
    • So Purna is home practice between visits, and one therapist can follow many people from a link.
  • What glasses add. Optokinetic stimulation on a see-through head-mounted display improved neglect (Choi et al. 2015).
    • So a head-worn display is a real route, and the head turn is both the exercise and a measurement.

Our goal

  • Home practice on the person's own table that feels like lighting lamps, not taking a test.
  • Measure, never diagnose: give the therapist the numbers a cancellation test gives, labelled "Practice result, not a diagnosis".
  • The family sees; the therapist decides what comes next.
  • Free and open source, then a careful pilot with real stroke survivors and ethics approval.

What it does

The real Purna Lens in the Lens Studio Preview: what the patient sees beside what the family sees

The real Lens in the Lens Studio Preview. Left: what the patient sees through the glasses. Right: what the family sees across the table.

On the glasses (Snap SPECS)

Built with CLAD and run end to end in the Lens Studio Preview:

  1. The table. Small clay diyas appear across the real table, split exactly half left, half right. Some are whole; some are chipped, with a gap on their left or right side.
    • The level (Easy, Standard or Hard), the neglected side, how the hint is given, the bell's loudness and the feedback at the end are set on the Lens's controller, the way a therapist's plan sets them.
  2. The pinch. Pinch a whole diya and it lights with a warm tone. Pinch a chipped one and nothing happens but a soft tick.
    • Every pinch records which hand made it.
    • There is no score, no timer and no failure sound.
    • Every diya can be pinched with a ray from a hand resting in the lap, so nobody has to reach across the body.
  3. The hint. Stuck on the right with dark diyas still on the left? A bell rings from the left and a soft beam pulses there; if nothing changes, the beam sweeps left.
    • The hint points to the side, never to the answer.
    • The beam fades as the person starts finding left diyas on their own.
    • The wait starts at 6 seconds, then follows the person's own pace.
  4. The replay. When the table is done, a glowing thread replays the search path; the ones missed pulse where they were.
    • Then warm light fades up where the head pointed: an attention map. The half never looked at stays dark.
    • The therapist can choose one plain line instead.
  5. The report. "How did that feel?" One tap: Fine, Tired or Dizzy.
    • Dizzy shows stop-and-rest advice on the spot.
    • A report card shows four measures in plain words, labelled "Practice result, not a diagnosis". One pinch sends it home.
  6. Feel neglect for a family member, in three strengths: what is on the neglected side of the gaze fades, and on the strongest, the broken-side half of every diya goes.

Feel neglect on Strong: the left half of every diya is missing and the view slides back to the right

Feel neglect at /play: on Strong, the left half of every lamp is gone and the view drifts back to the right.

In the engine and at /play, not yet on the glasses

All of these are in the shared engine and tested, so bringing them to the Lens is wiring, not new logic:

  • A setup panel that suggests the level (two clean sessions step it up; a dizzy one goes to Easy with "rest first") and loads the therapist's plan.
  • Line halving as a 40-second warm-up.
  • Look to light: a 1.5-second gaze instead of a pinch.
  • Large and clear, a pause with the clock stopped, and a break after 10 minutes.
  • A 20-second sound check, and cups or apples instead of lamps.

/play in the browser: a clip of the glasses, three plain steps, then the 3D glasses view with the beam from the left

Try it at purna.byharsh.cv/play: the Lens's own engine in your browser.

Purna Family, the web side

purna.byharsh.cv

  • For families
    • Type the code shown on the glasses once (like DIYA-7K3P). Brothers and sisters join with an invite link.
    • Every session arrives as one plain sentence, two left/right bars and a trend line.
    • One menu switches the dashboard to Español, Français, Português or हिन्दी.
  • For therapists
    • A read-only link that lasts 7 days and can be stopped any time.
    • Every session with the numbers a cancellation test gives: Centre of Cancellation, egocentric and allocentric asymmetry, search order, crossings, revisits, head turn, line halving, possible slips and how each session felt.
    • A 2D replay, CSV export, a one-page printed summary for appointments, and a notes box that sends a note back to the family.
    • Set the next session: the level and hint delay the glasses will load next time.
    • Each person's usual day-to-day change shown as a band on the trend, so a lucky day isn't read as recovery. Anyone can open an example.
  • Try the table (/play)
    • The Lens's own engine in a 3D dining room (three.js) seen through simulated Spectacles, with a view as narrow as the glasses'.
    • The bell rings in the left ear; then the replay, the attention map and the report.
    • Feel neglect on Strong shows a family what their father lives with: half of every lamp gone, the view sliding back to the right.
  • Docs that explain themselves: safety, setup, guides for carers and therapists, results, evidence with sources, and a 52-term glossary. Every hard or medical word has a dotted underline that shows its meaning.

The family dashboard: one sentence per session, left and right bars, a trend and a note from the therapist

What the family sees: one plain sentence per session, left and right bars, a trend and the therapist's note.

A session replay: numbered diyas joined by a thread, missed diyas dashed, and warm bands where the head pointed

What the therapist sees for each session: the order the diyas were found, the ones missed, and where the head pointed.

Who it's for

  • The person practising: an adult with spatial neglect after a stroke, usually on the left, who can sit at a table for a few minutes and whose therapist agrees home practice is right for them. No reading is needed: the task uses no words.
  • The family member beside them: they put the glasses on the person and stay in the room. Their phone shows what happened in plain words, not scores.
  • The therapist: gets the numbers and sets the next session.
  • Not for: diagnosing neglect, replacing therapy, or anyone with a history of seizures. It hasn't been tried with patients yet.

Try it yourself

  1. The table, 30 seconds, headphones on: purna.byharsh.cv/play. Stall on the right and listen; then pick Feel neglect: Strong and play again.
  2. The family site: purna.byharsh.cv, then See an example (simulated sessions, clearly labelled), and the therapist view.
  3. The Lens: open the repo in Lens Studio 5.25 or newer and press Preview.
    • A whole session first plays by itself (DemoDirector, autoRun on); that's what the film records.
    • To play yourself, untick autoRun on DemoDirector; level, side and hint settings are on PurnaController.
    • In Interactive Preview, right-drag turns your head and a click is a pinch.
  4. The tests: cd tools && npm ci && npm test, then cd family && npm ci && npm test && npm run test:web && npm run test:e2e.

A one-page guide is in the repo: JUDGES.md.

How we built it

How Purna is built: the Lens, PurnaEngine shared with /play and the tests, and Purna Family on Cloudflare

Planned with the skill pack

  • We started in plan-lens: the brief, the user (Ramesh, 64, who had a right-side stroke in March and now misses the left half of his world), and the single spatial moment: "stuck, a bell from the left, the head turns".
  • Five done criteria, each checkable in the preview. All of it is in the repo's devpost/ folder.

Research first: what it said, what we did

Every choice traces to a published finding. The full list, with the choice each one led to, is in docs/10-RESEARCH.md.

  • Two kinds of neglect. The Ota test separates missing your own left from missing the left of each object, using shapes with a gap on one side (Ota et al.).
    • We did: whole and chipped diyas, with chips on both sides, and a report that scores both kinds.
  • Show, don't tell. Showing patients where they looked improved neglect and self-awareness more than usual therapy in a crossover study (Kobe University), and people unaware of their neglect struggle with strategy training (Kortte & Hillis).
    • We did: the replay thread and the attention map, on the person's own table.
  • Motion direction matters. Leftward pursuit reduces neglect, while rightward may worsen it (VR eye-movement review).
    • We did: the warm-up only ever drifts left, and a unit test fails the build if that changes.
  • How the search is organised. Order and crossings tell you more than a count (CancellationTools).
    • We did: search order, path crossings and revisits on every session.
  • No pass/fail lines. Fixed cut-offs give false positives that depend on how many targets were found (J Int Neuropsychol Soc 2020; Rorden & Karnath 2010).
    • We did: published references appear as context only, and the therapist watches change over time.
  • Families help, therapists lead. Family-led rehabilitation didn't reduce death or dependency in India's ATTEND trial (Lancet 2017).
    • We did: families get visibility and encouragement; therapy decisions stay with the therapist.
  • Honest about evidence. Whether neglect therapies improve daily independence is very uncertain (Cochrane).
    • We did: Purna is practice and measurement, never treatment.
  • Seizures are common after stroke (about 7% early, about 10% later; Nandan et al. 2023), and content shouldn't flash more than three times a second (WCAG 2.3.1).
    • We did: caught a 4 Hz flicker in our own design and made it a smooth 1 Hz glow; nothing in the Lens changes faster than three times a second.

One engine, three homes

  • Every rule (layout, hint timing, beam fading, metrics, line halving, pause and breaks, the comfort check, slip flags, the report) lives in plain TypeScript in Assets/Scripts/Core, with no Lens Studio globals.
  • The Lens calls PurnaEngine every frame; Node runs the same files in tests; the browser runs them at /play.
  • 143 tests cover it at 99% line coverage: layout rules on 500 seeds × 3 levels, hint timing to the frame, beam fading, every metric and the engine's phases.

The Lens, built with CLAD and the Lens Studio MCP

  • CLAD built the scene from the brief: Spectacles Interaction Kit pinch on each diya with the hand recorded, a spatial bell at the table's left edge, the beam, the replay thread and attention map, a UI Kit report card, and head yaw from the camera every frame.
  • PurnaController is the only bridge to the engine.
  • PurnaSelfTest checks the done criteria inside the Lens and prints PASS / FAIL to the Logger.
  • The whole session runs end to end in the Lens Studio Preview; that recording is the Lens footage in the film. It has not been run on the glasses yet.

One session, end to end: light the diyas, a bell from the left, your search replayed, one pinch sends it home, the therapist sets the next one

Does it measure the right thing? The patient bench

  • Three scripted searchers play the real engine on 200 layouts each: one who searches the whole table, one who misses the left of the table, and one who misses the left of each object.
  • Purna's report tells them apart on every seed:
    • the left-neglect searcher finds 65% of left diyas, needs 2.9 hints and turns 16° left;
    • the object-neglect searcher finds every whole diya but lights 5.6 with the gap on the left.
  • A fourth, with a field cut but no neglect, isn't read as neglect.
  • These are simulated players, not patients.

Purna's report tells three search styles apart, over 200 simulated sessions per player

Simulated players, not patients.

Purna Family on Cloudflare

  • A Cloudflare Worker with D1. Family keys and doctor tokens are 32 random bytes, stored only as SHA-256 hashes.
  • React with shadcn/ui, React Bits and Aceternity-style effects, behind a strict Content Security Policy with no third-party scripts.
  • A contract test runs the real engine through every level, add-on and searcher and checks each session passes the server's validator, so the glasses and the server can't drift apart.

Tested like a product

  • 391 automated tests: Core, bench and sounds 143; Worker and local D1 88; web components 94; and 66 end-to-end tests in real Chrome at phone and desktop sizes.
  • Accessibility checks (WCAG 2.1 AA) on every screen in light and dark mode, a keyboard-only walk, and the whole family loop: pair, share with the doctor, note back, delete everything.
  • GitHub Actions runs the suites a change affects on each pull request and all of them on main; the site deploys after green CI.

Safety, because it's health-adjacent

  • A docs section that starts with safety: who shouldn't use it, when to stop, stroke warning signs, and calling the local emergency number anywhere in the world.
  • Privacy by design: nothing identifying leaves the glasses, doctor links expire, one button deletes everything, and unpaired data is deleted after 30 days.

Tools, code and credits

  • AI tools: Claude (Anthropic) helped write the code, tests and docs, with Harsh directing, reviewing and testing every change. CLAD built the Lens scene in Lens Studio.
  • Third-party code: React Bits components (MIT + Commons Clause), shadcn/ui patterns over Radix UI (MIT), and effects after Aceternity UI's patterns. Credits in family/THIRD_PARTY.md.
  • Fonts: Mukta (Ek Type) and Geist (Vercel), SIL Open Font License, self-hosted.
  • Sounds: the light tone, tick, bell, click and shimmer are original, synthesised in code and tested against the design spec. No music beyond them.
  • Data: no patient data was used; every session shown comes from simulated players.

Challenges we ran into

  • Telling two kinds of neglect apart. A plain "find all the targets" task can't separate missing the left of the room from missing the left of each object.
    • Chipped diyas with the gap on a known side made the second visible, and the bench proved the report separates them.
  • Hints that don't do the work. An arrow to the next diya would raise the score and teach nothing.
    • The bell and beam only say "look left", and the beam fades as the person stops needing it.
  • A hint that can point the wrong way. A neuropsychologist warned that with auditory neglect a bell from the left may go unheard or seem to come from the right.
    • A 20-second sound check now suggests bell and beam, or the beam only.
  • An additive display. Black is invisible on SPECS.
    • Every colour is warm and bright, and the stand-in table stays dim so the diyas are always the brightest thing.
  • Keeping the glasses and the server in step.
    • Session JSON is one versioned contract (purna.session.v1), validated field by field, under 64 KB, and tested against everything the engine can produce.

Accomplishments that we're proud of

  • One engine in three places: the glasses, the tests and the browser. The table you play at /play is scored by exactly the code the Lens runs.
  • The attention map: glasses know where you looked, not just where you tapped, and the side never looked at stays dark on your own table.
  • Built for bad days, not just good ones: a comfort check that changes the next session, and at /play a pause, a break reminder, look to light for a hand that won't pinch, and large and clear for eyes and ears that need more.
  • A family site that passes automated accessibility checks on every screen, in both colour modes, from 320 to 1440 px wide, in five languages.

Built with the people who study neglect

I'm an engineering student, not a clinician, so I cold-emailed the people who do this work: authors of 2022–2026 neglect papers and rehabilitation clinicians, one personal email each, opening with their own work and asking one question it raises for Purna. No endorsement and no patient data asked for, and every email offered a way to say no.

  • 200 emails to 26 countries and regions by 2 Dec 2026.
  • 16 researchers and clinicians wrote back.
  • Their feedback became 14 merged pull requests, most the same day.

What each one said, and what we did:

  • Dr. Ivan De Boi and colleagues, University of Antwerp (their paper)
    • Said: adaptive targets make sessions hard to compare one by one, so they compare heatmaps over time.
    • We did: the number of targets and the rules that spread them stay fixed, and the therapist view shows an attention map over time, one row per session.
  • Dr. Peii (Peggy) Chen, Kessler Foundation (her new paper)
    • Said: how would someone with a field cut but no neglect score? And define and measure neglect before claiming any effect.
    • We did: a simulated hemianopia player on the bench, which Purna doesn't read as neglect; a "where the search started" measure; and KF-NAP Plus as the pilot's outcome measure.
  • Dr. Brigitte Kaufmann, University of Lucerne (her paper)
    • Said: no single delay suits everyone, the bell should be adjustable or off, and assessment must be blinded and kept apart from training.
    • We did: the therapist sets the bell's loudness, and the pilot never uses Purna's own numbers as the outcome.
  • Dr. Edwin Dalmaijer, University of Bristol (CancellationTools)
    • Said: many treatments for neglect haven't worked well, so the odds are low, though worth trying; and AR could point out something meaningful on the neglected side.
    • We did: the site now says plainly that whether practice helps is unknown, and an assist mode is on the roadmap.
  • Dr. Sylvia Latarnik, University Hospital Cologne
    • Said: a line-halving mark couldn't be corrected, and patients aren't used to a mouse or buttons; a family member as co-therapist helps.
    • We did: marks can be moved or undone, and the therapist guide suggests look to light with a family member beside the person.
  • Dr. Shay Ofir-Geva, Loewenstein Rehabilitation Medical Center
    • Said: recording the hand is crucial; the chipped lamps looked too much like the whole ones; and untimed tasks can simply be learned.
    • We did: every pinch records its hand, the chip is wider, a ten-second "which one is whole?" practice comes first, and the pilot adds a timed, hard-to-learn task.
  • A neuropsychologist who leads a neurovisual rehabilitation service
    • Said: neglect can affect hearing too, so a bell may pull attention the wrong way, and there's no evidence for a fixed 6-second wait.
    • We did: the sound check, the therapist's choice of hint, a wait that adapts to the person's pace, and every wait logged (PR #139).
  • A neuropsychologist who validated the Mean Position of Hits
    • Said: 12 targets is low for a fine-grained measure of the bias.
    • We did: a Dense level with 20 whole and 20 chipped lamps.
  • A neuropsychologist who studies XR training for neglect
    • Said: co-design feedback with clinicians, keep the end feedback simple, and people reach the top score even on harder tasks.
    • We did: one plain line instead of the replay, a Challenge level above Hard, and co-design as a next step.
  • A senior researcher in neglect assessment
    • Said: add the absolute Centre of Cancellation, so a bias the other way shows up too.
    • We did: the therapist view and the CSV show both.
  • A professor of physiotherapy at a stroke rehabilitation centre in India
    • Said: the browser version is hard to picture without glasses, and the instructions are a lot for a family carer.
    • We did: /play opens with a clip of the glasses, three plain steps and one Start button (PR #181).
  • A professor who models recovery after stroke
    • Said: track how much of the neglected side is found before the cue, and check transfer to everyday tasks.
    • We did: every session reports "found before the first hint", and the pilot adds a real-tray check (PR #183).
  • A researcher who ran a randomised VR trial for neglect
    • Said: the wait before the bell is in effect a threshold, so set it from data.
    • We did: the pilot sets it first from healthy older adults and stroke survivors without neglect.
  • A physical therapy researcher in Japan
    • Said: a steady body matters more than testing the sense of vertical.
    • We did: the safety guide asks for a steady chair with a back, and free head and body turns (PR #185).
  • A researcher in biorobotics who places neglect targets in 3D
    • Said: check that anchored lamps stay put as the head moves and after the glasses come off.
    • We did: the pilot measures that drift before comparing sessions (PR #189).

People are named only with written permission. Everything is paraphrased, and it's feedback on a design, not an endorsement: nobody has tried Purna with patients yet. The original emails can be shown to the judges on request.

What we learned

  • Neglect is not one thing. Measuring both "the person's left" and "each object's left" changed the whole design.
  • Neglect isn't darkness at the edge of sight. Half of each thing goes missing, attention keeps sliding back to the good side, and sounds from the other side barely register. Building Feel neglect changed how we wrote everything else.
  • Plan for tired days. About half of stroke survivors live with fatigue, so a session needs a pause, a break and a way to say how it felt.
  • Ask the people who do this work. One email showed that a bell, our main hint, could point some patients the wrong way.
  • Logic first, scene second. Putting the rules in plain, tested TypeScript before opening Lens Studio meant CLAD built the scene against an engine that was already proven.

What's next for Purna

Our goals

  • A pilot with ethics approval: real stroke survivors and their therapists, with blinded before-and-after tests (KF-NAP Plus and a cancellation test), and Purna's own numbers never used as the outcome.
  • First runs on real Spectacles, checking that the lamps stay put as the head moves and after the glasses are put back on.

On the glasses

  • The setup panel with the therapist's plan, line halving, look to light, large and clear, an open-palm pause and the sound check. All are in the engine and at /play already.
  • The panel and report in the same five languages as the family site.

Later

  • More languages for families (Gujarati, Arabic, Bengali).
  • A far board across the room, and furniture other than the dining table.
  • Longer pairing codes or a global rate limit before any public use.

Purna is a practice tool, not a medical device. It doesn't diagnose or treat.

Every diya, on both sides of the table. purna.byharsh.cv

Links: GitHub · Purna Family · Try the table · The film

Built With

  • axe-core
  • blender
  • clad
  • cloudflare-d1
  • cloudflare-workers
  • github-actions
  • lens-studio
  • lens-studio-mcp
  • playwright
  • react
  • react-bits
  • remotion
  • shadcn-ui
  • snap-spectacles
  • spectacles-interaction-kit
  • tailwindcss
  • three.js
  • typescript
  • vite
  • vitest
Share this project:

Updates

Submission history