I built an offline-first Flutter app for my wife, a home-visit physio in India
DEV Community

I built an offline-first Flutter app for my wife, a home-visit physio in India

My wife is a physiotherapist who treats patients at home, all over Pune. Each patient has their own fee and schedule, and pays at different times. All of it went into a notebook, and on busy days the notebook didn't get updated.

At month end nobody was sure which visits had happened or who still owed her. So I built her an app. It's called CareLog, a free visit and fee diary for physiotherapists in India who do home visits, and it's now live on Google Play.

This post is about the technical choices, because most of them came from one constraint: patient data never leaves the phone.

What the app does

  • Today's visits in order, one tap to call or open Google Maps
  • One tap to mark a visit done or skipped (with undo)
  • Per-patient fees and schedules (daily, alternate days, chosen weekdays)
  • Dues that add up per patient and turn red after 7 days
  • A PDF bill made on the phone, with a UPI QR code the family can scan
  • Earnings by week, month and year
  • English, Hindi and Marathi

Why no backend

Three reasons:

  • Privacy. Names, phone numbers and treatment notes of patients are sensitive. Not holding them is the simplest way to protect them.
  • Signal. Many visits happen in basements, lifts and old buildings. An app that needs the network fails exactly where it's used.
  • Cost. No servers means the app costs almost nothing to run, so it can be free with no paid plan.

The trade-off is that sync, backup and multi-device all become your problem, on the device.

The stack

  • Flutter for one codebase across the Android app and a web app (iPhone users add the web app to their home screen).
  • Drift on SQLite for the local database. Typed queries and migrations matter a lot when you can't fix data on a server.
  • The pdf package to make the bill on the device, including the UPI QR.
  • Riverpod for state.
  • Hindi and Marathi strings ship inside the app, so translation works offline too.

Backups without a server

With no cloud copy, a lost or broken phone would mean a lost practice. So:

  • The app writes an automatic copy on the phone every day and keeps the last 7.
  • A backup is a JSON file the user shares themselves, through the normal Android share sheet (Google Drive, WhatsApp, email). One file format works on both the phone and the web app, so you can move between them.
  • Import can add to or replace what's on the device.

Building for a non-technical, price-sensitive audience

  • Every core action is one tap. My wife's feedback was almost always "this takes one tap too many".
  • Money is shown as paid or due on every visit, not in a separate ledger screen.
  • The bill uses UPI, because that's how most families pay.

Shipping to Google Play

New personal developer accounts have to run a closed test with real testers before they can apply for production access. CareLog went through that, and it's now live for everyone.

Try it

If you've built an offline-first app, I'd love to hear how you handled backups and migrations. And if you know a physio who does home visits, please send it their way.

Originally published at carelog.live.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.