<?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: Eyosias Negash</title>
    <description>The latest articles on DEV Community by Eyosias Negash (@eyosias_negash_8cbc103bb4).</description>
    <link>https://dev.to/eyosias_negash_8cbc103bb4</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%2F4213919%2F522e884c-a125-41ee-9f0f-634634762113.jpg</url>
      <title>DEV Community: Eyosias Negash</title>
      <link>https://dev.to/eyosias_negash_8cbc103bb4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eyosias_negash_8cbc103bb4"/>
    <language>en</language>
    <item>
      <title>The real backup</title>
      <dc:creator>Eyosias Negash</dc:creator>
      <pubDate>Mon, 16 Nov 2026 17:26:37 +0000</pubDate>
      <link>https://dev.to/eyosias_negash_8cbc103bb4/the-real-backup-i3h</link>
      <guid>https://dev.to/eyosias_negash_8cbc103bb4/the-real-backup-i3h</guid>
      <description>&lt;p&gt;&lt;em&gt;Last time: the app moved from a throwaway k3d cluster onto three machines at home. It had still never opened a backup my phone actually wrote. This chapter is the first time it did.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ivy Wallet+ writes its backups to Google Drive as zip files. Ivyk8 was looking for &lt;code&gt;.json&lt;/code&gt;. It now lists the zips newest first, lets the user pick one, and unzips it in &lt;code&gt;drive-sync-service&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The plan expected a real backup to break the schema. The schema passed on the first real backup it saw. What broke was the packaging: a name clash in the bundled server, and JSON written in UTF-16.&lt;/li&gt;
&lt;li&gt;Both failures have their own posts. This one covers the decisions: where unzipping belongs, what counts as a valid backup, and where the cache lives.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The goal: one real file, end to end
&lt;/h2&gt;

&lt;p&gt;Until Oct 6, the app had never opened a real backup. The tests ran on a small made-up one, and the analytics plan said so in its status table on Oct 2:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sanity check + golden test on a real backup: not started&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The same plan had a risk table, and one row guessed how the real file would hurt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Schema validation stricter than real backups (e.g. &lt;code&gt;format: uuid&lt;/code&gt; on optional ids). The 1h sanity check on a real backup will show this; relax the validator if needed.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That was a reasonable guess. Real data is usually messier than the schema that describes it. It was also wrong about where the trouble would be, and that is the story of this chapter.&lt;/p&gt;

&lt;h2&gt;
  
  
  A backup is a zip
&lt;/h2&gt;

&lt;p&gt;The first problem showed up before any parsing. drive-sync listed &lt;code&gt;.json&lt;/code&gt; files in the chosen Drive folder. Ivy Wallet+ writes zips, one per backup, each holding a single JSON file.&lt;/p&gt;

&lt;p&gt;So I asked for three things: list the zips, sort them newest first, and leave the choice of which one to open to the user. The newest backup is the default guess, not a decision the app makes for you.&lt;/p&gt;

&lt;p&gt;Claude Code read the code before changing it. The listing change was small: the Drive query now asks for zip files instead of JSON, still ordered by &lt;code&gt;modifiedTime desc&lt;/code&gt;. The third requirement needed no code at all. The backup page already rendered every file as a link, and "latest" was a badge on the first row, not an automatic selection. The agent said so instead of building a picker that already existed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part of the request I left out
&lt;/h2&gt;

&lt;p&gt;Then the agent flagged something I hadn't asked about. Listing zips was only half the change. When a user opened one, drive-sync downloaded the raw bytes and sent them to analytics labelled &lt;code&gt;application/json&lt;/code&gt;. Analytics would have run schema validation on a zip archive.&lt;/p&gt;

&lt;p&gt;It stopped and asked before widening the job: add an unzip step, or leave the pipeline alone for now? Its proposal was to unzip in drive-sync and leave analytics unchanged. I agreed.&lt;/p&gt;

&lt;p&gt;The boundary was already written down. The report route in drive-sync opens with a comment from the first week: &lt;em&gt;drive-sync owns "which bytes"; analytics owns "what they mean".&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A zip is a fact about how the phone stores the file in Drive. It says nothing about money. Unwrapping it is "which bytes", so it belongs in drive-sync. Analytics stays a service that accepts JSON and knows nothing about Drive, zips or phones, and none of its code or tests changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What counts as a valid backup
&lt;/h2&gt;

&lt;p&gt;The new module, &lt;code&gt;backupZip.ts&lt;/code&gt;, is 17 lines. It uses fflate, a small zip library with no dependencies of its own, and it is strict about the shape:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The bytes must be a zip.&lt;/strong&gt; Anything else is rejected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;There must be exactly one &lt;code&gt;.json&lt;/code&gt; entry.&lt;/strong&gt; Directory entries are skipped and the extension check ignores case. A zip with no JSON, or with two, is rejected rather than guessed at.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A rejection is &lt;code&gt;422 INVALID_BACKUP_ZIP&lt;/code&gt;, with a message that names the file. The status code is a choice. A 500 says the server broke, and a 404 says the file isn't there. 422 is the nearest standard code for "the request was fine, but the file it names can't be used". It points the user at the backup, not the app.&lt;/p&gt;

