<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: niluved</title>
    <description>The latest articles on DEV Community by niluved (@niluved).</description>
    <link>https://dev.to/niluved</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3994283%2Fe5bd6244-a3b1-44ad-9235-e715272215f7.png</url>
      <title>DEV Community: niluved</title>
      <link>https://dev.to/niluved</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/niluved"/>
    <language>en</language>
    <item>
      <title>What I learned building a local-first password manager with Flutter</title>
      <dc:creator>niluved</dc:creator>
      <pubDate>Sat, 20 Jun 2026 17:19:06 +0000</pubDate>
      <link>https://dev.to/niluved/what-i-learned-building-a-local-first-password-manager-with-flutter-3ddg</link>
      <guid>https://dev.to/niluved/what-i-learned-building-a-local-first-password-manager-with-flutter-3ddg</guid>
      <description>&lt;p&gt;I used to keep my passwords in a password-protected, zipped Word document. Stored locally on my PC, with a backup copy on a USB drive.&lt;/p&gt;

&lt;p&gt;Every password update required opening the file, entering the master password, editing the entry, syncing the change to the USB backup manually. Repeat.&lt;/p&gt;

&lt;p&gt;On my phone? Even worse. I had to boot up the PC, unzip, search, update, re-sync — every single time.&lt;/p&gt;

&lt;p&gt;That system worked… until it didn't. I realized I was one hardware failure away from locking myself out of everything. I needed a mobile solution, but with one non-negotiable constraint: &lt;strong&gt;my passwords were never leaving my device&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So I built Keyri.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Play Store:&lt;/strong&gt; &lt;a href="https://play.google.com/store/apps/details?id=com.nick.applab.silentsaver" rel="noopener noreferrer"&gt;https://play.google.com/store/apps/details?id=com.nick.applab.silentsaver&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Flutter&lt;/strong&gt; (cross-platform UI, single codebase)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChaCha20&lt;/strong&gt; for on-device encryption&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google ML Kit&lt;/strong&gt; for on-device QR/barcode scanning (optional)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HaveIBeenPwned&lt;/strong&gt; API with k-anonymity for breach checks (optional)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XposedOrNot&lt;/strong&gt; API for account breach details (optional)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brandfetch&lt;/strong&gt; API for real logo icons (optional)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Drive&lt;/strong&gt; integration for storing encrypted data (optional)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The constraints that shaped every decision
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;No cloud = no server = no trust required.&lt;/strong&gt; That wasn't a feature list — it was the starting point. Every technical choice follows from it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Encrypting images on-device
&lt;/h3&gt;

&lt;p&gt;I wanted users to store sensitive images (IDs, receipts) inside the vault. Images are compressed on-device, encrypted with ChaCha20, and stored in the app sandbox. The decryption key never leaves the device memory unencrypted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Breach checks without exposing passwords
&lt;/h3&gt;

&lt;p&gt;I integrated HaveIBeenPwned, but with a hard constraint: the actual password never leaves the device. The solution is k-anonymity — only the first 5 characters of the SHA-1 hash are sent. The server returns a list of matching hash suffixes, and the match is checked locally (standard approach)&lt;/p&gt;

&lt;h3&gt;
  
  
  Flexible CSV import
&lt;/h3&gt;

&lt;p&gt;I recently rewrote the importer to auto-detect the 5 main credential fields (username, password, URL, title, notes) regardless of column order or naming. It now accepts a wide variety of CSV structures without requiring the user to manually map columns.&lt;/p&gt;

&lt;h3&gt;
  
  
  One-click autofill via Android's native framework
&lt;/h3&gt;

&lt;p&gt;I wanted logging into websites to feel frictionless — ideally one tap from the browser, no copy-paste. The cleanest way is Android's Autofill Framework, but Flutter doesn't expose it directly.&lt;/p&gt;

&lt;p&gt;To make Keyri participate in the system autofill service, I had to drop down to native Android code. I wrote a Kotlin service that integrates with the Autofill API and communicates with the Flutter side via &lt;strong&gt;method channels&lt;/strong&gt;. I didn't know Kotlin before this project — I learned it specifically to implement this feature, with a lot of help from Copilot along the way tbh ;)&lt;/p&gt;

&lt;p&gt;The result: Keyri appears as an option in Android's autofill picker, and credentials fill in-app and in browsers with a couple of taps. All parsing of the target app/website structure happens on-device; nothing is transmitted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Google Drive backup — still local-first
&lt;/h3&gt;

&lt;p&gt;I just rolled out optional Google Drive backup. The challenge was keeping the local-first philosophy intact.&lt;/p&gt;

&lt;p&gt;The solution: data is encrypted on-device &lt;em&gt;before&lt;/em&gt; upload. The backup file is useless without the app's master key, which never leaves the device unencrypted. Even if Google wanted to hand over the file, it would be encrypted gibberish without the user's credentials.&lt;/p&gt;

&lt;p&gt;No account is created. The Drive integration uses the user's existing Google account via OAuth.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Keyri does today
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local-first vault&lt;/strong&gt;: passwords, cards, barcodes/QR codes, encrypted images&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Biometric unlock&lt;/strong&gt; (fingerprint/face)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Android Autofill integration&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local breach checks&lt;/strong&gt; (k-anonymity, no data sent)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encrypted backups&lt;/strong&gt; (Google Drive optional)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible CSV import&lt;/strong&gt; from any major password manager&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zero ads, zero tracking, zero accounts required&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A few questions (no trust required)
&lt;/h2&gt;

