<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jens Skott on Medium]]></title>
        <description><![CDATA[Stories by Jens Skott on Medium]]></description>
        <link>https://medium.com/@jens.skott_65388?source=rss-b792813e732a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ORLzkjB5z9dWAt82wAMrKg.png</url>
            <title>Stories by Jens Skott on Medium</title>
            <link>https://medium.com/@jens.skott_65388?source=rss-b792813e732a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 21:59:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jens.skott_65388/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The stack I reach for — and why it works for me, not for everyone — Jens Skott]]></title>
            <link>https://medium.com/@jens.skott_65388/the-stack-i-reach-for-and-why-it-works-for-me-not-for-everyone-jens-skott-3fdbf2908af8?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fdbf2908af8</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Wed, 17 Jun 2026 00:00:51 GMT</pubDate>
            <atom:updated>2026-06-17T10:42:54.708Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mOjntca0nEQ0Es6b.png" /></figure><p>Every few months someone asks me what I build on, and I give them the list — Google Cloud and Firebase, Cloudflare, Neon when I need SQL, Astro and React on the web, Swift and Kotlin on mobile — and then I immediately start adding caveats, because the list on its own is misleading. A stack isn’t a recommendation. It’s a set of trades, and the trades only make sense once you know who’s making them.</p><p>So before any of the names: this is the stack of a <strong>platform engineer who ships solo apps in the evenings</strong>. A long background in cloud infrastructure, platform engineering and Linux administration — which matters more than it first looks, because of a trap it sets. On a side project there <em>is</em> no platform team. I’m it. And if I let myself, I will happily disappear into being the platform engineer for my own side project — building the Terraform, the tooling, the perfect pipeline — and never ship the product I actually wanted to build. So the discipline isn’t doing less infrastructure because I don’t understand it; it’s doing <em>deliberately</em> less of it because I understand it too well and know how far it can swallow my evenings. Reaching for managed services is how I stop myself from platform-engineering instead of shipping. If your situation is different, the right stack is different. What might transfer is the <em>reasoning</em>, so that’s what I’ll spend the words on.</p><h3>The gravity well: Google Cloud and Firebase</h3><p>Almost everything starts in <a href="https://cloud.google.com/">Google Cloud</a>, and the honest reason is a combination of two things that are easy to say and hard to feel until you’ve lived both sides: the <strong>free tier is genuinely generous</strong>, and the <strong>unit economics hold up as you scale</strong>. A side project can sit at essentially zero cost for a long time, and the curve from there is predictable rather than punishing.</p><p>The deeper reason is who the platform is <em>aimed</em> at. Google’s services are built for a developer to use directly, not for an infrastructure team to operate on a developer’s behalf. That’s the opposite of how a lot of cloud tooling is shaped, and for a team of one it’s the whole game — I can stand up auth, a database, functions, scheduled jobs and analytics without first building the platform team that would normally sit between me and those things. The services are scalable and, more importantly, scalable <em>without me thinking about it</em>.</p><p>There’s a real catch, and I want to name it sharply because it’s the part that bites people: <strong>ease compounds cost.</strong> The same frictionlessness that lets you wire up a service in minutes lets you wire up a service that quietly bills you for a configuration you forgot about. The defence isn’t what an infrastructure person’s instinct says it is. My instinct says <em>infrastructure-as-code</em>, and yes, I do that — but for a solo project IaC is not the thing that saves you from a four-figure surprise. <strong>Billing alerts and a hard kill-switch are.</strong> I care far more that a budget alert fires, and that there’s something ready to actually <em>act</em> on it, than that every resource is perfectly Terraformed.</p><p>That’s literally why I built <a href="https://github.com/thoughtgears/the-slashinator">the-slashinator</a>: a guard that makes sure a missed configuration can’t bill me an extortionate amount before I’ve noticed. It exists because “the cloud is easy now” and “the cloud can quietly ruin your month” are the same sentence, and the only way I’m comfortable enjoying the first half is having automated the second.</p><p>The other thing Google quietly gives a generalist is <strong>data and AI without specialising in either.</strong> I’m not a data engineer or an ML person, but <a href="https://cloud.google.com/bigquery">BigQuery</a>, <a href="https://cloud.google.com/vertex-ai">Vertex AI</a> and <a href="https://deepmind.google/technologies/gemini/">Gemini</a> are approachable enough that I can do real analytics and small-scale AI integration without that being a project of its own. Gemini has a genuinely free tier to prototype against via <a href="https://aistudio.google.com/">Google AI Studio</a>, and Vertex AI — a billed, enterprise-grade platform rather than a free one — is very cost-efficient for the small-scale work I throw at it. Tooling like the <a href="https://adk.dev/">Agent Development Kit</a> and the other lightweight frameworks around it (worth poking at for simple builds) means an AI feature can be a feature, not a research programme. For someone whose specialism is elsewhere, that accessibility is worth as much as any single capability.</p><h3>Firebase as a backend — and where its edges are</h3><p>When an app genuinely needs a backend — shared state, multi-user data, something server-authoritative — <a href="https://firebase.google.com/">Firebase</a> is what I reach for, because it’s the easiest “real backend” I know that doesn’t ask me to run anything. And it’s got materially more flexible over the years; the gap between “Firebase toy” and “Firebase product” has narrowed a lot.</p><p>But it has edges, and they’re structural rather than cosmetic:</p><ul><li><strong>Dev versus prod</strong> takes deliberate thought. There’s no free “environment” abstraction handed to you; you decide how that works.</li><li><strong>Auth across projects</strong> is awkward if you want a single auth source — an Auth0-style identity provider that several apps share. Firebase Auth is happy inside its own project; making one identity span many is swimming upstream.</li><li>You’re mostly <strong>confined to the logical boundary of a project.</strong> There are ways around it, but they’re work, and the natural grain of the platform is one project equals one thing.</li></ul><p>My response to that last one is the bit people find surprising: I stop fighting it. The boundary is effectively 1:1, <strong>projects are free</strong>, so why contort everything into one mega-project? I run <strong>one Firebase project per logical app.</strong> It keeps blast radius small, IAM legible, and dev/prod honest, at the cost of no shared monolith — which I’ve decided I don’t want anyway. To make “many projects” cheap to live with, I’ve got a simple, repeatable way to bootstrap a new project to the same baseline — an upfront tax you pay once so spinning up the next one isn’t a decision. The one thing to know going in: you’ll eventually hit the default per-account project quota (it’s not large — think dozens), at which point you’re filing a quota-increase request. Worth knowing before it surprises you, not a reason to avoid the pattern.</p><p>The single, deliberate <strong>exception is data.</strong> Data is the one thing I <em>do</em> centralise: rather than letting analytics pool in a dozen projects where it’s useless, I run data pipelines that feed every project into one central data and analytics project. Everything else is deliberately scattered; consolidation lives in exactly one place, on purpose.</p><p>And there’s a quieter answer that often beats all of this: for a single-user app, the right amount of Firebase backend is <em>none</em>. I rebuilt SteelRep from a Firebase backend to fully backendless on native storage, and the cleanest backend turned out to be the one I deleted. That’s <a href="https://jensskott.com/writing/react-native-firebase-to-native-backendless/">its own story</a> — the point here is just that “Firebase the backend” and “no backend” are both live options I weigh, not a default I reach for on reflex.</p><h3>The edge: Cloudflare for hosting and bindings</h3><p>For hosting, I keep landing on <a href="https://www.cloudflare.com/"><strong>Cloudflare</strong></a><strong> Pages and Workers</strong>, and it’s not a knock on Firebase — Firebase Hosting and App Hosting are genuinely good. It’s that Cloudflare’s model fits how I want to work. The CI/CD is trivial to set up, the DX is built around speed and simplicity, and the end state is your thing sitting on a fast global edge by default. That last bit is a small advantage rather than a decisive one, but small advantages with no downside are exactly the ones worth taking.</p><p>What’s made Cloudflare more than a CDN for me is the <strong>bindings</strong>. Inside Pages Functions and Workers you’ve got KV, D1 (databases), R2 (storage), image hosting and AI services right there. They range from very mature to merely fine, and the practical effect is that “do this on the edge, or do it in Google?” becomes a real per-feature decision rather than a platform-wide commitment.</p><p>Which is the part I want to stress: <strong>none of this is mutually exclusive.</strong> A single app of mine might keep a KV store on Cloudflare’s edge while its primary database is in Firebase or Neon. I’m not picking a team. I’m putting each piece of state where that piece of state is cheapest and simplest to serve, and the two platforms compose far more happily than the “pick one cloud” framing suggests.</p><p>For the static end of this — marketing sites, blogs, this site — <a href="https://jensskott.com/writing/how-this-site-is-built/">the colophon goes into the specifics</a> of why it’s Astro building to static files on Cloudflare with no server in sight.</p><h3>SQL only when I need it: Neon</h3><p>Sometimes the data model genuinely wants relational SQL, and when it does I reach for — for one dominant reason: <strong>cost, via scale-to-zero.</strong> An idle Neon database costs essentially nothing. For a side project that might see traffic in bursts, or might not see it for weeks, that’s the difference between a database being free to keep around and being a line item I resent.</p><p>It gives me the things a hosted SQL provider is supposed to: managed Postgres, backups, branching, the lot. The one caveat worth knowing is that it’s <strong>hosted on AWS</strong>, so if I’m sitting in Google Cloud the cross-cloud network hop is real. In a true low-latency environment that would matter — but with a normal database cache in front of it, it almost never shows in practice. I keep it filed under “know it’s there,” not “worry about it.”</p><p>The honest framing is that Neon is the <em>early</em> answer. It scales relatively well, but if a project actually takes off, that’s the moment to do the unit-economics maths and work out where a cutover to an always-on <strong>CloudSQL</strong> or <strong>Spanner</strong> starts to make sense. Scale-to-zero is a brilliant deal at low volume and a worse one at high steady volume; the skill is knowing roughly where the lines cross and not cutting over a day before you have to.</p><h3>The web: Astro and React, because I’m a weak frontend dev</h3><p>I’ll say the quiet part: <strong>I’m a bad frontend developer.</strong> That’s not false modesty, it’s a load-bearing fact in this decision. I want frameworks with <em>vast</em> documentation and a huge corpus, because that’s exactly where AI assistance is strongest — and for the front end I lean on that help heavily. <a href="https://astro.build/">Astro</a> and <a href="https://react.dev/">React</a> both clear that bar enormously, which is most of why they’re my two.</p><p>I split them by what the page actually <em>is</em>:</p><p><strong>Astro — content-shaped sites.</strong> Marketing pages, blogs, anything where the job is to render content fast and rank well.</p><ul><li><em>Benefits:</em> ships zero JavaScript by default, so it’s fast and SEO-friendly out of the box; content collections and Markdown make a blog pleasant; islands let you add interactivity only where you need it; the docs are excellent and AI handles it well. I built this site,<a href="https://steelrep.app/">SteelRep’s web presence</a> and<a href="https://lastlift.app/">LastLift’s</a> in it with very little effort.</li><li><em>Drawbacks:</em> it’s not built for app-like, state-heavy interactivity. The moment a page wants lots of shared client state across components, you’re working against the grain, and the islands model has its own learning curve.</li></ul><p><strong>React — interactive product UIs.</strong> Dashboards, builders, anything that’s really an application wearing a web page.</p><ul><li><em>Benefits:</em> the default for rich interactive UIs, an enormous ecosystem, and AI knows it cold. When a page is genuinely an app — like the coach and athlete surfaces in IronWolf — the component-and-state model is the right tool.</li><li><em>Drawbacks:</em> it ships a runtime and more build weight; it’s easy to over-engineer something that should’ve been a static page; and you own more of the performance story yourself rather than getting it for free.</li></ul><p>The rule I actually use: <strong>if it’s content, Astro; if it’s an application, React.</strong> Static brochure-and-blog work goes to Astro and lands on Cloudflare’s edge; an authenticated, interactive product gets React. You can see both choices sitting side by side across <a href="https://jensskott.com/projects/">the things I keep</a>.</p><h3>Mobile: native Swift and Kotlin, by choice</h3><p>On mobile I write <strong>Swift for iOS and Kotlin for Android</strong>, natively, and this one is the most deliberate reversal in the whole stack. I spent a long time in React Native and Expo, genuinely productively, and I chose to leave it. Not because native is cool — though it is — but for reasons that kept compounding:</p><ul><li><strong>Early access to platform APIs.</strong> New OS capabilities show up natively first; the cross-platform layer is always catching up, and the features I wanted most were exactly the platform-native ones.</li><li><strong>Mature first-party SDKs</strong> for the things I actually use, instead of a community shim of varying quality wrapping them.</li><li><strong>No version-mismatch churn.</strong> No more afternoons lost to which library version maps to which framework version, or an SDK upgrade detonating the native build underneath me.</li></ul><p>I wrote the full version of this — the migration, what flipped the trade, and what I got wrong about shipping Android too early — in <a href="https://jensskott.com/writing/react-native-firebase-to-native-backendless/">why I rebuilt from React Native and Firebase to native and backendless</a>. The short version is that the cross-platform tax stopped buying me the cross-platform benefit, so I stopped paying it.</p><h3>The actual lesson: match the stack to your situation</h3><p>Read back over all of that and you’ll notice none of the choices are “this is the best technology.” They’re “this is the best technology <em>for a platform engineer building solo apps with no team and no patience for undifferentiated heavy lifting</em>.” Generous free tiers matter because there’s no budget. Developer-aimed services matter because I <em>am</em> the platform team, and the only way to ship products as well is to refuse to spend my evenings being it. Scale-to-zero matters because traffic is bursty and uncertain. Native matters because I’m building for the long term on platforms I want to use fully.</p><p>Change any of those facts and the stack should change with them. A funded team with a dedicated infra group might rightly choose more powerful, more granular tools and happily pay the complexity. A product whose entire value lives in one capability another platform does better should follow that capability.</p><p>So this isn’t the golden path, and I’d be suspicious of anyone who told you they had one. It’s <em>a</em> path that fits <em>my</em> feet. If you’re in a similar spot — a strong generalist shipping things solo, allergic to running servers you don’t need — then maybe enough of this rhymes with your situation to be worth stealing. Take the reasoning, pressure-test it against your own constraints, and let that pick your stack. The list is just where I happened to land — and if you’d like a second pair of eyes on where <em>yours</em> should, that’s the kind of architecture and planning work I do through <a href="https://thoughtgears.co.uk/">Thoughtgears</a>.</p><p><em>Originally published at </em><a href="https://jensskott.com/writing/the-stack-i-reach-for/"><em>https://jensskott.com</em></a><em> on June 17, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fdbf2908af8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The progression bug I’d never have found in a unit test — Jens Skott]]></title>
            <link>https://medium.com/@jens.skott_65388/the-progression-bug-id-never-have-found-in-a-unit-test-jens-skott-bb10b987e20c?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb10b987e20c</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[workout]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 00:00:39 GMT</pubDate>
            <atom:updated>2026-06-10T10:17:41.038Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*54-qqY5AKylQRLoi.png" /></figure><p>I build <a href="https://steelrep.app/">SteelRep</a>, a strength-training app that tells you exactly what to lift next. I also use it on every gym visit. Those two facts are related, and the second one keeps finding bugs the first one shipped.</p><p>Here’s the one that made me question everything underneath it.</p><h3>The set that gave it away</h3><p>I was running <a href="https://steelrep.app/programs/cube-method/">the Cube Method</a>. The Cube rotates each lift through three treatments on a wave — one heavy session, one volume session, one speed session — and the whole point is that they live at <em>different</em> percentages of your training max. Heavy is near-maximal. Speed is 60–65% moved as fast as you can. Volume sits in between, higher reps at a moderate load. The cube turns each week. That variation is the method.</p><p>I did my heavy squat session at 140 kg. That’s about 90% of my training max — exactly right for a heavy day. Good set.</p><p>The next squat session wasn’t a heavy one. It was one of the lighter treatments — speed or volume, I genuinely can’t remember which came up. Either way it should have dropped a long way down the percentages: nowhere near 90%.</p><p>The app told me to load <strong>142.5 kg</strong>.</p><p>It hadn’t applied the session’s percentage at all. It had taken my heavy weight and added the standard 2.5 kg increment, as if every session were the same kind of session. The cube wasn’t turning. I was standing there looking at a speed-day prescription that was heavier than my heavy day, and the only reason I caught it is that I know what the Cube is <em>supposed</em> to feel like.</p><h3>The question that opened the trapdoor</h3><p>A weird thing happens when you catch your own app being wrong about something you care about. The specific bug stops mattering for a second, and a bigger question takes its place: <em>is this program even doing what I designed it to do?</em></p><p>Because if the percentages weren’t being applied here, what else wasn’t? I built these programs. I knew the Cube was meant to hit three different intensities. And the app had just shown me, in a rack, that it wasn’t.</p><p>So I went and looked. The answer was worse than one bad number.</p><h3>The intensity was real — it just never reached the bar</h3><p>The percentages existed — but only as <strong>text</strong>. Each session carried a human-readable note like target ~80% of training max or 65% intensity, and the engine treated those notes as decoration. The one function that actually turns a percentage into a weight was never called on the workout path. The app prescribed the raw training max, applied the normal increment, and shipped you out the door.</p><p>And it wasn’t just the Cube. A whole class of programs had the same hole:</p><ul><li>A <strong>wave</strong> program computed its ascending waves into a note, then prescribed the same bar weight for all nine of them. A wave program that didn’t wave.</li><li>A <strong>daily-undulating</strong> program wrote “heavy / medium / light” into notes and then gave all three days one weight — and, because they shared an exercise id, one progression counter. Undulation that didn’t undulate.</li><li>A <strong>block</strong> program labelled its light orientation week and its near-maximal peak week with the<em>same</em> number, and limped along only because it also gave RPE cues, so a lifter could do the maths by hand.</li></ul><p>Every one of these <em>looks</em> complete in the app. Nothing crashes. A weight appears. You only notice the promise is broken if you know what the program was promising — which, outside of me using it, almost nobody does set by set.</p><h3>Why a unit test would never have caught it</h3><p>This is the part that should bother you more than the bug.</p><p>The percentage logic had tests. Green ones. They fed a set with a % TM into the function and asserted it returned the right weight. Correct, and passing.</p><p>The function was also <strong>dead code</strong> — called only from those tests. The app’s workout path never invoked it. So my test suite was cheerfully validating a unit that wasn’t plugged into anything. Passing tests on code your product never runs aren’t neutral; they’re worse than no tests, because they point your confidence in exactly the wrong direction. Every green run told me the intensity system worked. None of them ran the path a lifter actually takes.</p><p>A unit test checks a unit in isolation. The bug <em>was</em> the isolation. There was no failing assertion to write, because the thing that was missing wasn’t logic — it was a wire between two correct pieces, and you can’t fail-test a connection you never asserted exists.</p><h3>How it actually got in (the unglamorous truth)</h3><p>I know exactly how this shipped, because I did it.</p><p>During development I built the percentage logic, wrote its tests, watched them pass — and left the last mile, <em>consuming</em> that percentage per set in the live workout, as an “I’ll wire that up later.” There was no// TODO. No issue. No failing test, because what I&#39;d deferred was the connection, and nothing was asserting the connection. So &quot;later&quot; became never, the tests stayed green, and the program went out looking finished.</p><p>That’s the honest anatomy of most bugs like this. Not a wrong decision — a deferred one that left no trace of having been deferred. The app didn’t lie to me on purpose. I just never made it tell the truth, and then I forgot I hadn’t.</p><h3>The fix, and the thing that makes it stay fixed</h3><p>The patch is one engine. Every prescribed weight now flows through a single path that computes the intensity for the set in front of you — consuming those percentages for the first time instead of reading them off a note. The dead percentage parser is gone.</p><p>But the patch isn’t the point. The point is the thing that makes it <em>stay</em> fixed: a closed-loop simulator that runs all 22 programs, week by week, and asserts that each one delivers the intensity its method promises — that the wave waves, the undulation undulates, the Cube actually turns. Plus a catalog test that fails the build if a future program ships without a deliverable intensity.</p><p>Now the test suite tests the path the app runs, not a unit off to the side. The gap I couldn’t see is written down in the one place that will shout if it ever reopens.</p><h3>You can’t test for a gap you can’t see</h3><p>I’m wary of the tidy moral here, the one that ends “so use your own product.” Of course you should. But the reason it works isn’t motivational, it’s mechanical: being a real user under real conditions generates the one input your imagination won’t supply — the speed day that should feel light and didn’t, the set that made you stop and ask whether the whole thing was built the way you thought.</p><p>Your test suite checks your code against your spec. Your spec — and your wiring — are the parts most likely to be quietly wrong, and they’re invisible from inside the code, where you already know what everything is <em>supposed</em> to do. The bar doesn’t know any of that. It just sits there at 142.5 kg on a speed day, telling you the truth your CI couldn’t.</p><p>That turns out to be the most useful code reviewer I have. More of these — the features I talked myself <em>out</em> of, and the rebuild that taught me what I got wrong about shipping — are coming next to this one, and the apps themselves are on <a href="https://jensskott.com/projects/">the projects page</a>.</p><p><em>Originally published at </em><a href="https://jensskott.com/writing/the-progression-bug-i-found-mid-set/"><em>https://jensskott.com</em></a><em> on June 10, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb10b987e20c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I rebuilt my app from React Native and Firebase to native and backendless — Jens Skott]]></title>
            <link>https://medium.com/@jens.skott_65388/why-i-rebuilt-my-app-from-react-native-and-firebase-to-native-and-backendless-jens-skott-c6d5d08d55ae?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6d5d08d55ae</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Wed, 10 Jun 2026 00:00:07 GMT</pubDate>
            <atom:updated>2026-06-10T10:21:37.749Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fZZUF3GBqUdwtcZh.png" /></figure><p>I’m a platform and backend engineer. So when I decided to build an app, I built it like a backend. That one instinct explains both how fast I got going and every wrong turn I took afterwards.</p><p>This is the story of how <a href="https://steelrep.app/">SteelRep</a> went from React Native and Firebase to fully native and backendless — and why each step only became obvious after the previous one stopped paying off.</p><h3>The itch</h3><p>I lift, and I was tired of being my own app. My programs lived in notes on my phone that I’d copy into a spreadsheet in Google Drive, or I’d try to bend a logger like <a href="https://steelrep.app/comparison/steelrep-vs-hevy/">Hevy</a> or <a href="https://steelrep.app/comparison/steelrep-vs-strong/">Strong</a> into a structured program and discover it wouldn’t do the one thing I actually wanted: automatic deload, progression, and weight calibration. Tell me what to lift next, do the maths, adjust when I miss. (The <a href="https://steelrep.app/programs/cube-method/">Cube Method</a> is the example of how much real logic that “just do the maths” hides — and the <a href="https://jensskott.com/writing/the-progression-bug-i-found-mid-set/">bug I later shipped</a> wasn’t the maths being hard, it was me never wiring that logic into the workout at all.)</p><p>So I decided to build it. And here’s where being a backend engineer set the whole trajectory: to me, “an app” meant <em>services and engines, in TypeScript, with a UI layered on top somehow</em>. I’d been writing TypeScript for years and building on Google and Firebase since the App Engine days — the better part of two decades. So the shape was obvious before I’d written a line: <a href="https://reactnative.dev/">React Native</a> and <a href="https://expo.dev/">Expo</a> — and not just for the UI. The engines, the services, all of it lived in the same TypeScript app; React Native <em>was</em> the whole thing, not a front-end bolted onto something else. I reached for it for two plain reasons: I already knew the language, and a lot of the apps I admired were — reputedly — built in React Native. (Whether that’s actually true is its own post.) That’s <a href="https://curiosum.com/blog/advantages-of-react-native">the pitch of cross-platform frameworks</a>, after all — one codebase in a language you already know, both platforms at once.</p><p>And honestly? It was fast, it was easy, and it worked. I had a v0.1 on my own phone quickly. Authentication just happened. My data landed in exactly the Firestore collections I’d designed for it. For someone who thinks in services and documents, it was deeply satisfying — the app was a thin client on top of a backend I understood in my bones.</p><h3>Then I thought other people might want it</h3><p>That’s the thought that turns a tool into a product, and it’s also where I started building problems for myself.</p><p>If other people were going to use it, the app needed polish. So I refined the UI, optimised the engines, added social logins. And I had what felt like a clever idea: sign every new user in as an <strong>anonymous Firebase user</strong> on first launch, then, when they signed up, <em>link</em> that anonymous account to a real Apple, Google or email identity — preserving the same UID and all their data — and gate sync and premium behind a free or Pro account.</p><p>It’s a genuinely neat pattern, and it’s exactly the kind of thing a backend engineer reaches for. It also had edge cases: anonymous-to-named linking can leave <strong>ghost accounts</strong> behind — orphaned auth users and stranded documents. But nothing a scheduled Cloud Function couldn’t sweep up. So I wrote those: a daily job to delete documents whose owner no longer existed, a weekly one to clear out long-dead anonymous accounts. Problem solved.</p><p>It did not once occur to me that <em>needing a fleet of cleanup jobs to keep my auth model honest</em> was the smell, not the solution.</p><p>I shipped to the App Store and Google Play as one React Native and Expo app. It was relatively painless — and I’m using “relatively” generously. There were patches to get builds working, package versions to reconcile, the constant puzzle of which library version mapped to which React Native version. The worst of it was a custom Expo config plugin I had to write just to monkey-patch the generated Podfile so that @react-native-firebase would compile at all against a current Xcode and React Native - a Clang module-ownership conflict deep in the native build. None of that is <em>product</em>. It&#39;s tax. But I paid it, shipped, and told myself that&#39;s just what app development is.</p><h3>The upgrade that flipped the trade</h3><p>The turning point was an Expo SDK upgrade.</p><p>I set aside what I thought would be an afternoon and lost the better part of a week to it — even with AI in the loop the whole time. The New Architecture became mandatory, Firebase changed an API namespace out from under me, native modules needed re-pinning, and the build broke in ways that had nothing to do with my app and everything to do with the layers beneath it. I was a backend engineer debugging Xcode module maps to ship a workout logger.</p><p>And the feature I most wanted was the clearest tell of all. I’d tried to build <strong>Live Activities</strong> — the live workout on your lock screen and Dynamic Island — as a custom local Expo native module: real Swift, a WidgetKit extension, wired into React Native by hand. It fought me with <em>silent</em> failures. If autolinking hiccupped, the native module didn’t error — it just returned null and every call became a quiet no-op. The iOS deployment target had to be set in three separate files or expo prebuild would silently drop the pod entirely. I wrote pages of notes on its failure modes and, in the end, shelved the whole thing.</p><p>That’s when the cross-platform maths inverted in front of me. The promise of React Native is one codebase for both platforms. But the moment I reached for the things I actually wanted next — Live Activities now, HealthKit and an Apple Watch app on the wishlist right behind it — every one of them was a <em>native platform feature</em>. To get them I’d be writing native Swift anyway, except through a layer that made it harder, lagged Apple’s releases, and could swallow my code without so much as an error. Live Activities in React Native is <a href="https://github.com/software-mansion-labs/expo-live-activity">possible, but only by dropping down to native Swift modules</a> — which is to say, it isn’t really React Native doing the work.</p><p>I was paying the cross-platform tax and no longer getting the cross-platform benefit. And I’m not the first to land there: teams far larger than me have walked this exact line back — Airbnb famously <a href="https://medium.com/airbnb-engineering/react-native-at-airbnb-the-technology-f95aa460be1c">sunset React Native</a> after concluding the overhead of maintaining three platforms — iOS, Android, and React Native itself — outweighed the shared-code win.</p><h3>The challenge: rewrite native, let the RN app burn</h3><p>The pattern that kept coming up in everything I read was simple: launch on one platform, and if the app is simple enough, go native. And mine <em>is</em> simple. The hard part of SteelRep was never the app plumbing — it’s the <a href="https://jensskott.com/writing/the-progression-bug-i-found-mid-set/">engines and the programs</a>, the progression and deload and calibration logic. That’s the value. The shell around it is disposable.</p><p>So I set myself a challenge: rewrite the iOS app in Swift, let the React Native app burn on Android for the moment, and keep the same Firebase backend patterns I already trusted. I ported the engines and the programs across, built the UI to Apple’s design standards, and ended up with something genuinely beautiful and native — sitting on top of the same Firebase I’d always had.</p><p>It went well. Which is what made the next feeling so inconvenient.</p><h3>The gut feeling: why is there a backend at all?</h3><p>The unease this time wasn’t “this is hard.” It was “why is any of this <em>here</em>?”</p><p>Why does a workout logger need Firebase accounts? Why am I maintaining complex sync and reconciliation between Firebase and the device — a weekly job reconciling subscription state against an external billing provider, triggers maintaining workout stats with idempotency dedupe, hundreds of lines of security rules guarding it, thousands of lines of Cloud Functions behind that? And the <strong>ghost-account problem was still there</strong>, riding along into the shiny new native app, because I’d carried the whole anonymous-to-named model across unquestioned.</p><p>I was a backend engineer diligently solving backend problems — and every one of them was a problem I had <em>given myself</em>. The data was one person’s workout history. It is never contended, never shared, never needs a server to be the source of truth. It never needed to leave the phone.</p><h3>Going backendless</h3><p>So, more research, and I found the pattern I use everywhere now: lean on the platform’s own storage and skip the server entirely. On iOS that’s <strong>SwiftData plus CloudKit</strong> — the user’s own iCloud account is the sync, Apple’s infrastructure, not mine. No Firebase Auth. No Firestore. No accounts to create, link, or clean up. Subscriptions go straight through StoreKit. The only third parties left in the app are Crashlytics, Performance and GA4 — and not one of them is in the user’s critical path. If all three vanished tomorrow, the app still works perfectly.</p><p>Here’s the part I keep coming back to: I didn’t <em>fix</em> the security rules, the cleanup jobs, the reconciliation, the ghost accounts. I <strong>deleted</strong> them. The entire category of problem evaporated, along with most of the lines of code I’d been proudest of. The rules file, the Cloud Functions, the anonymous-auth dance — gone, because there was no longer anything for them to guard.</p><p>A few more days and the new, backendless SteelRep was done. I was genuinely happy with it, submitted it for App Store review, and then worked out how to bring my existing React Native and Firebase users across — I emailed all of them instructions and a Pro promo code to move to the new app.</p><h3>And then Android</h3><p>Which left the question I’d been deferring: what about the React Native app still serving Android? Discontinue it? Freeze it on an old version forever? Or rebuild?</p><p>I chose to rebuild — native Android in Kotlin, the same engines, the same ideas, the same backendless shape. SteelRep is two native apps now, sharing identity and logic but nothing of their interaction.</p><p>There’s a real, deliberate cost to that, and I want to name it. Backendless means there’s no account tying your devices together, so the one person who runs SteelRep on an iPhone <em>and</em> an Android phone would pay for Pro twice — each store bills its own platform, and nothing reconciles them. I could have kept a cross-platform subscription with something like RevenueCat — but that drags a slice of the backend, accounts and a server and webhooks to reconcile, straight back into an app I’d just freed of it. For a workout logger the dual-platform user is a vanishing minority, if they exist at all, so I made the trade on purpose: no backend beats perfect cross-platform billing for the person I’m actually building for. If that ever stops being true, it’s a problem I can pick up then — I didn’t explore it further now.</p><p>If I’m honest, this is also where the lesson sharpens. I shipped <em>both</em> platforms on React Native before I’d proven a single person other than me wanted the thing — because cross-platform made “both” feel free. It wasn’t free; it was deferred, and the bill came due as an upgrade I couldn’t dodge. The durable version of the lesson isn’t “native good, React Native bad.” It’s <em>launch on one platform, prove the value, then decide what the second one is worth</em> — which is exactly how I’m running <a href="https://lastlift.app/">LastLift</a>, iOS-first, no second platform until the first one earns it.</p><h3>The app is for me — the lesson is for the next one</h3><p>SteelRep is, still, built for me. If other people want it and subscribe, I’m delighted, but that was never the point. The point turned out to be the path itself — idea, to React Native and Firebase, to native and Firebase, to native and backendless, to native on both platforms — and the default it left me with:</p><p><strong>reach for the least backend the data model actually requires; prove value on one platform before paying for the next; and remember the engines are the product while the shell is disposable.</strong></p><p>I carried all three straight into <a href="https://lastlift.app/">LastLift</a>, and they’re the lens I’ll bring to whatever I build after that. The rest of what I’ve learned building these — including <a href="https://jensskott.com/writing/the-progression-bug-i-found-mid-set/">the bugs I only find by being my own user</a> — is in <a href="https://jensskott.com/projects/">the projects I keep</a>.</p><p><em>Originally published at </em><a href="https://jensskott.com/writing/react-native-firebase-to-native-backendless/"><em>https://jensskott.com</em></a><em> on June 10, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6d5d08d55ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Replaced a Dev Team with Documentation]]></title>
            <link>https://medium.com/@jens.skott_65388/i-replaced-a-dev-team-with-documentation-7987c08ae618?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7987c08ae618</guid>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 18:50:12 GMT</pubDate>
            <atom:updated>2026-02-18T18:50:12.687Z</atom:updated>
            <content:encoded><![CDATA[<h3>I Replaced a Dev Team with Documentation: How I Built a Production App Paying the “AI Tax”</h3><p>I’ve been lifting for 20 years. I’ve tried every app on the market, and I deleted all of them.</p><p>They usually fall into one of two buckets: the “blank canvas” loggers that are just glorified spreadsheets, or the “AI Coaches” that charge $35/month to generate random workouts every session. None of them stuck. I always defaulted back to the Notes app or pen and paper backed by a spreadsheet.</p><p>I wanted to build the tool I actually needed. But I’m a solo developer. I didn’t want to spend two years coding in a basement. I wanted to architect a system, not just type syntax.</p><p>Most people treat AI coding tools like a chatbot or a magic wand. I treat AI like a Junior Developer. And Junior Developers need a handbook.</p><p>Here is the exact system I used to build this app without a team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*CtHP_cjkKw3vjlgENyeF3A.png" /></figure><h3>The Concept: “The AI Tax”</h3><p>Everyone wants AI to be magic. It isn’t. It is a pattern-matching machine. If you don’t give an LLM strict rules, it defaults to the average. It regresses to the mean of the internet.</p><p><strong>Example 1: The Version Drift</strong> When I built my previous frontend project, I asked the AI to style a component. It kept writing Tailwind 3 code because that’s what comprises the bulk of its training data. I wanted Tailwind 4. I spent hours migrating to tailwind 4 and fixing deprecated classes because I hadn’t set the rules upfront.</p><p><strong>Example 2: The Pattern Drift</strong> On an another project, I noticed that without strict documentation, the AI is inconsistent. One Cloud Function would use admin.firestore(), and the next would use getFirestore(). One file used a try/catch block, the other didn&#39;t handle errors at all. Both &quot;worked,&quot; but the codebase was becoming a unmaintainable mess of conflicting patterns.</p><p>If I were managing a human Junior Dev, I wouldn’t let them guess the architecture. I would give them documentation.</p><p>This is what I call the <strong>“AI Tax.”</strong></p><p>I spend 10% of my time documenting context — paying the tax upfront — so I can spend 0% of my time refactoring bugs later. I created a directory of “Skill Files” that forces the AI to read my documentation before it writes a single line of code. It effectively says: <em>“Do not guess. Read the docs. Then build.”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6R9EchVPJ6Jhw5YljotXEA.png" /></figure><h3>The Workflow: The Architect &amp; The Reviewer</h3><p>I don’t just prompt a model to “build a workout screen.” I run a workflow that mimics a senior engineering team.</p><p>I use a <strong>Reviewer Agent</strong> workflow that runs before every commit.</p><ol><li><strong>Agent 1 (The Builder)</strong> writes the feature code.</li><li><strong>Agent 2 (The Reviewer)</strong> checks that code against my coding-components.md and coding-firebase.md.</li></ol><p>For this app, strictness was critical.</p><p><strong>The Tech Check:</strong> My coding-components.md file explicitly bans class components and enforces StyleSheet.create(). If the Builder Agent gets lazy and writes an inline style, the Reviewer Agent blocks the commit. It enforces a &quot;Functional Components Only&quot; rule that keeps the codebase uniform.</p><p><strong>The Brand Check:</strong> The brand guidelines specify that we use system fonts (SF Pro/Roboto) for performance and tabular figures (monospace numbers) for all weight displays. If the AI tries to import a custom font or use a variable-width font for a timer, the Reviewer Agent flags it because it violates the “Efficiency” and “Clarity” values of the brand.</p><p>The result? Almost zero buggy code hits my production branch. The code is sanitized before I even see it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AtRVngD4q2HGdEMQ6bM-Uw.png" /></figure><h3>The Math: Architects Create Margins</h3><p>I ran the financial model early. I wanted to price this app at $4.99/month — a fraction of the competitors. To make those unit economics work, my infrastructure costs have to be negligible.</p><p>My model shows that at 100,000 users, my infrastructure cost will be less than 2% of revenue.</p><p>A specific example of “The Architect” mindset: I explicitly chose Firebase “Standard Auth” instead of the “Identity Platform.” For a user base of that size, that single decision saves roughly $60,000 a year. An AI creates code; an Architect creates margins.</p><h3>Conclusion</h3><p>This isn’t just an app. It’s a system.</p><p>By treating AI as a Junior Dev and paying the “documentation tax” upfront, I built a scalable, profitable product without a team of ten.</p><p>I don’t have a massive runway or a venture capital safety net. I have a workflow-code-review.md file and a clear vision. And honestly? That&#39;s all I needed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7987c08ae618" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Retool — A developers journey]]></title>
            <link>https://medium.com/@jens.skott_65388/retool-a-developers-journey-f46cea2462a4?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f46cea2462a4</guid>
            <category><![CDATA[retool]]></category>
            <category><![CDATA[no-code]]></category>
            <category><![CDATA[process-automation]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Wed, 30 Oct 2024 10:09:20 GMT</pubDate>
            <atom:updated>2024-10-30T10:09:20.967Z</atom:updated>
            <content:encoded><![CDATA[<h3>Retool — A developers journey</h3><p>Rather recently I got involved in a project that would help the companies operations, support agents, sales and other departments, be more efficient and not have to rely on engineering to build out applications and processes for them. The company had decided to invest money into a no/low code platform called Retool. The USP (unique selling point) was that it would enable non-engineers to develop tools that they can use. <br>I would say that is a half truth and I will tell you why in this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*8ReHjn0JV6yZkfu6Wcs0cQ.png" /></figure><p>Investing in Retool is a big step for a business, they think that they can cut out engineering to build internal tooling using the data that is available to them. This is what was thought in the company that got involved with Retool and there was a lot of hype around how they could move faster and not be reliant on engineering and the other systems they had in the tech stack.</p><p>I would say they where mostly right, but there are some caveats to that.</p><ul><li>Retool is not the end all and be all of tools</li><li>Its not React/Svelte or whatever framework you use currently, you will find limitations as a engineer that will frustrate you</li><li>Retool without governance and guardrails will become chaos</li><li>It will not replace software engineering</li></ul><p>With this said, I think Retool is an excellent resource and I have moved some of my private projects and smaller companies apps, processes and business logic to Retool.</p><h4>What is Retool good for?</h4><p>To start off, Retool is an excellent tool for aggregating data from many sources into a single UI or workflow. It has a lot of out of the box integrations and if there is no default integration, you can use the REST or OpenAPI resources to create whatever integrations you need. This really helps the second point, building simple internal and external applications.</p><p>If you know what you want to build, have some skills in SQL and Javascript you can quickly build and iterate on applications that will bring value to your business. The speed of Retool is not for <strong><em>done and dusted, </em></strong>but for iteration.<strong><em> </em></strong>It will allow you to quickly build out prototypes (MVP) and from there move into more complex operations.</p><p>Other then UI applications there is workflows, a very powerful low code tool to help you automate business processes. Workflows can run on schedules (CRON) or by invoking them through interaction in the UI or a webhook from external systems. You can use all types of resources in a workflow and you can move a lot of manual processes and excel macros into Retool workflows in days and allow for a more robust process library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lKG5qRsW9HR2xe6IJvqE7A.jpeg" /><figcaption>Yo. <a href="https://www.youtube.com/@FMWC">https://www.youtube.com/@FMWC</a></figcaption></figure><h4>What I have learned using Retool</h4><p>I have most likely run into the same problems as many other adopters of Retool so I will try to share some findings.</p><ul><li>You still need a owner or a team owning the platform, mainly due to management, governance and operations. The team can also support with more advanced use-cases that the biz people get stuck with.</li><li>Make sure you have a proper SDLC and Access control in place before letting people onto the platform. Using source control and spaces is prefered in larger companies. It allows you to connect to different environments from different spaces.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DdvViU4VZUVrgld2yw_4lA.png" /><figcaption>Possible SDLC implementation</figcaption></figure><ul><li>Get engineering buy-in! You do want to have engineering on board since it will also speed up their development and help with tasks that might not be core business problems.</li><li>Keep iterating, just since you think your done, doesn&#39;t mean your done. The power comes with constant improvements to your apps and workflows.</li><li>Use SQL as much as possible and use workflows when you need to.</li><li>Keep a consitant naming standard, else you will cry 😢</li><li>Modularize! Keep the workflows and queries small, create repeatable modules everyone else can use.</li><li>Start off with the right branding and UX desing. It really helps if you have a brand and UX guideline document that will support the building of applications in Retool.</li><li>Modularize! Build repeatable UI elements that other teams can use.</li><li>Its not a silver bullet for everything, sometimes you have to tell the business that its not a Retool use case.</li></ul><h4>Final Thoughts</h4><p>This is something I wish I would have looked into earlier, I was very stubborn telling myself that GO, Python, Javascript and React was all I needed. But after working with Retool for almost a year now I can say I was wrong. You need it all and Retool has really sped up my creation of ideas and has helped companies implement process automation and rapid internal app development.</p><p>I hope this was useful information and I will leave you with a small gift, an application that I created to manage multiple spaces and create new ones. Since one of my problems in a company was the mass amount of spaces created and how they where managed and the inconsistency across resources and configuration that cant be <strong>protected</strong>.</p><p><a href="https://github.com/thoughtgears/retool-apps/tree/main/apps/retool-management">https://github.com/thoughtgears/retool-apps/tree/main/apps/retool-management</a></p><p><em>Use this app as a starting point for your own space management and hopefully it will relieve some pressure on requests and operations of the platform.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*ipeL9c73vmPdFRtpNPHN8Q.png" /></figure><p><em>This is one thing that bothers me, the Retool API does not support creating resources for OpenAPI or API keys for full automation, but hopefully it will improve over time.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f46cea2462a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving data away from danger]]></title>
            <link>https://medium.com/@jens.skott_65388/moving-data-away-from-danger-3412cbe772c4?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3412cbe772c4</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[firestore]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Thu, 27 Jun 2024 12:46:59 GMT</pubDate>
            <atom:updated>2024-06-27T12:46:59.411Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9gJ7HlfDIvDSWaKS1c7Yjw.png" /><figcaption>Protecting your precious data</figcaption></figure><p>As we know, data is the most critical asset most companies have in terms of materialistic property. It drives essential decisions for your company regarding business projection and mission, using analytics to understand your users, changes, and innovation and helping you take the next step into your company&#39;s future. Of course, this is all well and good, but data is also one of the most lucrative incomes for malicious actors out there, the hacker groups and organized networks who aim to gain massive incomes by extorting what is most precious to you, that golden, shining data.</p><p>We hear more and more companies worldwide are being targeted, from smaller businesses to established mega-corporations. No, I&#39;m not talking about Umbrella Corporation or E-Corp. The ransomware scare is bigger than ever, but how can we mitigate it? I would argue that we can`t fully mitigate it, but we can take steps to reduce the risk, and one of those reductions is what I will write about here today: a<strong>ir-gapped immutable backups of our Firestore data.</strong></p><p><a href="https://www.sangfor.com/blog/cybersecurity/list-of-top-ransomware-attacks-in-2023">A Comprehensive List of Top Ransomware Attacks in 2023</a></p><h3>Why do it?</h3><p>You might be asking yourself why I would want to spend time and money creating exported backups of my Firestore data. It already has very solid ways of doing this within the service.</p><p><a href="https://cloud.google.com/firestore/docs/backups">https://cloud.google.com/firestore/docs/backups</a><br><a href="https://cloud.google.com/firestore/docs/pitr">https://cloud.google.com/firestore/docs/pitr</a></p><p>That is correct, and it is something we already use for backing up the data without the logical boundary of the project where the Firestore lives. However, there is no external immutable source that can be used in case the actor gets access to your project or finds a vulnerability to encrypt your data with a key you don’t have, and you have to fork out $$$. We use this technology to restore lost data due to bugs or any other reason we want to restore data, but nowhere in the overview, it tells me it&#39;s immutable, off-site, or similar. <em>If you know differently, you SHOULD challenge me on this.</em></p><blockquote>A backup is a consistent copy of the database at a point in time. The backup contains all data and index configurations at that point in time. A backup does not contain database <a href="https://cloud.google.com/firestore/docs/ttl">time to live policies</a>. A backup resides in the same location as the source database.</blockquote><blockquote>Backups have a configurable retention period and are stored until the retention period expires or until you delete the backup. Deleting the source database does not automatically delete related backups.</blockquote><blockquote>Firestore stores metadata related to backups and backup schedules related to a database. Firestore retains this metadata until <strong>all</strong> backups for the database expire or are deleted.</blockquote><blockquote>Creating or retaining backups does not affect the performance of reads or writes in your live database.</blockquote><h4>The meat and project Phoenix</h4><p>With this in mind, I was recently tasked to solve this for a company with a lot of their data in Firestore, and I got the requirements, the expected outcome, and if there were any constraints that I had in mind when creating the solution.<br><em>Note: This would also work for any Google Service that can export data to a Google Storage Bucket, such as CloudSQL </em><a href="https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/instances/export#go"><em>https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/instances/export#go</em></a></p><p>I think it&#39;s important to say that in my current solution, there was no requirement to move to a pure off-site, but this could easily be adapted to support this.</p><p>The solution is very simple in its pure form. It uses some custom code but mostly Google Defined services to support the event-driven export and transfer of data. We will use Cloud Functions, Cloud Scheduler, Cloud Storage, Cloud Storage Transfer, and Pub/Sub. We are also very particular about accesses, so a lot of work has gone into understanding the best practices for IAM permissions and the use of <a href="https://cloud.google.com/iam/docs/pam-overview">Privileged Access Management (PAM)</a>, a new feature Google has released very recently into the IAM catalog of cool stuff. 😘</p><p>The initial part of the export is using Cloud Scheduler to export your Firestore data to a Google Cloud Storage Bucket within a dedicated project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Yjs_ow1yELT3N6YSYTAxpg.png" /></figure><p>This is done on a Schedule or any other mechanism you want by creating a POST request to the Cloud Function (Phoenix). Where the type (added for different export functionality), project_id, and project_number are required, and the data is an <em>Optional[dict] </em>with specific data for the export job. In the Firstore case, it will take on <em>database</em> (defaults to (default) 😐) and a list of <em>collections</em> (defaults to all collections).</p><pre>{<br>  // Required<br>  &quot;type&quot;: &quot;firestore&quot;,<br>  // Requred<br>  &quot;project_id&quot;: &quot;your-google-cloud-project-id&quot;,<br>  // Required<br>  &quot;project_number&quot;: &quot;your-google-cloud-project-number&quot;,<br>  // Optional based on type, this is the data for the firestore backup<br>  // If no collections are provided, all collections will be backed up<br>  // If no database is provided, the default database will be used<br>  &quot;data&quot;: {<br>    &quot;database&quot;: &quot;your-firestore-database&quot;,<br>    &quot;collections&quot;: [<br>      &quot;collection1&quot;,<br>      &quot;collection2&quot;<br>    ]<br>  }<br>}</pre><p>Phoenix will then request an export job to the target bucket using the Firestore APIs. Simple right? But is this where we want the Firestore data to be stored for a long-term immutable backup? No, we want to continue, and it gets even easier as we move along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*WfyZlOcc59YGScsPozLUrw.png" /></figure><p>The next step is to move our data into an off-site Google project. This is done entirely by <a href="https://cloud.google.com/storage/docs/pubsub-notifications">events published to a Pub/Sub</a> topic in the project. From there, the Google Storage Transfer takes over and moves the objects from y to z. Nothing more, nothing less. Well, there are some caveats to this.</p><ol><li>With event-driven Storage Transfer, you can&#39;t configure it to delete the source data; this will be amended by putting a lifecycle policy on the Y bucket.</li><li>The Z bucket is not immutable by default, so we will have to configure a retention policy with a bucket lock. This will allow us to lock the objects in the bucket after transfer, which means there is no way to alter the transferred objects.</li><li>Do we keep the objects in Z forever? No, on the Z bucket, we have to set up a life-cycle policy to ensure we delete objects after the retention policy has expired (please, Google, allow me to set a policy based on retention expiry) based on lifetime.</li></ol><h4>This is it!</h4><p>There is actually no more magical about this, the conclusion of this is. Doing backups is easy, but managing permissions for people is hard. I think I spent around 80% of my time mapping out permissions on folders, organizations, and projects and automating it in Terraform to allow for a secure backup project with minimal access and PAM to access and restore data.</p><p>I created a reference to demo and experiment with during the process, and I wanted to share this with you, in case you find it interesting and want to work with it. It is a PoC, so there could be optimizations in the code. Please, use it as is or make your improvements 😍</p><p><a href="https://github.com/thoughtgears/project-phoenix">GitHub - thoughtgears/project-phoenix: A cloud function with infrastructure to create DR backups to an offsite project in GCP</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApAjXnHYrD5uR3E1rbjZyQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3412cbe772c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Firebase Emulation with Docker: A Guide to Local Development and Testing]]></title>
            <link>https://medium.com/@jens.skott_65388/simplifying-firebase-emulation-with-docker-a-guide-to-local-development-and-testing-0c3c33fd92c7?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c3c33fd92c7</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[ai-generated]]></category>
            <category><![CDATA[firebase-emulator-suite]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Sun, 03 Mar 2024 11:11:03 GMT</pubDate>
            <atom:updated>2024-03-03T11:11:03.261Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8GAaJMuRMG4HYM4NfiiyA.jpeg" /><figcaption>AI-generated image of Docker and Firebase in Unison</figcaption></figure><p>Firebase has become a staple for developers looking to quickly build scalable and serverless applications. However, testing and development can often involve complex setups, especially when trying to mirror cloud environments locally. This is where Docker offers a streamlined approach to emulate Firebase services on your local machine. This guide will explore setting up a Firebase emulator within a Docker container, perfect for local development and testing. This approach simplifies the initial setup and ensures consistency across different development environments.</p><h3>What is Firebase Emulator?</h3><p>Firebase Emulator Suite <a href="https://firebase.google.com/docs/emulator-suite">https://firebase.google.com/docs/emulator-suite</a> is a set of advanced tools that allow developers to run Firebase services locally, simulating a cloud environment on your development machine. It supports services like Firestore, Functions, Authentication, and many more. This local emulation provides an excellent way for developers to test their applications before deploying them to the Firebase environment, ensuring a smoother and more reliable development process.</p><h3>Why Docker?</h3><p>Docker provides an isolated environment called containers for your applications. By using Docker, you can ensure that your Firebase emulator runs the same way, regardless of where the Docker container is deployed. This isolation eliminates the “it works on my machine” problem, making your development process more predictable and efficient. It can also be used to manage CI/CD processes for testing within your Software Development LifeCycle.</p><h3>Setting Up the Dockerized Firebase Emulator</h3><p>The setup involves creating a Docker container that runs the Firebase Emulator Suite. This container will mimic the Firebase cloud environment, allowing you to develop and test your applications locally with ease.</p><h3>Dockerfile Configuration</h3><p>First, let’s look at the Dockerfile configuration required to set up the Firebase emulator environment:</p><pre>FROM node:20-alpine<br>ARG FIREBASE_VERSION=13.3.0<br>RUN apk --no-cache add openjdk11-jre bash curl openssl gettext nano nginx sudo &amp;&amp; \<br>    npm cache clean --force &amp;&amp; \<br>    npm i -g firebase-tools@$FIREBASE_VERSION<br>COPY nginx.conf /etc/nginx/<br>COPY serve.sh /usr/bin/<br>RUN chmod +x /usr/bin/serve.sh<br>WORKDIR /srv/firebase<br>ENTRYPOINT [&quot;/usr/bin/serve.sh&quot;]</pre><p>This Dockerfile uses node:20-alpine as the base image and installs the necessary packages, including Firebase CLI tools, Nginx for reverse proxy, and other utilities. The serve.sh script initializes the Firebase emulator and Nginx server upon container startup.</p><h3>Docker Compose Configuration</h3><p>To integrate this setup into your development workflow, you’ll use a docker-compose.yml file, which orchestrates the Docker container and its configurations:</p><pre>services:<br>  emulator:<br>    build:<br>      context: ./emulator<br>      dockerfile: Dockerfile<br>      args:<br>        - FIREBASE_VERSION=13.3.0<br>    stop_grace_period: 1m<br>    environment:<br>      FIREBASE_AUTH_EMULATOR_HOST: &quot;localhost:9099&quot;<br>      FIRESTORE_EMULATOR_HOST: &quot;localhost:8080&quot;<br>      PUBSUB_EMULATOR_HOST: &quot;localhost:8085&quot;<br>      FUNCTIONS_EMULATOR_HOST: &quot;localhost:5001&quot;<br>      FIREBASE_PROJECT: &quot;test-project&quot;<br>      GCLOUD_PROJECT: &quot;test-project&quot;<br>      FORCE_COLOR: &#39;true&#39;<br>      DATA_DIRECTORY: &quot;data&quot;<br>      CHOKIDAR_USEPOLLING: &#39;true&#39;<br>    ports:<br>      - &quot;4000:4001&quot; # ui<br>      - &quot;4400:4401&quot; # hub<br>      - &quot;4600:4601&quot; # logging<br>      - &quot;5001:5002&quot; # functions<br>      - &quot;8080:8081&quot; # firestore<br>      - &quot;8085:8086&quot; # pubsub<br>      - &quot;9000:9001&quot; # database<br>      - &quot;9099:9100&quot; # auth<br>      - &quot;9199:9200&quot; # Storage<br>      - &quot;6000:6001&quot; # Hosting<br>    volumes:<br>      - ./firebase:/srv/firebase:rw<br>      - ./cache:/root/.cache/:rw<br>      - ~/.config/:/root/.config<br>      - ./firebase/data:/srv/firebase/data:rw</pre><p>This configuration specifies the Firebase emulator’s version and sets up the necessary environment variables and port mappings for the services. It also defines volumes for persistent data storage and configuration files.</p><h3>Initial Setup and Directory Structure</h3><p>Your repository should contain a firebase directory at the root of the compose.yaml. This directory will house your Firebase emulator configuration and data. An important note is to include a data/export directory within firebase if you opt to store data, accommodating the Firebase emulator&#39;s data export feature.</p><h3>firebase/firebase.json Example</h3><p>Here’s a short example of what your firebase/firebase.json file might look like.</p><pre>{<br>  &quot;emulators&quot;: {<br>    &quot;ui&quot;: {<br>      &quot;enabled&quot;: true,<br>      &quot;port&quot;: &quot;4000&quot;<br>    },<br>    ...<br>  }<br>}</pre><p>This JSON configuration specifies the ports and settings for each Firebase service you wish to emulate.</p><h3>Running the Emulator</h3><p>With the Dockerfile and docker-compose configurations in place, you can start the emulator using the following command:</p><pre>docker compose up --build</pre><p>This command builds the Docker image (if necessary) and starts the container running the Firebase Emulator Suite. You can then access the Firebase Emulator UI by navigating to http://localhost:4000 in your web browser.</p><h3>Conclusion</h3><p>By dockerizing the Firebase emulator, you streamline your development and testing workflows, ensuring a consistent environment that closely mirrors the production setup. This guide provides a foundational setup that you can customize and extend based on your project’s specific needs. For more information and advanced configurations, refer to the Firebase documentation and the <a href="https://github.com/thoughtgears/docker-firebase-emulator">Docker Firebase Emulator GitHub repository</a>.</p><p>Happy coding!</p><p>This content has been generated from the work of the GitHub repository to explain in the post how it is working! Have a look at the repo to run the emulator in docker or just include the image from the GHCR.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c3c33fd92c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DBT serverless in Google Cloud]]></title>
            <link>https://medium.com/@jens.skott_65388/dbt-serverless-in-google-cloud-39bd73e42b29?source=rss-b792813e732a------2</link>
            <guid isPermaLink="false">https://medium.com/p/39bd73e42b29</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[dbt]]></category>
            <category><![CDATA[cloud-run-job]]></category>
            <dc:creator><![CDATA[Jens Skott]]></dc:creator>
            <pubDate>Fri, 18 Aug 2023 08:21:11 GMT</pubDate>
            <atom:updated>2023-08-18T08:21:11.806Z</atom:updated>
            <content:encoded><![CDATA[<p>My story begins, with as many other peoples, trying to solve a problem that would help me in my day-to-day life. My problem was that I had so many data sources and dashboards to look at to understand my data, then took all that data into some other source, like Google Sheets or a Slide, to either dig deeper into it or present it to someone.</p><p>So my journey begins by understanding the data world and how it should work, how I should architect the data platform and how to get data into the platform and then transform it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9_zFFUVJhFOiYRtja7Geg.jpeg" /></figure><p>Since I am a true Google fanboy due to the simplicity and power of the Google Cloud Platform, I started researching my simple yet exciting problem and how to solve it using tools in the platform. Reading papers on data platforms in Google and architecture around how to build a scalable and sustainable platform, I devised a plan that included BigQuery, Looker Studio and DBT.</p><ul><li><a href="https://cloud.google.com/resources/googlecloud-unified-analytics-data-platform-paper">Build a modern, unified analytics data platform with Google Cloud</a></li><li><a href="https://docs.getdbt.com/docs/introduction">What is dbt? | dbt Developer Hub</a></li></ul><p>I am not a data engineer or will ever claim to be one, so this is my take on how to unify data needed as a platform engineer, cloud engineer and developer with a day job as Head of Engineering.</p><h3>Building out the platform</h3><p>I have built the infrastructure of the data platform in terraform using a factory methodology to ensure I can reuse the same components for 1 to 1000+ resources that do the same thing, this is a widespread pattern nowadays for building infrastructure and IAC where it abstracts the actual resources for the consumer, and they can focus on a few key elements that build for their needs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*K2dpbnhd9jzLHoUHVldIWQ.jpeg" /></figure><h4>The Factory</h4><p>It comprises a few things, a main factory module for terraform and some core and extra modules to build out core and optional resources.</p><pre>module &quot;projects&quot; {<br>  for_each = local.projects<br>  source   = &quot;./modules/gcp-data-project-factory&quot;<br><br>  name               = local.projects.storage.name<br>  billing_account_id = var.billing_account_id<br>  organization_id    = var.organization_id<br><br>  datasets        = each.value.datasets<br>  storage_buckets = each.value.storage_buckets<br>}</pre><p>It will allow us to scale projects up and down for different needs. This will also allow us to build the proposed architecture with the separation of concern for data storage, computing and consumers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E64nVeq_HhJJUCHwNf3y2w.png" /></figure><p>We can now feel confident that we have security for reading the data, writing to the storage project and who can access the curated data with the help of IAM and the access patterns with tagged data to support more granular access and later anonymisation of data when needed.</p><p><a href="https://cloud.google.com/bigquery/docs/column-level-security-intro">Introduction to column-level access control | BigQuery | Google Cloud</a></p><h3>The juicy part</h3><p>Now we come to what we have all been waiting for, the transformation of raw data into actual data that we can use. <br>My initial thought was to be 100% Google, and I started looking at Dataform to keep it in the family. But eventually, after writing my sqlx and trying to make sense of how to bring this to production with a stable CI/CD, I got introduced to DBT, which I thought was a fantastic tool with the native Jinja templates and the macros. It also allowed me to be more flexible in my choices of targets and sources. My main problem was, how do I run this serverless since I do not want to run an “always on” compute engine for jobs that run for 5 minutes every night?</p><p>I found a few posts about how to run DBT serverless in a cloud run. One of them is <a href="https://www.dumky.net/posts/own-your-web-analytics-pipeline-for-0.02-per-day-snowplow-terraform-dbt-bigquery-and-docker/">https://www.dumky.net/posts/own-your-web-analytics-pipeline-for-0.02-per-day-snowplow-terraform-dbt-bigquery-and-docker/</a> that seemed way too advanced for my simple needs right now, need to trigger a run and a test once every night. <br>The second one I stumbled across was how I would run DBT in a Cloud Run service wrapped in a GO HTTP server that executed os level commands on a GET request. <a href="https://github.com/meteatamel/cloudrun-tutorial/blob/master/docs/scheduled-dbt-service-bigquery.md">https://github.com/meteatamel/cloudrun-tutorial/blob/master/docs/scheduled-dbt-service-bigquery.md</a><br>That seemed not as preferable as I had hoped, so I started thinking and tinkering around with different options and remembered that Cloud Run now has something called Jobs.</p><p><a href="https://cloud.google.com/run/docs/create-jobs">https://cloud.google.com/run/docs/create-jobs</a><br><a href="https://cloud.google.com/blog/products/serverless/cloud-run-jobs-and-second-generation-execution-environment-ga">https://cloud.google.com/blog/products/serverless/cloud-run-jobs-and-second-generation-execution-environment-ga</a></p><p>Cloud Run jobs would allow me to run what I want in a container without the constraints that I need to make an HTTP request to the container to trigger what I want to do in it. This is perfect for my needs.</p><h3>DBT in Cloud Run jobs</h3><p>Setting up Cloud Run jobs in GCP is not very hard. You need access to a container in the job and a service account with access to what resources you want to consume or push to in GCP.</p><pre>resource &quot;google_cloud_run_v2_job&quot; &quot;this&quot; {<br>  project  = var.project_id<br>  name     = local.base_name<br>  location = var.region<br><br>  template {<br>    task_count  = 1<br>    parallelism = 1<br>    labels      = local.base_labels<br>    template {<br>      timeout               = &quot;900s&quot;<br>      service_account       = var.service_account_email<br>      execution_environment = &quot;EXECUTION_ENVIRONMENT_GEN2&quot;<br>      max_retries           = 3<br>      containers {<br>        image = local.base_image<br>        dynamic &quot;env&quot; {<br>          for_each = var.env_vars != null ? var.env_vars : []<br>          content {<br>            name  = env.value.name<br>            value = env.value.value<br>          }<br>        }<br>        dynamic &quot;env&quot; {<br>          for_each = var.secret_env_vars != null ? var.secret_env_vars : []<br>          content {<br>            name = env.value.name<br>            value_source {<br>              secret_key_ref {<br>                secret  = env.value.secret_id<br>                version = env.value.version == null ? &quot;latest&quot; : env.value.version<br>              }<br>            }<br>          }<br>        }<br>        resources {<br>          limits = {<br>            cpu    = var.cpu<br>            memory = var.memory<br>          }<br>        }<br>      }<br>    }<br>  }</pre><p>You can then trigger this job in mulitple ways: <br>* Cloud Scheduler<br>* Google Workflows<br>* Other Jobs<br>* EventArc -&gt; Google Workflows<br>* Manual</p><p>There is an option to run with a service account that requires a JSON key to run with. The reason why I have set up a secret_key_ref in the run specification, but looking deeper, it should also be possible without this KEY. <br><em>More to experiment with in the near future.</em></p><pre>dev:<br> type: bigquery<br> method: oauth<br> project: xxxxxx<br> dataset: xxxxxx_dataset</pre><p>Now continuing to the docker container:</p><pre>FROM python:3.9-slim<br><br>ENV MODEL=&quot;&quot;<br>ENV TARGET=&quot;dev&quot;<br>ENV KEY_FILE=&quot;&quot;<br><br>WORKDIR /dbt<br>COPY . .<br><br>RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends \<br>    git \<br>    &amp;&amp; rm -rf /var/lib/apt/lists/*<br><br># Install DBT and other dependencies<br>RUN pip install --no-cache-dir -r requirements.txt<br>RUN chmod +x entrypoint.sh<br><br># Ensure we have all packages installed in the container<br>RUN dbt deps<br><br>WORKDIR /dbt<br><br>ENTRYPOINT [&quot;./entrypoint.sh&quot;]</pre><p>This should be in your root of the DBT project, and it needs to contain the dbt_project.yml and models folder together with the entrypoint.sh file:</p><pre>#!/usr/bin/env bash<br><br>set -e<br><br>if [[ -z ${KEY_FILE} ]]; then<br>  echo &quot;KEY_FILE is not set&quot;<br>  exit 1<br>fi<br><br>if [[ -z ${TARGET} ]]; then<br>  echo &quot;TARGET is not set, needed for dbt profiles&quot;<br>  exit 1<br>fi<br><br>if [[ -z ${MODEL} ]]; then<br>  echo &quot;MODEL is not set, needed for dbt run to find the right model&quot;<br>  exit 1<br>fi<br><br>echo &quot;$KEY_FILE&quot; &gt; credentials.json<br>echo &quot;Running dbt with project ${DIR} and target ${TARGET} and model ${MODEL}&quot;<br><br>dbt run --profiles-dir ./profiles --target &quot;$TARGET&quot; --select &quot;$MODEL&quot;</pre><p>This should be all you need to run DBT in a Cloud Run job using a trigger to execute the job.</p><p>I have compiled an example repo of all the code here and a way to test it properly.</p><p><a href="https://github.com/thoughtgears/cloud-run-dbt">GitHub - thoughtgears/cloud-run-dbt: An example of how to run DBT in cloud run on a scheduled basis</a></p><p>This is <em>TO BE CONTINUED….</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*1HScuWIBOgPKoHjnhVotuQ.jpeg" /></figure><p>If you have any comments or questions, please don&#39;t hesitate to reach out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39bd73e42b29" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>