&lt;p&gt;Adding that code failed the typecheck before anything ran. Error codes are a closed union in the shared &lt;code&gt;packages/contracts&lt;/code&gt; package, and the new one wasn't in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/server.ts(110,66): error TS2345: Argument of type '"INVALID_BACKUP_ZIP"' is not
assignable to parameter of type '"BACKUP_TOO_LARGE" | "BAD_REQUEST" | … | "UNAUTHENTICATED"'.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the contracts package from two chapters ago doing its job. A service can't send an error code until it is declared where the dashboard can see it too.&lt;/p&gt;

&lt;p&gt;Four tests covered the new module, the existing fixtures became zip files, and the service's suite went from 16 tests to 20. All passed, and both drive-sync and the dashboard typechecked clean. The agent's summary ended: "Everything passes clean."&lt;/p&gt;

&lt;h2&gt;
  
  
  Green tests, dead container
&lt;/h2&gt;

&lt;p&gt;It did pass, and it wasn't enough. I deployed the new image and the drive-sync container died at startup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;///app/server.mjs:39140&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;createRequire&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s2"&gt;"module"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
         &lt;span class="o"&gt;^^^^^^^^^^^^^&lt;/span&gt;
&lt;span class="nc"&gt;SyntaxError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Identifier&lt;/span&gt; &lt;span class="s1"&gt;'createRequire'&lt;/span&gt; &lt;span class="n"&gt;has&lt;/span&gt; &lt;span class="n"&gt;already&lt;/span&gt; &lt;span class="n"&gt;been&lt;/span&gt; &lt;span class="n"&gt;declared&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tests and the typecheck both ran against the TypeScript source. The container runs a single file that esbuild bundles from it, and the bundle had a name clash the source didn't. I pasted the log back, and the fix was one rename in the build script. This time the agent proved it by starting the bundle with placeholder settings, not by running the tests again.&lt;/p&gt;

&lt;p&gt;The same build line in analytics was left alone, because analytics doesn't use fflate. The trap is still set there, waiting for a dependency that does the same thing.&lt;/p&gt;

&lt;p&gt;→ &lt;em&gt;Interlude: &lt;a href="///2026/10/31/identifier-createrequire-has-already-been-declared.html"&gt;Identifier 'createRequire' has already been declared&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Every tab: Internal server error
&lt;/h2&gt;

&lt;p&gt;With drive-sync running again, the backup list loaded and a backup opened. Every report tab then said "Internal server error".&lt;/p&gt;

&lt;p&gt;The cause was the JSON inside the zip. It isn't UTF-8. Ivy Wallet+ writes it as UTF-16 with a byte-order mark, and analytics reads JSON bodies as UTF-8. Every upload was rejected before validation began, and a catch-all error handler reported a bad request body as a server crash.&lt;/p&gt;

&lt;p&gt;→ &lt;em&gt;Interlude: &lt;a href="///2026/11/01/the-backup-that-spoke-utf-16.html"&gt;The backup that spoke UTF-16&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The fix converts the entry to UTF-8 in drive-sync, right after the unzip. It is the same boundary as before: the encoding is a fact about the file, not about the money.&lt;/p&gt;

&lt;p&gt;The check that closed it was the one the plan had postponed. The agent pushed my real backup through analytics' real ingest route: 500 before the fix, 201 after. The 201 came back with warnings and no errors, which is how the loader reports oddities it can work around. The schema the risk table worried about passed on its first real input. Both failures were in the packaging, a layer the risk table never mentioned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does it download the backup every time?
&lt;/h2&gt;

&lt;p&gt;Two days later, with real data on screen, I asked a performance question. Does drive-sync fetch the backup from Drive on every request? And could a backup that's used often be cached?&lt;/p&gt;

