Journal Entry · 2026.08.30 1 min read
← All journal entries

1 min read

Keeping Michi journal entries on the device

I use Vue and Capacitor to share the interface between web and Android, with storage for each platform.

I built Michi as a daily reflection app that keeps user entries on the user's device. Many wellness apps push private journals into cloud accounts. I made local storage a hard requirement from day one.

The Local-First Pattern

Local-first apps treat your device as the primary database. You can open Michi offline, skip account creation, and keep journal entries off remote servers.

Dual-Target Persistence

To share one Vue 3 interface across web previews and an Android APK, I wrote a small storage adapter:

export async function getStorageDriver() {
  if (Capacitor.isNativePlatform()) {
    return new SQLiteDriver('michi_vault.db');
  }
  return new LocalStorageDriver('michi_vault');
}

On Android, Capacitor writes to a SQLite database on the phone filesystem. In the browser, the app uses reactive local storage.

Simpler Architecture

Dropping server sync cut out WebSocket plumbing, conflict resolution code, and database hosting bills for user journals. Keeping data local protected privacy and kept the codebase small.

Mark Ocampos
Independent web engineer
Have a project in mind?
Send me a message.