second-beat

Second Beat

When their heart stops, yours keeps the time.

A 110-beat Hands-Only CPR coach and the official map of registered AEDs across New York City.

A zero-backend static web app for GenHacks 2026, Healthcare & Environmental track. It runs entirely in the browser, with no API keys and no accounts.

Live demo (after GitHub Pages): https://mogzz2008.github.io/second-beat/

What it does

Second Beat is practice and public education. It is not a CPR certification, not medical advice, and not a live cabinet-status feed. In a real emergency, call 911 first and follow the dispatcher. Take a certified course when you can, starting at cpr.heart.org.

Why it exists

The American Heart Association reports about 350,000 out-of-hospital cardiac arrests in the United States each year, and about 90% of the people who have one do not survive. Immediate CPR can double or triple the chance of survival. Only about 4 in 10 receive bystander CPR before EMS arrives, and about 10% have a bystander apply an AED.

Most of those arrests happen at home, where a cabinet may be closed or far. The beat is what you always have.

Data (all public, bundled for offline use)

Source What we use
NYC Automated External Defibrillator (AED) Inventory (2er2-jqsx), NYC Department of Health and Mental Hygiene / NYC REMSCO, published under Local Law 91 of 2023 Official registered cabinet locations, floors, types, and counts. Publisher last updated the rows on 15 July 2026. Retrieved 27 November 2026. One inventory row (GQG Partners) had no address and was dropped.
Borough Boundaries (gthc-hcne) A simplified five-borough base map
U.S. Census Bureau 2020 Gazetteer Files, ZCTA national ZIP code centroids, including Elmhurst 11373

The built site has 4,002 places and a summed official cabinet count of 11,180. This registry is not complete — reviewers have noted that many MTA stations are missing — and it is not a live “this cabinet works right now” feed. Confirm on-site signage.

Public Hands-Only CPR and AED guidance is cited from the American Heart Association’s public materials. New York State Education Law § 917 (AEDs in instructional school facilities) and Public Health Law §§ 3000-a and 3000-b (Good Samaritan / Public Access Defibrillation) are linked from the app and are not legal advice.

Run npm run data to rebuild public/data/ from data-raw/.

Run it locally

npm install
npm run data        # rebuild from the official extracts
npm test            # unit + data tests
npm run lint        # ESLint, zero warnings
npm run serve       # http://127.0.0.1:8170
npm run qa:browser  # headless Chrome, desktop + tablet + mobile
npm run screens     # write docs/screenshots
npm run check       # lint + test + browser QA

No build step and no runtime dependencies. The site is plain HTML, CSS, and ES modules, ready for GitHub Pages from public/ (see .github/workflows/pages.yml).

Quality

License

MIT. Official AED and borough data remain the work of the City of New York. Census Gazetteer files remain the work of the U.S. Census Bureau. American Heart Association public guidance is cited, not reproduced as a dataset.