&lt;p&gt;It doesn't, and the answer is a good tour of the design. Here is a report request after this chapter's changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET /api/backups/:fileId/:report
 │
 ├─ drive-sync: Drive metadata call         every request (folder check, md5)
 ├─ key = sha256(user id, file id, md5)
 ├─ analytics: report(key) ── 200 ──► done  cache hit, no download
 │        │
 │       404  (never loaded, idle, evicted, or pod restarted)
 │        ▼
 ├─ drive-sync: download the zip (size-capped)
 │             unzip → exactly one .json → UTF-16 to UTF-8
 ├─ analytics: ingest(key) → validate → index → cache
 └─ analytics: report(key), once more
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One metadata call per request is the floor.&lt;/strong&gt; It's the check that the file is in your folder, and it returns the md5 the key needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The cache lives in analytics, and it holds parsed datasets.&lt;/strong&gt; A hit skips the download, the unzip, the transcode, the parse and the validation in one go.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It's an LRU (least recently used) cache&lt;/strong&gt; of 8 datasets by default (&lt;code&gt;DATASET_CACHE_SIZE&lt;/code&gt;). Each entry expires after 30 idle minutes (&lt;code&gt;DATASET_TTL_MS&lt;/code&gt;), and every hit restarts the clock.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The md5 in the key means it can be cold but never stale.&lt;/strong&gt; If the file changes, its md5 changes, and so does the key. There is no invalidation code because none is needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A backup is downloaded again when its entry sat idle past 30 minutes, got pushed out by newer ones, or the analytics pod restarted. With more than one analytics replica, a request could also land on a replica that never loaded it. That is why, as the last chapter mentioned, analytics runs a single replica.&lt;/p&gt;

&lt;p&gt;The agent offered three options if re-downloads ever became a problem:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Raise the TTL and the cache size.&lt;/strong&gt; The cheapest change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache the zip or the extracted JSON on disk in drive-sync,&lt;/strong&gt; on a volume, keyed the same way. It survives analytics restarts, but every user's financial data then sits on a disk that needs sizing and cleanup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sticky routing, or a shared store such as Redis,&lt;/strong&gt; if analytics ever runs more than one replica.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It also said to measure first: add a log line and count how often the re-download path runs, before changing anything.&lt;/p&gt;

&lt;p&gt;I changed nothing. Option 3 is the Redis the first critique took out of the design. Option 2 is a database by another name: state on disk, with my transaction history in it. A cold cache costs one download from Drive, which is a fair price for a dashboard one person opens.&lt;/p&gt;

&lt;p&gt;I didn't add the log line either. So "misses are rare" is a guess, not a measurement, and the counter is still a good idea.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open the real artifact on day one.&lt;/strong&gt; The risk table guessed which layer a real backup would break and named the wrong one. A golden test against a sanitized real backup is still on the list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test what you ship.&lt;/strong&gt; The tests ran the source, and the container ran a bundle. A CI step that starts the built bundle with dummy settings takes seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Absorb format quirks at the edge that knows the format.&lt;/strong&gt; The zip and the UTF-16 are facts about the file, so drive-sync handles both and analytics only ever sees plain JSON.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put the source's checksum in the cache key.&lt;/strong&gt; The cache can then be cold but never wrong, and you never write invalidation code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;With a real backup loading, the charts finally had real data, and real data has more categories than a chart has colors. The next chapter is the first feature built for the data rather than for the plan.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The story continues as the work does.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Source: &lt;a href="https://github.com/eyosias-k-negash/ivk8" rel="noopener noreferrer"&gt;github.com/eyosias-k-negash/ivk8&lt;/a&gt;. Commits: &lt;a href="https://github.com/eyosias-k-negash/ivk8/commit/fb809ba" rel="noopener noreferrer"&gt;&lt;code&gt;fb809ba&lt;/code&gt;&lt;/a&gt; (zip listing and unzip), &lt;a href="https://github.com/eyosias-k-negash/ivk8/commit/1ded273" rel="noopener noreferrer"&gt;&lt;code&gt;1ded273&lt;/code&gt;&lt;/a&gt; (UTF-16 to UTF-8).&lt;/p&gt;

</description>
      <category>android</category>
      <category>backend</category>
      <category>json</category>
      <category>mobile</category>
    </item>
    <item>
      <title>Onto real hardware</title>
      <dc:creator>Eyosias Negash</dc:creator>
      <pubDate>Tue, 10 Nov 2026 13:22:54 +0000</pubDate>
      <link>https://dev.to/eyosias_negash_8cbc103bb4/onto-real-hardware-25gl</link>
      <guid>https://dev.to/eyosias_negash_8cbc103bb4/onto-real-hardware-25gl</guid>
      <description>&lt;p&gt;&lt;em&gt;Last time: three stateless services, one request path, and a security model made mostly of things the system doesn't have. All of that ran on a throwaway k3d cluster. This chapter puts it on machines I own.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The cluster is three machines: an Arch laptop as the control plane (amd64), a Raspberry Pi (arm64) and a WSL2 desktop (amd64). It runs kubeadm, Kubernetes v1.36 and Calico in IPIP (IP-in-IP tunnel) mode.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;kubeadm&lt;/code&gt; overlay and one script (&lt;code&gt;make up-kubeadm&lt;/code&gt;) build the images on the control plane, import them into its containerd and deploy.&lt;/li&gt;
