My dog is eleven now. Over the past two years his daily routine has slowly turned into a small pharmacy: a joint supplement in the morning, a heart pill twice a day, eye drops every eight hours during a flare-up, and an antibiotic course layered on top whenever something flares. If you have ever cared for a senior pet, you know exactly the feeling: standing in the kitchen at 7am holding a pill, genuinely unsure whether you already gave it.
That uncertainty is dangerous. Double-dosing a heart or pain medication is not a small mistake, and missing a dose can undo weeks of treatment. So like a lot of developers, I tried to solve my own problem with code. This post is the story of what I built, why I made the technical choices I did, and a few practical tips that helped me stop missing doses. (Standard disclaimer up front: I am a developer, not a vet. Nothing here is medical advice. Always follow your veterinarian's dosing instructions.)
The problem with the tools I tried first
My first instinct was a phone reminder. It works until it doesn't. A reminder tells you "it is time," but it does not record whether you actually did the thing. I would swipe the notification away while my hands were full, then forget five minutes later if I had followed through.
Next I tried a couple of pet-care apps. Two things pushed me away. First, almost every one wanted an account before I could log a single pill, which is a lot of friction at 7am. Second, several gated the genuinely useful parts, like exporting a history, behind a subscription. For a feature that is really just "write a row to a list and let me read it back," that felt heavy.
So I wrote down the requirements I actually cared about:
- No account. I should be able to open it and log a dose in under five seconds.
- Works offline. Phone reception in my vet's basement exam room is terrible, and I want my history right there.
- My data stays mine. A medication log is sensitive. It should live on my device, not on someone else's server by default.
- A clean history I can hand to the vet. Ideally something I can show or print at an appointment.
- Free. This is a personal utility, not a business.
How I built it
The whole thing is a small client-side web app. No backend, no sign-up, no analytics tracking who you are. Here is the shape of it.
Storage is local. Everything is persisted with the browser's built-in storage, so each log entry stays on the device that created it. There is no server round-trip to record a dose, which is why it works even with the phone in airplane mode. The trade-off is honest and worth stating: because there is no account, your history is tied to that browser. I lean on the export feature (more below) as the backup mechanism rather than a cloud sync I would have to secure and maintain.
A minimal version of the logging core looks like this:
const KEY = "pet-med-log";
function loadLog() {
try {
return JSON.parse(localStorage.getItem(KEY)) || [];
} catch {
return [];
}
}
function logDose(petName, medication, dose) {
const entries = loadLog();
entries.push({
pet: petName,
medication,
dose,
at: new Date().toISOString(),
});
localStorage.setItem(KEY, JSON.stringify(entries));
return entries;
}
function dosesToday(medication) {
const today = new Date().toDateString();
return loadLog().filter(
(e) => e.medication === medication && new Date(e.at).toDateString() === today
);
}
That dosesToday helper is the part that actually solves my 7am panic. Before I give a pill, the app shows me what has already been logged today for that exact medication. The question "did I already give this?" becomes a glance instead of a guess.
Timestamps are stored in ISO format and rendered locally. Storing toISOString() keeps entries unambiguous, and I format them for display only when reading them back. This avoids a whole category of off-by-one-day bugs that show up when you store pre-formatted date strings.
The PDF export is plain HTML and the browser's print dialog. I resisted pulling in a heavy PDF library. Instead, the history view is just a clean, print-styled table, and "export" opens the native print-to-PDF flow. It is less code, it works on every platform, and the output is something a vet can read at a glance.
Practical tips that cut my missed doses to roughly zero
The tool helps, but the habits around it matter just as much. These are the things that actually moved the needle for me:
- Log the dose at the moment you give it, not "later." "Later" is where the data goes to die. The five-second log is the whole point.
- Use one consistent medication name. "Heart pill" and "vetmedin" being two different rows in your history is a mess. Pick one label per medication and stick to it so the per-day count is accurate.
- Tie dosing to an existing anchor in your day. Morning meds ride along with the coffee; evening meds ride along with dinner. Habit-stacking onto something you already never skip is more reliable than a standalone alarm.
- Bring the full history to every vet visit. Your vet can spot patterns you cannot, like a flare-up that lines up with a missed dose. A printed log turns "I think it has been about a week" into an actual timeline.
- Keep a written backup of the schedule itself, separate from the log. The app records what you did; a simple note on the fridge records what you are supposed to do. Two layers catch more mistakes than one.
- When a medication ends, archive rather than delete. Past courses are useful context for your vet. Keeping the record is cheap and occasionally important.
What I would tell another developer building something similar
The temptation with a personal tool is to over-engineer it: add accounts, add sync, add a database, add a framework. For this problem, every one of those additions would have made it slower to open and harder to trust. The constraint that made it good was deciding up front that the data lives on the device and the app does the smallest possible thing well.
If you are caring for a senior pet and want to try it, I put the tool up here, free, no account required:
It is offline-first, there is nothing to sign up for, and your log stays on your device. And to repeat the one thing that matters most: this is a logging aid, not medical guidance. Your veterinarian sets the schedule. The tool just helps you stick to it.
If you build something in this space, I would genuinely love to hear how you handled local storage and export. Drop a note in the comments.
Top comments (0)