<?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: Jeremia Fourie</title>
    <description>The latest articles on DEV Community by Jeremia Fourie (@jeremiafourie).</description>
    <link>https://dev.to/jeremiafourie</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%2F4032706%2F1308c6d5-989f-4b75-9f76-a111e34defb7.jpg</url>
      <title>DEV Community: Jeremia Fourie</title>
      <link>https://dev.to/jeremiafourie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeremiafourie"/>
    <language>en</language>
    <item>
      <title>Offline-first isn't a feature, it's an architecture</title>
      <dc:creator>Jeremia Fourie</dc:creator>
      <pubDate>Fri, 27 Nov 2026 00:52:23 +0000</pubDate>
      <link>https://dev.to/jeremiafourie/offline-first-isnt-a-feature-its-an-architecture-598d</link>
      <guid>https://dev.to/jeremiafourie/offline-first-isnt-a-feature-its-an-architecture-598d</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://jeremiafourie.tech/blog/offline-first-android-sync/" rel="noopener noreferrer"&gt;jeremiafourie.tech&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most apps treat a dropped connection as an error to recover from. The one I build can't. Its users are field technicians on roofs, in ceilings and in parts of South Africa where mobile signal simply stops existing, so "saved" has to be true before the network is even asked.&lt;/p&gt;

&lt;p&gt;The app is &lt;a href="https://exequtech.com/exequ-jobs" rel="noopener noreferrer"&gt;Exequ-Jobs&lt;/a&gt;, the technician app for our field-service platform at Exequtech. I built it AI-assisted (Claude Code typing, me deciding and reviewing), and one decision shaped everything else: &lt;strong&gt;the local database is the source of truth, and the cloud is something we synchronize with when we can.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Local write, then queue
&lt;/h2&gt;

&lt;p&gt;Every mutation in the app — completing a job card, capturing a photo, logging a trip — commits to the local store first and succeeds immediately. Alongside the domain write, a pending operation lands in a queue table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;write → Room (SQLCipher-encrypted) → PendingOperationEntity → done (UI updates)
                                            ↓ later, when network is healthy
                              SyncOrchestratorWorker drains the queue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The user never waits on the network, because the network isn't part of the write path at all. WorkManager workers drain the queue when connectivity returns, download newly assigned jobs, and reconcile cloud state in a three-phase merge transaction — apply remote, replay local, resolve conflicts by domain rules rather than timestamps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Photos are their own problem
&lt;/h2&gt;

&lt;p&gt;A job's photos and receipts can be tens of megabytes captured in a dead zone. Uploading them through the API server would double the transfer and tie up the backend, so the app requests &lt;strong&gt;presigned S3 URLs&lt;/strong&gt; and uploads directly. The subtle failure mode: an upload that dies halfway leaves a database row pointing at an object that never arrived. The photo worker therefore heals orphans — on every run it re-verifies rows against storage and re-enqueues what's missing. Self-healing beats never-failing; never-failing isn't on the menu in a basement.&lt;/p&gt;

&lt;h2&gt;
  
  
  One binary, many tenants
&lt;/h2&gt;

&lt;p&gt;The platform is multi-tenant, and technicians can work for more than one company. Login flows through our central console, which issues short-lived tenant JWTs; a single OkHttp interceptor then retargets every request — Apollo GraphQL and REST alike — to the selected tenant at runtime:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;intercept&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Interceptor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Chain&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Response&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;tenantUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cloudTokenManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTenantUrl&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="nc"&gt;BuildConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;API_BASE_URL&lt;/span&gt;
    &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;targetUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tenantUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toHttpUrlOrNull&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="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;proceed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&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="kd"&gt;val&lt;/span&gt; &lt;span class="n"&gt;newUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&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;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;newBuilder&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="nf"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;targetUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scheme&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;host&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;targetUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;port&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;targetUrl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;proceed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;chain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;request&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="nf"&gt;newBuilder&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="nf"&gt;url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newUrl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No client rebuilds, no app restarts, no per-tenant APKs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boring choices that paid off
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Room with &lt;code&gt;exportSchema&lt;/code&gt; on&lt;/strong&gt;, schema JSON committed: every migration is reviewable in a PR and covered by an instrumentation test before it ever meets a technician's data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLCipher&lt;/strong&gt; at rest, because the device carries customer names, addresses and signatures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UUIDv7 everywhere&lt;/strong&gt;, so IDs generated offline sort correctly and never collide with the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server-sent events&lt;/strong&gt; for the reverse direction — job updates stream in and fan out into the local store, so two technicians on one job see each other's progress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Offline-first costs you: every feature is designed twice, once for the happy path and once for reconciliation. But the alternative is an app that lies — one that says "saved" while silently holding your work hostage until the bars come back. Field software has to be built for the basement.&lt;/p&gt;