&lt;li&gt;App pods are pinned to the control plane, so any request that enters through Traefik on another node crosses a tunnel. That decision comes back to bite later.&lt;/li&gt;
&lt;li&gt;Two incidents from this stretch have their own posts: an nginx permission error, and cross-node traffic that died while every health signal stayed green.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The machines
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Hardware&lt;/th&gt;
&lt;th&gt;Architecture&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Control plane&lt;/td&gt;
&lt;td&gt;Arch Linux laptop&lt;/td&gt;
&lt;td&gt;amd64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worker&lt;/td&gt;
&lt;td&gt;Raspberry Pi&lt;/td&gt;
&lt;td&gt;arm64&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worker&lt;/td&gt;
&lt;td&gt;WSL2 desktop&lt;/td&gt;
&lt;td&gt;amd64&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Traefik comes from its Helm chart in its own namespace, exposed on NodePorts 30080 and 30443 with no LoadBalancer, since there is nothing at home to provide one. Calico is the CNI because the NetworkPolicies from the last chapter only mean something if the CNI enforces them.&lt;/p&gt;

&lt;p&gt;A mixed-architecture cluster has one practical consequence. Images are built for amd64, so they can only run on amd64 nodes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The kubeadm overlay
&lt;/h2&gt;

&lt;p&gt;The base manifests don't know about any particular cluster. A kustomize overlay adds what this one needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Image tag &lt;code&gt;kubeadm&lt;/code&gt;, pull policy &lt;code&gt;Never&lt;/code&gt;.&lt;/strong&gt; There is no registry in this setup. The script builds the images on the control plane and imports them straight into its containerd (the &lt;code&gt;k8s.io&lt;/code&gt; namespace, the one the kubelet reads).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A node selector and a toleration.&lt;/strong&gt; Because the images exist only on the control plane, every app pod is pinned there and tolerates its taint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traefik's namespace.&lt;/strong&gt; The NetworkPolicy that admits ingress traffic is patched to match the &lt;code&gt;traefik&lt;/code&gt; namespace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The ingress class and the public URL.&lt;/strong&gt; The Ingress gets &lt;code&gt;ingressClassName: traefik&lt;/code&gt;, and the OAuth redirect URL points at &lt;code&gt;localhost:30080&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The script checks before it acts: the right kubectl context, the right machine, an amd64 host, a Ready node, the IngressClass present, and a &lt;code&gt;.env&lt;/code&gt; file. A deploy script that refuses to run in the wrong place is cheaper than a postmortem.&lt;/p&gt;

&lt;p&gt;Pinning has a cost, and it is easy to miss on the day. Traefik can run on any node. If it runs on the Pi, every request travels Pi → tunnel → laptop. A request that fails between nodes looks like an app failure and isn't one.&lt;/p&gt;

&lt;h2&gt;
  
  
  A fixed tag is a trap
&lt;/h2&gt;

&lt;p&gt;The images always carry the tag &lt;code&gt;kubeadm&lt;/code&gt;. &lt;code&gt;kubectl apply&lt;/code&gt; sees an unchanged manifest and does nothing, so a freshly imported image is never picked up.&lt;/p&gt;

&lt;p&gt;The fix is in the script: after applying, it annotates each Deployment with a change cause and runs &lt;code&gt;kubectl rollout restart&lt;/code&gt;. The annotation is copied onto the new ReplicaSet, so &lt;code&gt;kubectl rollout history&lt;/code&gt; shows what each revision was, by default the git commit, marked &lt;code&gt;(dirty)&lt;/code&gt; if the tree has uncommitted changes. Before that, the history showed &lt;code&gt;&amp;lt;none&amp;gt;&lt;/code&gt; for every revision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do we need two replicas?
&lt;/h2&gt;

&lt;p&gt;I asked Claude Code whether the app needed two replicas. The answer separates two ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Statelessness makes replicas safe.&lt;/strong&gt; Two copies of drive-sync can serve any request, because the state is in an encrypted cookie. The dashboard is static files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Availability is what makes them useful.&lt;/strong&gt; Two replicas on the same node protect against a crashed process, not a dead node.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The manifests say &lt;code&gt;replicas: 2&lt;/code&gt; for drive-sync and the dashboard, and &lt;code&gt;1&lt;/code&gt; for analytics, where one replica keeps the in-memory cache warm. There is no PodDisruptionBudget and no topology spread constraint, and with every pod pinned to one node there isn't much to spread. So the replicas are honest about what they do. They cover rolling updates and process crashes, not hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two outages
&lt;/h2&gt;

&lt;p&gt;The first deploy on real hardware had two failures, and each is a post of its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The dashboard pod crashed with &lt;code&gt;Permission denied&lt;/code&gt; on its own nginx config.&lt;/strong&gt; The file was readable by me and by root, and the container runs as a different user. The first fix did not work, which is the interesting part.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pod traffic between nodes died while every Calico health check stayed green.&lt;/strong&gt; BGP said Established. The packets disagreed. Moving Traefik to another node changed nothing. It took three separate days to put together.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll tell both with their evidence, one hop at a time. They are posts, not footnotes, because each has a mechanism worth knowing about when it isn't your cluster.&lt;/p&gt;

