Inspiration

Some people can hear every word and think every thought, but they cannot speak or move: patients on breathing tubes in an ICU, people after a stroke, people living with ALS or locked-in syndrome. Very often their eyes still work.

In 1966, a prisoner of war blinked the word T-O-R-T-U-R-E in Morse code on live TV. Morse code was invented in 1838, ships stopped using it for distress calls in 1999, and US radio licences dropped it in 2007. It is a retired technology. We wanted to resurrect it as the simplest possible way to talk: no hands, no voice, just a blink.

What it does

Dot-Dash is a website. Open it on a phone or laptop, allow the camera, and your blinks become words.

Calibration (1 minute): learns how you blink. A short blink (0.4–1 s) is a dot, a long blink (1–3 s) is a dash. Easy mode: a highlight moves across Water, Pain, Toilet, Turn me, Call nurse, Yes and No. One blink picks the highlighted option and the app says it out loud. Morse mode: spell anything. A live chart shows which letters your dots and dashes could become. Numbered sentence suggestions start with the letters you spelled, and you pick one by blinking its number. Nothing is ever chosen automatically. Quick codes: one pattern speaks a common need, for example six short blinks means water. Emergency SOS: keep your eyes closed for 3 seconds, or spell HELP, and the caregiver gets a Telegram alert right away (at most one every 30 seconds). Caregiver questions: a caregiver sends a yes/no question from their own phone. It pops up on the patient's screen, and one short blink means yes, one long blink means no. Speaks English, Hindi and Kannada. Private: the camera video is analysed in the browser and never leaves the device.

How we built it

Eye tracking: MediaPipe Face Landmarker runs fully in the browser (WASM) and reads the eyeBlinkLeft and eyeBlinkRight blendshapes every frame. Blink logic: a pure TypeScript BlinkDetector turns eye-closure timing into dots, dashes, letter gaps and word gaps. A Morse decoder, a phrase matcher and a suggestion filter sit on top of it. This logic has no React in it, so it is unit tested with Vitest. Frontend: Vite, React 19, TypeScript (strict) and Tailwind CSS v4, with design tokens in one file. A test fails the build if any colour pair drops below WCAG AA contrast or an animation breaks our motion rules. Backend: three Vercel serverless functions: /api/alert sends the Telegram SOS. /api/ask handles caregiver questions, optionally shared between devices through Upstash Redis. /api/predict suggests sentences with Groq first and Google Gemini as a fallback. All three check a passcode with a timing-safe compare, and every input is validated and length-limited. AI transparency: every suggestion is labelled "AI" or "Built-in". There is an off switch, and only the typed letters and recent sentences are ever sent. If the cloud is slow (over 9 s), the built-in phrases stay. Built with Kiro We built the whole project in Kiro, spec first. The .kiro/ folder is in the repo:

4 specs (dot-dash, ai-transparency, provider-health, ui-refresh), each with requirements.md (EARS-style acceptance criteria), design.md and tasks.md, followed in order. Steering docs (product.md, tech.md, structure.md) kept the generated code consistent across sessions. They covered privacy and safety rules, keeping logic free of React, and keeping secrets in environment variables only. Agent hooks: one runs the unit tests whenever blink, Morse or phrase logic is saved. The other checks edited files for hard-coded secrets. Vibe coding for the UI pages and for tuning the calibration and blink timing.

Challenges we ran into

Telling a blink from a deliberate signal. Natural blinks are about 0.1–0.3 s, so we ignore anything under 0.4 s. Calibration then fits the dot and dash thresholds to each person, because everyone blinks differently. Never choosing for the patient. Auto-complete feels helpful, but a wrong sentence spoken aloud is worse than a slow one. Every suggestion must start with the typed letters, and only a blink can select it. Making alerts reliable but not spammy. A 30-second limit is enforced on both the client and the server, and a passcode stops strangers from triggering alerts. Sharing caregiver questions between two devices without a database, using Upstash Redis with an in-memory fallback. Keeping the AI honest. Provider models get retired, so failed calls log a safe one-line reason (never the text), and the app falls back to built-in phrases.

Accomplishments that we're proud of

A patient can go from nothing to "I need help" on a caregiver's phone with only their eyes. It works with no install and no special hardware: any phone or laptop camera. The camera video never leaves the device. 4 specs, every task done, plus unit tests for the timing rules, the APIs and the accessibility rules.

What we learned

Writing EARS acceptance criteria up front ("WHEN the eyes stay closed for 3 s THE SYSTEM SHALL send one alert") made edge cases visible before we wrote code. Steering docs are a cheap way to keep an AI agent consistent across many sessions. In accessibility, predictable beats clever.

What's next for Dot-Dash

Testing with speech therapists and ICU nurses. More languages, and a custom phrase list for each patient. An offline PWA, and WhatsApp/SMS alerts alongside Telegram. A head-tilt or eyebrow input for people who cannot blink reliably. Dot-Dash is an assistive communication tool, not a medical device. Keep another way to call for help nearby.

Built With

  • google-gemini
  • groq
  • kiro
  • mediapipe
  • node.js
  • react
  • serverless
  • tailwindcss
  • telegram-bot-api
  • typescript
  • upstash-redis
  • vercel
  • vite
  • web-speech-api
  • webassembly
Share this project:

Updates

Submission history