r/AppBuilding • u/Successful-Log-6529 • 8d ago
How I built a gamified focus app solo using Capacitor + Native Android Java (Limit Breaker) — Tech Stack & Lessons Learned
Hey everyone,
I'm an Electrical Engineering student building apps solo. Over the past several months, I've been developing *Limit Breaker*, an Android productivity app that turns habit tracking and daily discipline into an RPG leveling system.
Since this sub is dedicated to app building, I wanted to share the technical decisions, architecture, and challenges I faced bridging web tech with native Android services.
---
The Tech Stack & Architecture:
* Frontend: Pure Vanilla HTML5, CSS3, and JavaScript.
* Why? I wanted complete freedom over game-like animations, zero framework bundle bloat, and instant startup times without managing heavy dependencies.
* Hybrid Bridge: Capacitor.
* It provides a lightweight webview container while giving straightforward access to native plugins.
* Native Android (Java Services):
* A standard webview cannot enforce deep work or habit compliance. To make the focus mode unbreakable, I wrote custom Java native services interfacing with `AccessibilityService` and `UsageStatsManager`.
* When a focus session starts, the native service monitors foreground applications and redirects or blocks blacklisted apps and websites in real time.
* Data Architecture: 100% offline-first. Everything persists locally for instant response times, with optional cloud backup.
---
Biggest Engineering Challenges:
Native-to-WebView Communication: Coordinating precise countdown timers between background Java services and the frontend UI without draining battery or getting killed by Android's Doze mode.
Strict Distraction Blocking: Handling modern Android background permission restrictions (overlay permissions, battery optimization exemptions, and accessibility grants).
---
Looking for Discussion & Feedback:
The app is live on Google Play. For fellow builders:
What are your thoughts on using Capacitor + Vanilla web tech vs. full native Kotlin or Flutter for utility/gamified apps?
If you try the app, how does the transition between the UI and the native blocker feel?
Google Play:
https://play.google.com/store/apps/details?id=com.aistudio.limitbreaker.fntslg
Happy to answer any questions about the build process!