&lt;p&gt;→ &lt;em&gt;Interlude:&lt;/em&gt; &lt;a href="https://eyosias-k-negash.github.io/2026/10/28/nginx-cant-read-its-own-config.html" rel="noopener noreferrer"&gt;Nginx can't read its own config&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ &lt;em&gt;Interlude:&lt;/em&gt; &lt;a href="https://eyosias-k-negash.github.io/2026/10/29/the-packet-that-knew-the-wrong-address.html" rel="noopener noreferrer"&gt;The packet that knew the wrong address&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pinning is a decision with a network consequence.&lt;/strong&gt; If a workload can only run on one node, say so, and check what has to cross a node boundary to reach it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constant image tags need a restart step.&lt;/strong&gt; Either use a unique tag per build, or make the script restart the Deployment and record why.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replicas answer "what dies?"&lt;/strong&gt; Name the failure you're covering before counting copies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the deploy script say no.&lt;/strong&gt; Guard clauses cost five lines each and rule out a class of mistakes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Next, the first real backup, and what happens when real data meets assumptions made from a synthetic one.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The story continues as the work does.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Source: &lt;a href="https://github.com/eyosias-k-negash/ivk8" rel="noopener noreferrer"&gt;github.com/eyosias-k-negash/ivk8&lt;/a&gt;. Commit: &lt;a href="https://github.com/eyosias-k-negash/ivk8/commit/a194cca" rel="noopener noreferrer"&gt;&lt;code&gt;a194cca&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>kubeadm</category>
      <category>calico</category>
      <category>devops</category>
    </item>
    <item>
      <title>Three services and nothing to store</title>
      <dc:creator>Eyosias Negash</dc:creator>
      <pubDate>Fri, 30 Oct 2026 12:18:44 +0000</pubDate>
      <link>https://dev.to/eyosias_negash_8cbc103bb4/three-services-and-nothing-to-store-58nk</link>
      <guid>https://dev.to/eyosias_negash_8cbc103bb4/three-services-and-nothing-to-store-58nk</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://eyosias.me/2026/10/25/system.html" rel="noopener noreferrer"&gt;eyosias.me&lt;/a&gt;. This is a chapter in the Ivyk8 series.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Last time: I cut a flagship-platform plan down to three stateless TypeScript services and five written decisions. This chapter is the result: what runs, how a request travels, and what keeps it safe.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The app reads an Android money manager’s backup from the user’s Google Drive and turns it into reports.&lt;/li&gt;