&lt;p&gt;I'm aware that a closed-source password manager from a solo dev isn't the easiest sell in the privacy community. I'm not here to ask for your trust — I built this to fix my own Word-document disaster, and I'm sharing it in case you're in the same boat.&lt;/p&gt;

&lt;p&gt;If you're willing to evaluate it on its own merits (or just curious about the build), I'd love to hear some feedback. &lt;br&gt;
What's the one feature that would make this actually usable for you? What's the one thing that would make you walk away?&lt;/p&gt;

&lt;p&gt;Thanks for reading so far!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>sideprojects</category>
      <category>privacy</category>
    </item>
    <item>
      <title>My homescreen was chaos. Not anymore.</title>
      <dc:creator>niluved</dc:creator>
      <pubDate>Sat, 20 Jun 2026 16:22:11 +0000</pubDate>
      <link>https://dev.to/niluved/my-homescreen-was-chaos-not-anymore-5a8m</link>
      <guid>https://dev.to/niluved/my-homescreen-was-chaos-not-anymore-5a8m</guid>
      <description>&lt;h2&gt;
  
  
  I built an Android widget that learns your app habits — without sending anything to a server
&lt;/h2&gt;

&lt;p&gt;I had a problem. My home screen was organized chaos: folders for Work, Music, Streaming, Chat, Hobbies. Every evening I’d open the same three folders in the same order just to launch the same handful of apps. I wasn't finding apps — I was repeating a ritual.&lt;/p&gt;

&lt;p&gt;My phone already knows what I do and when I do it — it just never puts that knowledge to use. So I built Habits to teach it to repeat what it has already seen.&lt;/p&gt;




&lt;h2&gt;
  
  
  The constraint: Android only remembers a few days
&lt;/h2&gt;

&lt;p&gt;The predictive feature needs the &lt;strong&gt;Usage Access permission&lt;/strong&gt;. The problem? Android only retains raw usage history for a few days by default. After that, the data is gone.&lt;/p&gt;

&lt;p&gt;I needed enough history to recognize actual patterns — not just what I opened yesterday, but what I open at 8 AM on a typical Tuesday. That requires &lt;strong&gt;weeks of accumulated history&lt;/strong&gt;, and Android doesn’t give you that out of the box.&lt;/p&gt;

&lt;p&gt;I also wasn't willing to ship app usage logs to a backend. This widget was going to be smart, but only if it could be smart without touching a server.&lt;/p&gt;




&lt;h2&gt;
  
  
  How it works under the hood
&lt;/h2&gt;

&lt;p&gt;Habits accumulates usage history &lt;em&gt;on the device&lt;/em&gt; — timestamps, durations, which apps — storing it for long enough to smooth out noise and detect recurring patterns. A statistical model then correlates the current time slot with past behavior to assign relevance scores to installed apps.&lt;/p&gt;

&lt;p&gt;The model balances two signals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Long-term habits&lt;/strong&gt; (default weight: 75%): apps you tend to use at this time of day over the past weeks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short-term context&lt;/strong&gt; (default weight: 25%): apps you opened in the last few minutes, which suggest what you’re about to do next&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can adjust the relative weight of each factor in settings, so the widget adapts to how predictable your routine actually is.&lt;/p&gt;




&lt;h2&gt;
  
  
  What the widget actually does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Surfaces apps contextually&lt;/strong&gt;: morning coffee → news apps, Friday evening → streaming and music&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customizable grid&lt;/strong&gt; (columns/rows) directly in widget settings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monochromatic icon support&lt;/strong&gt; natively — no third-party icon packs needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Material You&lt;/strong&gt; dynamic colors, custom backgrounds, adjustable icon sizes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pin/exclude apps&lt;/strong&gt;: keep essentials always visible, hide outliers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full icon pack support&lt;/strong&gt; if that's your setup&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Export/import your history&lt;/strong&gt;: the usage database can be exported and re-imported on a new device — your model follows you, no lock-in&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The honest version (the stuff I'd want to know before installing)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Usage Access is required&lt;/strong&gt; — the core feature doesn't work without it. The app prompts for it on first launch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No accounts, no IAP, no ads&lt;/strong&gt; — but also no cloud sync, no server fallback.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No magic&lt;/strong&gt;: the predictions are based on patterns in your own history. If your habits are genuinely unpredictable (shift worker? seasonal routine?), the widget won't help much.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Kotlin&lt;/strong&gt;, native Android&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jetpack Compose&lt;/strong&gt; + &lt;strong&gt;Glance widget&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Apache Commons Math for the statistical model&lt;/li&gt;
&lt;li&gt;Local DataStore for historical usage accumulation&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Feedback wanted
&lt;/h2&gt;

&lt;p&gt;This is my first attempt at on-device predictive UX. Two things I'm actively grappling with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model scope vs. accuracy&lt;/strong&gt;: I'm deliberately keeping the model narrow (time-based patterns) to avoid permission sprawl. I'd love to hear from others who've tried adding signals like location or calendar overlap — what worked, what broke the battery.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Detecting "out of pattern" periods&lt;/strong&gt;: The model learns habits, but habits break. Vacations, travel, sick days — how do you signal to an on-device model that "this week is different" without adding heavy heuristics or extra permissions? I'm wary of turning this into a full scheduling system, but ignoring those periods makes predictions worse for a chunk of the year.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'd love to hear from other Android devs — especially anyone who's hit the Android usage history wall or tried on-device prediction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Play Store:&lt;/strong&gt; &lt;a href="https://play.google.com/store/apps/details?id=com.nick.applab.habits" rel="noopener noreferrer"&gt;https://play.google.com/store/apps/details?id=com.nick.applab.habits&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>productivity</category>
      <category>privacy</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
