Urgent.News

What's breaking now, across thousands of outlets.

Tech

Architecting for Privacy: Why I Chose Local-Only SQLite Over Cloud Sync

It happened during a quiet afternoon in the local library. I was deep into a debugging session when my phone decided, at maximum volume, to play a notification chime that echoed off the high ceilings. Every head in the room turned toward me in unison. It wasn't just embarrassing; it was a total disruption of the collective flow. I had completely forgotten to silence my device after leaving a…

It was a quiet afternoon in the local library when the reporter was deep into a debugging session. Suddenly, the phone emitted a loud notification chime from maximum volume, echoing off the high ceilings. The room turned to look at him, causing a total disruption of collective focus. The reporter felt embarrassed and the sinking feeling of causing a disturbance in a place of quietude.

This experience led him to start building Muffle, an app focused on privacy. The problem with existing solutions is that they often require constant manual input to stay polite, are bloated with features, or demand intrusive permissions. Muffle would be an entirely local-only application, with all data stored on the user’s device using Room, an abstraction layer over SQLite.

This choice was a technical constraint, ensuring that sensitive data like geographical boundaries and time windows never left the user’s phone. The app is fully functional offline and survives reboots due to AlarmManager and WorkManager tasks rescheduled based on the local database state. However, if the user gets a new phone, they cannot simply log in and see their old routines.

The reporter spent weeks fighting with background location updates when paired with strict power-saving modes, resulting in the OS aggressively killing the process if it hadn’t seen activity in the foreground for a while. He also realized the importance of maintaining a privacy-first label by architecting for it and being careful with third-party libraries.

If starting over, he would implement a simple JSON export/import feature for data backup. The biggest takeaway is that constraints often lead to better software, simplifying the stack and removing security bugs.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 16 September →