&lt;li&gt;Three services: a static React dashboard, a public back end (&lt;code&gt;drive-sync-service&lt;/code&gt;) and an internal calculator (&lt;code&gt;analytics-service&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;A report request is a pure function of &lt;code&gt;(backup, timezone, rate overrides)&lt;/code&gt;. Change the timezone and the same request runs again with new parameters. Nothing is stored.&lt;/li&gt;
&lt;li&gt;The security model is mostly subtraction: tokens never reach the browser, the calculator is unreachable from outside, and every container runs unprivileged.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The shape
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Browser ──► Ingress (Traefik)
              ├── /      ──► web-dashboard        React app, served by nginx, static only
              └── /api   ──► drive-sync-service   public API (a BFF)
                               │  Google sign-in, Drive read-only
                               │  encrypted cookie session
                               ▼
                             analytics-service    reachable inside the cluster only
                               │  validate → index → pure report functions
                               ▼
                             ECB daily exchange rates (+ fallback)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A BFF (backend for frontend) is a server that exists to serve one front end. Here it owns everything that touches Google, so the browser never does.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Owns&lt;/th&gt;
&lt;th&gt;State&lt;/th&gt;
&lt;th&gt;Public?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;web-dashboard&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the UI&lt;/td&gt;
&lt;td&gt;none&lt;/td&gt;
&lt;td&gt;yes, &lt;code&gt;/&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;drive-sync-service&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;sign-in, token refresh, folder choice, listing backups, choosing which bytes to analyse&lt;/td&gt;
&lt;td&gt;an encrypted cookie&lt;/td&gt;
&lt;td&gt;yes, &lt;code&gt;/api&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;analytics-service&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;validation, business rules, exchange rates, every number on screen&lt;/td&gt;
&lt;td&gt;an in-memory cache&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;no&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A shared &lt;code&gt;packages/contracts&lt;/code&gt; package holds the request and response types, so a change to a report’s shape fails the build in both services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Opening a report, one hop at a time
&lt;/h2&gt;

&lt;p&gt;Say you open the balances page.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The browser&lt;/strong&gt; calls &lt;code&gt;GET /api/backups/:fileId/balances&lt;/code&gt; with a timezone and optional rate overrides.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;drive-sync decrypts the session cookie&lt;/strong&gt; and refreshes the Google access token if it has expired. If the refresh token is dead it answers &lt;code&gt;401 REAUTH_REQUIRED&lt;/code&gt; and the UI shows a “Reconnect” link.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It checks the file is in the folder you chose.&lt;/strong&gt; A file ID from anywhere else gets a 404. That check is the line between “your backup folder” and “any file this token could see”.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It builds the dataset key:&lt;/strong&gt; &lt;code&gt;sha256(user id, file id, Drive md5)&lt;/code&gt;. Two users never share a cache entry, and an edited file gets a new key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It asks analytics for the report.&lt;/strong&gt; If analytics answers 404, the dataset isn’t loaded: first open, evicted, or the pod restarted. drive-sync then downloads the backup (with a size limit enforced up front and while streaming), &lt;code&gt;PUT&lt;/code&gt;s it to analytics, and retries once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Analytics computes the report&lt;/strong&gt; from the dataset, timezone and overrides, and returns the numbers with the rates it used and any warnings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The 404-then-upload dance is the design in miniature. Analytics holds parsed backups in an in-memory LRU cache, and the cache is allowed to be wrong. When it’s empty, it gets refilled. That is why a pod can be killed at any time without anyone noticing, and why there is no database to back up.&lt;/p&gt;

&lt;p&gt;It is also why “change the timezone” or “override this exchange rate” needs no endpoint of its own. It is the same request with different query parameters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security: mostly subtraction
&lt;/h2&gt;

&lt;p&gt;Most of the model is things the system doesn’t have.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tokens never reach the browser.&lt;/strong&gt; The session is an encrypted cookie that only drive-sync can open, and Google access is limited to the &lt;code&gt;drive.readonly&lt;/code&gt; scope.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only named reports pass through.&lt;/strong&gt; drive-sync forwards a report name to analytics only if it is in a fixed allowlist (&lt;code&gt;REPORTS&lt;/code&gt;). A new report is invisible to the outside world until someone adds it there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default deny.&lt;/strong&gt; Every namespace starts from a deny-all NetworkPolicy, and each allowed path (ingress to dashboard, ingress to drive-sync, drive-sync to analytics) is written explicitly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restricted Pod Security.&lt;/strong&gt; The namespace enforces the &lt;code&gt;restricted&lt;/code&gt; profile: no root, no privilege escalation, dropped capabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small images.&lt;/strong&gt; The Node services run on distroless images (no shell, no package manager, non-root). The dashboard uses &lt;code&gt;nginx-unprivileged&lt;/code&gt;. The root filesystems are read-only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A smoke test proves the claim.&lt;/strong&gt; The deploy check requests analytics from outside the cluster and expects it to fail. A policy nobody tests is a hope.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The calculator
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;analytics-service&lt;/code&gt; is where the rules live, so it is where bugs will live too. Its shape keeps them findable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Validate once.&lt;/strong&gt; A backup is checked against a schema with ajv on upload. Everything after that trusts the shape.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reports are pure functions.&lt;/strong&gt; Input is the dataset, a timezone and rate overrides. Output is numbers. There is nothing to mock and nothing to reset between tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time is bucketed by the user’s timezone,&lt;/strong&gt; with weeks starting on Monday. A transaction near midnight lands in the day the user would call it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rates degrade gracefully.&lt;/strong&gt; ECB rates are cached and served stale if a refresh fails. A user override wins over any fetched rate. A currency with no rate at all is reported as “unavailable”, not guessed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Problems become warnings,&lt;/strong&gt; not failures. A report with one unconvertible transaction still renders, and says so.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it could do at launch
&lt;/h2&gt;

&lt;p&gt;Sign-in, a folder picker, a backup list, a transactions table, balances and net worth, income and expense, and the Trends charts. Later chapters add budgets, a projection, tags and custom reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it gets onto a cluster
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;make up&lt;/code&gt; creates a local k3d cluster (Kubernetes in Docker) and deploys everything with kustomize. Overlays for local, CI and a multi-node cluster differ in small ways, such as which &lt;code&gt;ingressClassName&lt;/code&gt; the Ingress objects use. There is also a CI pipeline that tests, scans and signs images. At this point it is written but has not run once.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small question worth recording
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;kubectl port-forward svc/traefik 30080:80&lt;/code&gt; reaches the container’s port 8000, not 80. The Service’s port 80 maps to a named &lt;code&gt;targetPort&lt;/code&gt;, and the Traefik chart binds a non-root port because it runs unprivileged. The “80” is the Service’s, not the container’s.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;If a result is a function of its inputs, don’t store it.&lt;/strong&gt; Recomputing from &lt;code&gt;(backup, tz, rates)&lt;/code&gt; removed the database, the migrations and every “which copy is right” question.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let the cache be wrong.&lt;/strong&gt; A cache that can be empty at any time, with a defined refill path, turns pod restarts into non-events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prove the negative.&lt;/strong&gt; “Analytics is internal” is only true if a test tries from outside and fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Allowlist what a public server forwards.&lt;/strong&gt; An allowlist fails closed; a blocklist fails whenever you add something.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s next
&lt;/h2&gt;

&lt;p&gt;The next chapter moves this off my laptop’s local cluster onto three machines at home. It did not go the way the diagram suggests.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The story continues as the work does.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Source: &lt;a href="https://github.com/eyosias-k-negash/ivk8" rel="noopener noreferrer"&gt;github.com/eyosias-k-negash/ivk8&lt;/a&gt;. First commits: &lt;a href="https://github.com/eyosias-k-negash/ivk8/commit/e1d849a" rel="noopener noreferrer"&gt;&lt;code&gt;e1d849a&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/eyosias-k-negash/ivk8/commit/65bac77" rel="noopener noreferrer"&gt;&lt;code&gt;65bac77&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;Previous: &lt;a href="https://eyosias.me/2026/10/23/from-a-phone-app-to-a-cluster.html" rel="noopener noreferrer"&gt;Chapter 1, From a phone app to a cluster&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>security</category>
      <category>devops</category>
      <category>typescript</category>
    </item>
    <item>
      <title>From a phone app to a cluster</title>
      <dc:creator>Eyosias Negash</dc:creator>
      <pubDate>Thu, 29 Oct 2026 21:21:27 +0000</pubDate>
      <link>https://dev.to/eyosias_negash_8cbc103bb4/from-a-phone-app-to-a-cluster-4j8i</link>
      <guid>https://dev.to/eyosias_negash_8cbc103bb4/from-a-phone-app-to-a-cluster-4j8i</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://eyosias.me/2026/10/23/from-a-phone-app-to-a-cluster.html" rel="noopener noreferrer"&gt;eyosias.me&lt;/a&gt;. This is a chapter in the Ivyk8 series.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ivyk8&lt;/strong&gt; is Ivy + k8s: a read-only desktop dashboard for the backups my phone app writes to Google Drive.&lt;/li&gt;
&lt;li&gt;The first blueprint was a flagship platform: Postgres with replicas, Redis, a service mesh, GitOps, canaries. A critique of it said it was about 18 months of work for a team.&lt;/li&gt;
&lt;li&gt;On Oct 1 I cut it to three stateless TypeScript services, Kubernetes for delivery, and five written decisions (ADRs).&lt;/li&gt;
&lt;li&gt;This is part 1 of a series. Parts about each feature and each outage follow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where it starts: a phone app I couldn’t leave alone
&lt;/h2&gt;

&lt;p&gt;Ivy Wallet is an open-source money manager for Android. Its owner archived it on Nov 5, 2024. I wanted to keep using it, so I forked it as &lt;a href="https://github.com/eyosias-k-negash/ivy-wallet-plus" rel="noopener noreferrer"&gt;Ivy Wallet+&lt;/a&gt; and added what I was missing.&lt;/p&gt;

&lt;p&gt;The additions, in the order I made them in late August:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Photo and audio attachments&lt;/strong&gt; on transactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transaction location:&lt;/strong&gt; coordinates and a place name, a Room (Android’s SQLite layer) migration, and a button that opens the place in a maps app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balance at day:&lt;/strong&gt; tap a date in the history and see each account’s balance on that day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SMS auto-fill.&lt;/strong&gt; The app listens for bank SMS on a chosen SIM, parses the amount, balance, date and description with per-bank regex rules, and raises a notification that opens a pre-filled transaction. Rules import as JSON. I wrote rule sets for four banks and a mobile-money wallet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A wrapped reports filter&lt;/strong&gt; in place of horizontal scrolling, and a rebrand to Ivy Wallet+ with its own package name and logo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of that is this blog’s subject. It matters because of what it did to the data. The phone now captured more than before, and a phone screen is a poor place to study years of transactions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The gap
&lt;/h2&gt;

&lt;p&gt;Ivy Wallet+ already writes its backups to Google Drive. That file is the whole interface between the phone and anything else. So the idea was small: read the backup, show it on a desktop screen with charts the app can’t draw, and see trends, averages, and projections of expenses and incomes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first blueprint was too big
&lt;/h2&gt;

&lt;p&gt;I started where an ambitious person starts, with a prompt for a “top 1% flagship project”. The first blueprint had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Kotlin sync client and a Go sync API;&lt;/li&gt;
&lt;li&gt;a currency service and a report worker;&lt;/li&gt;
&lt;li&gt;Postgres with read replicas, and Redis as both cache and queue;&lt;/li&gt;
&lt;li&gt;Istio, Argo CD, Argo Rollouts, KEDA, SOPS and a full observability stack.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I asked Claude Code to critique it before building anything. This is where the pair worked well: the critique was blunt and I kept it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Roughly 18 months of work for a team.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It also found specific faults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Redis as cache and queue is a contradiction.&lt;/strong&gt; A cache wants &lt;code&gt;allkeys-lru&lt;/code&gt; (evict anything under memory pressure). A queue needs &lt;code&gt;noeviction&lt;/code&gt; (never lose a job). One instance can’t be both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read replicas break read-your-writes.&lt;/strong&gt; A sync client that uploads and then reads back can see old data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A hand-rolled Postgres StatefulSet “signals junior K8s judgment”.&lt;/strong&gt; Use an operator, or don’t run a database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No identity layer.&lt;/strong&gt; Nothing said who the user was.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;“Cosign signing without admission verification is security theater.”&lt;/strong&gt; Signed images mean little if the cluster never checks the signatures.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The last point is worth a dry aside. It’s still partly true of this project today: the release workflow signs images, and nothing in the cluster verifies them yet. The critique named the gap before I built it. Closing it is on the list.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cut
&lt;/h2&gt;

&lt;p&gt;I cut in two stages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The MVP prompt&lt;/strong&gt; kept core Kubernetes and a basic CI pipeline with static scanning. GitOps, canaries, observability, KEDA and signing went on hold.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The final cut, Oct 1,&lt;/strong&gt; went further. I wrote it down as five architecture decision records (ADRs), short files that say what was decided and what it replaced:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ADR&lt;/th&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0001&lt;/td&gt;
&lt;td&gt;Three stateless TypeScript services: &lt;code&gt;web-dashboard&lt;/code&gt;, &lt;code&gt;drive-sync-service&lt;/code&gt; (the public back end for the dashboard) and &lt;code&gt;analytics-service&lt;/code&gt; (internal). No Postgres, no Redis. It supersedes the earlier scaffold.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0002&lt;/td&gt;
&lt;td&gt;Sessions live in an encrypted cookie, so the services hold no session store.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0003&lt;/td&gt;
&lt;td&gt;Google Drive access is limited to the &lt;code&gt;drive.readonly&lt;/code&gt; scope. The app can’t change a backup even if it were compromised.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0004&lt;/td&gt;
&lt;td&gt;Kubernetes is the only delivery path: k3d (Kubernetes in Docker) locally and in CI, no docker-compose.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0005&lt;/td&gt;
&lt;td&gt;Exchange rates come from the ECB, with a fallback source for currencies the ECB doesn’t publish.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The reasoning behind 0001 is the part to keep. The analytics are computed in memory from one file. Timezone and rate overrides are request parameters. Nothing needs to persist between requests, so nothing gets a database. On a cache miss, drive-sync re-uploads the backup to analytics. That is a feature, not a shortcut: stateless services can be killed, replicated and rolled without ceremony. I did not know yet how much I would lean on that.&lt;/p&gt;

&lt;h2&gt;
  
  
  The goal
&lt;/h2&gt;

&lt;p&gt;One sentence in the repo says what I was after: &lt;strong&gt;built, secured, tested and delivered the way a production product would be.&lt;/strong&gt; The product is a personal dashboard for one user. The practice around it is the point: tests that gate merges, image scanning, signed releases, rollouts on a real cluster.&lt;/p&gt;

&lt;p&gt;That decides how the series is told. Features are chapters. The cluster misbehaving is its own kind of story, and those get shorter posts of their own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it taught me
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ask for the critique before the code.&lt;/strong&gt; An hour of being told the plan is theater was cheaper than 18 months of finding out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Statelessness is a decision you pay for once.&lt;/strong&gt; Dropping the database removed whole classes of work: migrations, backups, replicas, failover.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write the decision down while it is fresh.&lt;/strong&gt; The ADRs are why I can still explain, weeks later, why there is no Redis.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s next
&lt;/h2&gt;

&lt;p&gt;The next parts cover the dashboard’s first real features and the move from a local k3d cluster onto three machines at home. That second move did not go smoothly, and it is the source of the stranger posts.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The story continues as the work does.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Source: &lt;a href="https://github.com/eyosias-k-negash/ivk8" rel="noopener noreferrer"&gt;github.com/eyosias-k-negash/ivk8&lt;/a&gt;. Decisions: &lt;code&gt;docs/adr/0001&lt;/code&gt;–&lt;code&gt;0005&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;Next: &lt;a href="https://eyosias.me/2026/10/25/system.html" rel="noopener noreferrer"&gt;Chapter 2, Three services and nothing to store&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>architecture</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
