Jayden Lim
mobile

DoomGuard

Android distraction-blocker gated behind a daily habit

May 2026

DoomGuard
DoomGuard

DoomGuard

An Android distraction-blocker with a configurable daily-habit gate.

DoomGuard sits between a user and the apps that steal their attention. A custom Kotlin Expo module runs a foreground service that polls Android's UsageStatsManager.queryEvents() to detect the current foreground app; when a user-configured blocked app launches while today's habit is incomplete, a full-screen SYSTEM_ALERT_WINDOW overlay drops in over the offending app and routes the user back into DoomGuard. The same gate state controls an embedded WebView — Instagram is rendered locked to DMs only until the habit clears, then unlocks to the full feed with Reels and Explore surgically removed via injected JS.

The habit DoomGuard ships with is daily Bible reading: an adaptive plan generator splits the 31,102-verse canon across however many days the user picks (balancing daily volume by per-chapter word count, not chapter count); NIV, ESV, and NKJV are bundled as JSON for offline reading; an optional BYO-key AI assistant (Anthropic, OpenAI, or Gemini) provides streaming chat and study commentary with tap-to-jump verse citations. The architecture is habit-agnostic — Bible reading is the example, not the thesis.

Built solo in TypeScript on Expo with a custom Kotlin Expo module, a patch-package'd native WebView, and no backend (all state is on-device in AsyncStorage).

Features

  • Two-mode Instagram WebView — locked to DMs before today's reading, full feed (Reels/Explore stripped) after. The header Instagram uses to fingerprint embedded browsers is removed via a patch-package patch to react-native-webview.
  • Native app blocker — a Kotlin foreground service polls UsageStatsManager every second and drops a full-screen overlay when a blocked app opens before the habit is done. Survives reboot via a BOOT_COMPLETED receiver.
  • Dynamic reading plans — verse-count-balanced plans across N days, with On track, Catching up (parallel expedited plan), and Just read modes.
  • Multi-provider AI study assistant (optional, BYO key) — Anthropic, OpenAI, or Gemini; key never leaves the device. Study Notes on any chapter + a full Bible Chat with streaming responses and tap-through verse citations.
  • Offline Bible — NIV/ESV/NKJV bundled as JSON; other public-domain translations fetched on demand and cached.
  • Streak tracking, partial-chapter progress, mid-day reset hour, red-letter words of Jesus, Noto Serif typesetting.

Architecture

A small domain layer that screens, hooks, and services depend on but never bypass. The UI flows through a service factory returning singletons; cross-component sync uses a lightweight module-level listener pattern with AsyncStorage persistence instead of Context.

Tech Stack

Expo SDK 55 (prebuild) · React Native 0.83 · React 19 · TypeScript (strict) · custom Expo Module in Kotlin · react-native-webview + patch-package · AsyncStorage · Jest. Android only — iOS has no equivalent to UsageStatsManager.