&lt;p&gt;A note on how it's built, because I'd rather you hear it from me: a lot of the Kotlin in this app was typed by Claude Code under my direction. The architecture above, the decisions, the debugging at 22:00 when sync eats a photo — those are mine. The app doesn't care whose fingers typed it; the technicians care that it works with zero bars.&lt;/p&gt;




&lt;p&gt;The full case study — 66k lines, the three-phase merge, the lot: &lt;a href="https://jeremiafourie.tech/projects/exequ-jobs/" rel="noopener noreferrer"&gt;Exequ-Jobs&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>android</category>
      <category>kotlin</category>
      <category>architecture</category>
      <category>mobile</category>
    </item>
    <item>
      <title>How I use Claude Code without becoming its passenger</title>
      <dc:creator>Jeremia Fourie</dc:creator>
      <pubDate>Thu, 23 Jul 2026 23:24:26 +0000</pubDate>
      <link>https://dev.to/jeremiafourie/how-i-use-claude-code-without-becoming-its-passenger-63d</link>
      <guid>https://dev.to/jeremiafourie/how-i-use-claude-code-without-becoming-its-passenger-63d</guid>
      <description>&lt;p&gt;Let me say the honest thing first: an AI types a lot of the code I ship. The offline-first Android app our technicians use at &lt;a href="https://exequtech.com" rel="noopener noreferrer"&gt;Exequtech&lt;/a&gt;, parts of this website, migration scripts, test suites — Claude Code wrote much of it, in my terminal, under my eyes. I don't think that makes me less of an engineer. I think &lt;em&gt;how&lt;/em&gt; I do it is what decides that.&lt;/p&gt;

&lt;p&gt;A couple of years ago I made it my mission to learn to work with AI properly. Not because it was trendy — because we run a product with real users and a small team, and refusing the leverage would have been malpractice. What I didn't expect is how much actual skill the leverage demands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing the chaos
&lt;/h2&gt;

&lt;p&gt;Left alone, an agent produces plausible chaos. It will refactor things you didn't ask about, invent an API that almost exists, and write code that is — as most developers who use these tools will tell you — &lt;em&gt;almost&lt;/em&gt; right. Almost right is the expensive kind of wrong: it compiles, it demos, and it detonates three weeks later in a basement with zero signal.&lt;/p&gt;

&lt;p&gt;So the job becomes something like being a very hands-on tech lead for a very fast, very confident junior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Structure the problem before the prompt.&lt;/strong&gt; If I can't state the constraint precisely — "writes must succeed locally and enqueue; the queue drains when the network is healthy" — the agent can't hit it, and I've learned that failing to state it &lt;em&gt;is&lt;/em&gt; the signal I don't understand my own problem yet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Read the diffs.&lt;/strong&gt; Not skim: read. The day I stopped reading was the day a "small fix" quietly changed how sync conflicts resolved. Never again.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interrogate instead of accepting.&lt;/strong&gt; "Why &lt;code&gt;Dispatchers.IO&lt;/code&gt; here?" is a free lesson every single time. The agent is the fastest teacher I've ever had, but only if I make it explain itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Own the outcome.&lt;/strong&gt; When sync eats a photo at 22:00, no one asks the model what happened. They ask me. That accountability is the whole difference between using a tool and being its passenger.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The thing I didn't expect: I missed typing
&lt;/h2&gt;

&lt;p&gt;Somewhere along the way I noticed something uncomfortable. I was shipping more than ever, and coding less than ever — and I missed it. Worse, I could feel what atrophies when you only review: the finger-knowledge of a language, the instinct for what the standard library gives you, the ability to write the tricky function &lt;em&gt;yourself&lt;/em&gt; when the agent circles it.&lt;/p&gt;

&lt;p&gt;So I course-correct where I can: when a sprint allows it, I hand-write the piece myself and work the fundamentals properly. The honest version is that the systems often grow faster than the study time I can find — it's a pull I keep answering, not a routine I've mastered. Depth stays the goal; the pace decides how much of it I get each week.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools, not identities
&lt;/h2&gt;

&lt;p&gt;I don't call myself a Kotlin developer or a React developer, and I'm certainly not calling myself an AI whisperer. Languages, frameworks, agents — they're tools. The question that matters is always the same: &lt;em&gt;given this problem, this team, and what we can actually do, what's the best solution?&lt;/em&gt; Sometimes that's been no-code with a partner who knew the platform. Sometimes it's an agent on a short leash. And sometimes, when I can claim the time, it's me — typing.&lt;/p&gt;




&lt;p&gt;The proof this workflow holds up in production: &lt;a href="https://jeremiafourie.tech/projects/exequ-jobs/" rel="noopener noreferrer"&gt;Exequ-Jobs&lt;/a&gt; and &lt;a href="https://jeremiafourie.tech/projects/exequtech-os/" rel="noopener noreferrer"&gt;Exequtech OS&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
