<?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: Mert</title>
    <description>The latest articles on DEV Community by Mert (@mertozer).</description>
    <link>https://dev.to/mertozer</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%2F4270320%2F079dba3e-cf63-461f-a636-f8d028e088dd.png</url>
      <title>DEV Community: Mert</title>
      <link>https://dev.to/mertozer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mertozer"/>
    <language>en</language>
    <item>
      <title>I built a workout tracker that makes zero network requests. Here's what that changes</title>
      <dc:creator>Mert</dc:creator>
      <pubDate>Mon, 30 Nov 2026 13:20:05 +0000</pubDate>
      <link>https://dev.to/mertozer/i-built-a-workout-tracker-that-makes-zero-network-requests-heres-what-that-changes-186k</link>
      <guid>https://dev.to/mertozer/i-built-a-workout-tracker-that-makes-zero-network-requests-heres-what-that-changes-186k</guid>
      <description>&lt;p&gt;Most apps phone home. Analytics, crash reporting, feature flags, remote images. When I started Archetype, a free workout tracker for Android, I decided it would make no network requests at all. It's on Google Play since 28 October like that. This is what it changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Data safety form was one answer
&lt;/h2&gt;

&lt;p&gt;Google Play asks every developer what data the app collects and shares. Nothing leaves the phone, so the answer is "No data collected". No SDKs to check, no fine print.&lt;/p&gt;

&lt;h2&gt;
  
  
  You lose your eyes
&lt;/h2&gt;

&lt;p&gt;Without crash reporting I don't see a crash on someone's phone unless they tell me. What I do instead&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Play Console's Android vitals still shows crash and ANR rates. Android collects those, not the app.&lt;/li&gt;
&lt;li&gt;Profile has a Help and support row that opens an email to me.&lt;/li&gt;
&lt;li&gt;Tests matter more. There are about 300 test files (Jest and React Native Testing Library), and before a change ships I go through a written checklist on my own phone.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Everything lives in SQLite
&lt;/h2&gt;

&lt;p&gt;Workouts, sets, measurements and settings are in SQLite on the phone (expo-sqlite). This was fine until I imported a long history. With 763 workouts, every screen read the whole history again, around 20,700 rows each time, and it took up to a second on the phone.&lt;/p&gt;

&lt;p&gt;So the finished history is now kept in memory, and every write that can change it drops the copy instead of patching it. The next read loads it again, so the copy can't disagree with the tables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CachedSessionRepository&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nc"&gt;SessionRepository&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;SessionWithSets&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// Bumped by every history write, so a read that started before it is not kept.&lt;/span&gt;
  &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The one rule that comes with it is that nothing writes session or set rows outside the repository. Raw SQL anywhere else would leave the copy stale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting data in and out without a server
&lt;/h2&gt;

&lt;p&gt;Import. Strong, Hevy and StrongLifts each export a CSV, and each has its own idea of a date. Strong writes "2019-10-14 13:32:50". Hevy's app writes "14 Oct 2019, 13:32" but the month word is in the phone's language, and Hevy's website writes "Oct 14, 2019, 1:32 PM" or a numeric form. So there is one small parser per shape, and the month word goes through a table of translated months.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Hevy: the app's "d MMM yyyy, HH:mm" with a translated month word, the web's&lt;/span&gt;
&lt;span class="c1"&gt;// English "MMM d, yyyy, h:mm AM", or the web's numeric forms.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;/^&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;$&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;None of the apps writes a timezone, so everything is kept as wall clock time.&lt;/p&gt;

&lt;p&gt;Export. A full JSON backup through the share sheet, and a plain text Coach report. The Coach report can stay up to date in a folder you pick once with Android's Storage Access Framework, Google Drive included, so it syncs without the app touching the network. SAF writes don't truncate, so each write deletes the old file and creates a new one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Notifications without a push server
&lt;/h2&gt;

&lt;p&gt;The rest timer has to alert when the phone is locked. A scheduled local notification on a high importance channel does it, no push service. The permission is asked the first time a rest starts, not on first launch.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost is 157 MB
&lt;/h2&gt;

&lt;p&gt;1,500+ exercises with how-to steps and about 1,300 animated demos, all in the app so it works offline. That's most of the download. I picked offline over size.&lt;/p&gt;

&lt;h2&gt;
  
  
  Would I do it again ?
&lt;/h2&gt;

&lt;p&gt;Yes. The hardest part was giving up the dashboards. What I got back is an app I can describe in one sentence, nothing leaves your phone unless you send it.&lt;/p&gt;

&lt;p&gt;If you want to try it, it's free with no ads and no account. &lt;a href="https://play.google.com/store/apps/details?id=app.archetypefitness&amp;amp;referrer=utm_source%3Ddevto%26utm_campaign%3Darticle" rel="noopener noreferrer"&gt;https://play.google.com/store/apps/details?id=app.archetypefitness&amp;amp;referrer=utm_source%3Ddevto%26utm_campaign%3Darticle&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>reactnative</category>
      <category>android</category>
      <category>expo</category>
    </item>
  </channel>
</rss>
