DEV Community

Nicholas
Nicholas

Posted on

Pulse & Pressure

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

Pulse & Pressure is a private blood pressure and pulse log, built for my friends and family.

So I built something that fits how they already write readings down. They can type a note the way they'd jot it on their phone, like "128 over 82, pulse 71, after coffee", and a small open-weight AI model running on their own computer turns it into clean data. On days they just want to tap in three numbers, there's a quick-entry form with buttons for position (sitting, standing, lying down) and tags (medication taken, stressed, after exercise, caffeine).

Once a reading is saved, the app:

  • Labels it using the American Heart Association's general ranges, from Normal through Elevated, Stage 1, Stage 2 and Hypertensive crisis
  • Warns clearly if a reading lands in the crisis range (above 180/120), with what to do next: wait five minutes and measure again, and when to call 911
  • Shows a trend chart of systolic, diastolic and pulse over the last 20 readings
  • Keeps running averages for the last 7 days, the last 30 days and all time
  • Exports a CSV to bring to a doctor's appointment, and restores from that same file on a new phone

Demo

https://pulse-and-pressure.vercel.app/

Code

GitHub logo NicholasCloud4 / Pulse-and-Pressure

A private blood pressure and pulse log that keeps your readings on your own device, with trends, AHA categories and CSV export for your doctor.

Pulse and Pressure

A private blood pressure and pulse log, built for a friend. Log a reading with a quick form, or (when running on your own computer) type or dictate it the way you'd write a phone note ("128 over 82, pulse 71, after coffee") and a small open-weight model turns it into clean data.

Readings are saved only on the device you use, in that browser's storage. There's no account, no database server and no API bill, and health data is never sent anywhere.

Features

  • Two ways to log: a quick form (three numbers plus tap-to-pick position and tags) for everyday use, or a free-text note read by a local model (when running on your own computer with Ollama)
  • Position and tags: sitting / standing / lying down; medication taken stressed, after exercise, caffeine. The app remembers your usual position.
  • AHA categories: each reading is labeled using general…

How I Built It

The AI: llama3.2:3b running locally through Ollama. It runs on an ordinary PC with 11 GB of RAM, no GPU and no internet connection, and takes about 5–7 seconds per note.

Getting a 3B-parameter model to reliably read messy health notes took a few layers:

  1. Structured output. Ollama is given a JSON schema, so the model can only answer with a list of readings (systolic, diastolic, pulse, with null for anything missing). It never returns free-form text, and temperature is set to 0.
  2. Rules plus worked examples. The system prompt covers the traps, like "10/2" and "7am" are dates and times, not readings. Six worked examples show the model how to handle multiple readings in one note, spelled-out numbers, and notes with no reading at all. Small models follow examples much better than rules.
  3. A plain-code safety net. The model only reads the note and makes no medical decisions. Ordinary code checks whether values are believable (for example, systolic must be higher than diastolic) and assigns the AHA categories. The app always shows what the model read and asks you to confirm before anything is saved.
  4. Measuring instead of guessing. I wrote a test set of made-up notes with the correct answers, and kept a separate set of notes I never tuned against, to get an honest score

Why Does Open Innovation Matter?

Blood pressure readings are health data. With a closed AI API, every note my friend typed, numbers and context like "felt dizzy" or "forgot my meds", would be sent to a third-party server, tied to an API key, and billed per request.

Top comments (0)