<?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 Goran Tubić on Medium]]></title>
        <description><![CDATA[Stories by Goran Tubić on Medium]]></description>
        <link>https://medium.com/@mail.goran96?source=rss-a6570cec9f22------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VghJSRjiNjWsajXAzUIjqg.jpeg</url>
            <title>Stories by Goran Tubić on Medium</title>
            <link>https://medium.com/@mail.goran96?source=rss-a6570cec9f22------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 03:47:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mail.goran96/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[From 454 to 255 Endpoints in 27 Days: Turning AI Prototype into an Enterprise Backend]]></title>
            <link>https://medium.com/@mail.goran96/from-454-to-255-endpoints-in-27-days-what-a-backend-rewrite-taught-me-about-ai-and-scope-f03e92e3a741?source=rss-a6570cec9f22------2</link>
            <guid isPermaLink="false">https://medium.com/p/f03e92e3a741</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[technical-leadership]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Goran Tubić]]></dc:creator>
            <pubDate>Sun, 19 Apr 2026 21:34:32 GMT</pubDate>
            <atom:updated>2026-04-28T09:12:33.851Z</atom:updated>
            <content:encoded><![CDATA[<h3>When I joined the project, the backend was already “working.”</h3><p>A non‑developer had vibecoded the first version with AI and a batteries‑included framework. My job was triage: make the MVP breathe, fix the worst bugs, and get us to real users. It did its job — we got validation and paying customers.</p><p>Then an enterprise prospect showed up and asked all the boring but important questions:</p><ul><li>Where exactly is our data stored?</li><li>Who can access production?</li><li>Can we get a DPA, data residency details, and an on‑prem option?</li><li>Do AI calls stay in the EU?</li></ul><p>Our honest answer was basically: “It runs somewhere, and we think it’s fine.”</p><p>That’s when I decided: as soon as we had validation, the codebase that got us here would not be the one we scale on.</p><h3>The audit: 454 endpoints, ~180 used</h3><p>Before rewriting anything, I measured what we had.</p><ul><li><strong>454 endpoints</strong> defined on the backend</li><li>The frontend actually used <strong>around 180</strong> of them</li></ul><p>So roughly <strong>274 endpoints were never called</strong>. Entire router modules had zero usage. Some were half‑implemented ideas, some were experiments, and many were just “AI generated it when someone asked for a new route.”</p><p>Unused endpoints are more than clutter; they’re extra attack surface, extra places for broken auth to hide, and extra mental load for anyone who has to work on the code. This wasn’t a refactor job. It was a rewrite — not just to delete routes, but to fix the architecture, performance, and security story underneath them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHuzqjg998qfWPm3MLWDpg.png" /></figure><h3>AI’s plan vs reality</h3><p>For the new backend, I used AI as a planning tool. After a few iterations describing the product and workflows, we landed on a clean design with <strong>about 200 endpoints</strong> for a sane, well‑structured backend, and that felt right.</p><p>In contrast, the old backend had <strong>454 endpoints</strong> with only <strong>around 180</strong> actually used. The goal for the rewrite was simple: move the system closer to the <strong>200‑endpoint plan</strong> than to the <strong>454‑endpoint reality</strong>.</p><p>In the first backend, AI mostly generated endpoints: every new idea became a new route, and nobody edited the architecture. In the rewrite, AI still generated scaffolding and tests, but it stopped being the architect. It suggested structure; I decided what shipped. That editorial layer is the difference between 454 chaotic endpoints and 255 intentional ones.</p><h3>The rewrite: 27 days, ~90k lines</h3><p>I started the rewrite with a rough estimate of two weeks. In reality, it took about three and a half weeks, and instead of the ~60k lines we expected, I wrote closer to 90k.</p><p>The final backend plus tests landed at 94,965 lines of application code and 85,989 lines of tests, <strong>180,954 lines in total</strong>. Tests make up roughly <strong>47.5%</strong> of the codebase — for every line of app code, there’s about <strong>0.9 lines of tests</strong>.</p><p>And it wasn’t just tests: <strong>we fixed</strong> N+1 queries, simplified the database footprint, added the right joins and indexes, and took some basic views from more than three seconds down to “feels instant”.</p><p>For a startup, that sounds excessive. For something you want enterprise security to sign off on, it’s about right.</p><p>After the rewrite and new frontend wiring, the backend settled at 255 endpoints — the same product surface, but mapped onto a cleaner, more predictable architecture. Only 5 endpoints are unused, and 34 are genuinely new features.</p><p>Compared to the original <strong>454‑endpoint</strong> backend with ~274 dead routes, that’s roughly a <strong>44% reduction in surface area</strong> and almost all of it now in active use.</p><p>AI’s original <strong>~200‑endpoint</strong> plan turned out to be surprisingly accurate; the real problem was how the first version was built. <strong>AI with no boundaries</strong> gave us 454 endpoints and lots of dead code, while <strong>AI with constraints</strong> produced 255 endpoints that actually map to product behavior.</p><h3>What actually changed</h3><p>The endpoint count is the visible part. Underneath, the rewrite really did three important things.</p><ol><li><strong>Stack alignment.</strong><br>The backend moved to Node.js/NestJS to align with the frontend, simplify types and tooling, and make it easier to share patterns.</li><li><strong>Infra we can explain.</strong><br>Clear separation between API and worker processes, Postgres + Redis as first‑class citizens, and proper environments: local, staging, production, on‑prem.</li><li><strong>Compliance story.</strong><br>Data and AI calls stay in the EU, DPAs/GDPR are covered, and there’s a real on‑prem path if a customer wants it.</li></ol><p>The end result isn’t just cleaner code; it’s a system I can talk about with security, procurement, and future engineers without hand‑waving.</p><h3>Why this rewrite was worth it 🚀</h3><p>In the end, we didn’t just go from <strong>454 to 255 endpoints</strong> — about a <strong>44% reduction</strong> in surface area. We went from “it runs on some platform somewhere” to an architecture I can explain to security, procurement, and future engineers in a single meeting.</p><p>Along the way we added <strong>nearly 1:1 tests to code</strong> (from essentially none before), fixed several <strong>N+1 query issues</strong>, removed unnecessary databases and extra round‑trips, added <strong>joins and indexes</strong> where they were missing, and took basic views that used to wait over <strong>3 seconds</strong> down to something that actually feels snappy.</p><p>The first version, built by a non‑developer with AI, was enough to prove the idea. The rewrite, with guardrails, fewer endpoints, real tests and a sane architecture, is what makes it <strong>safe to bet a roadmap</strong> — and an enterprise deal — on it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f03e92e3a741" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trying Out Angular Signal Forms: Installing Angular from GitHub in Your Project]]></title>
            <link>https://medium.com/@mail.goran96/trying-out-angular-signal-forms-installing-angular-from-github-in-your-project-de94401e470f?source=rss-a6570cec9f22------2</link>
            <guid isPermaLink="false">https://medium.com/p/de94401e470f</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[signal]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[angular-forms]]></category>
            <dc:creator><![CDATA[Goran Tubić]]></dc:creator>
            <pubDate>Fri, 05 Sep 2025 11:57:40 GMT</pubDate>
            <atom:updated>2025-09-05T11:57:40.700Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes the coolest features are not available on npm yet. The live in in prototype branches on GitHub, waiting to be tested and refined. If you are curious (like me) and want to play with something new that was not yet released — say, at the time of writing this article, the experimental Signal Forms branch — you’ll quickly run into a wall:</p><p>👉 You can’t just do npm install angular@prototype/signal-forms.</p><p>Angular does not publish every branch as an npm package. What you can get is raw source code from GitHub, not something your project can install.</p><p>That means if you want to try the new prototype features you will need to build angular yourself and install it locally. Sounds scary, but it is not too bad once you know the steps.</p><p>And what are Angular Signal Forms? Let’s walk through it all together.</p><h3>Angular Forms powered by Signals?</h3><p>Instead of the old ReactiveFormsModule or Template-driven forms, this new API makes forms feel closer to your data model and much more reactive by default.</p><p>Signal Forms make working with forms in Angular feel effortless. Your data becomes the single source of truth: update the signal and the form changes, update the form and the signal follows. Two-way sync just works. 🚀</p><p>They’re also typed and reactive out of the box. With form(), Angular builds the full form graph for you, giving each field strong typing along with value, validation state, errors, and more—without extra setup.</p><p>Best of all, your form structure mirrors your data model. If your model is nested, your form is too. No messy mapping, no boilerplate — just clean, predictable code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*B_UQ-200g0ahhEKEYLHBPg.png" /><figcaption>Code example using Angular Signal Forms instead of (soon to be deprecated) <em>FormGroup</em></figcaption></figure><h3>Step 1: Clone Angular and checkout the branch</h3><p>Head to the Angular repo and grab the branch you want. In this example we will use <a href="https://github.com/angular/angular/tree/prototype/signal-forms">prototype/signal-forms</a> branch:</p><pre># download the code<br>git clone https://github.com/angular/angular.git<br><br># change directory<br>cd angular<br><br># change to corresponding branch<br>git checkout prototype/signal-forms<br><br># install packages<br>pnpm install<br><br># build dist folder<br>pnpm build</pre><p>This will compile Angular and place build artifacts inside dist/packages-dist/.</p><h3>Step 2: Create tarballs — pack packages using npm</h3><p>npm can’t directly install from dist/ folders. Instead, you need to create tarballs files (just like the Angular team does when publishing to npm). To do this visit each project (or just one you need) in previously built dist/packages-dist/ folder:</p><pre># go to packages-dist folder<br>cd dist/packages-dist<br><br># make a package for core<br>cd core<br>npm pack<br><br># make a package for common<br>cd ../common<br>npm pack<br><br># make a package for forms<br>cd ../forms<br>npm pack<br><br># make a package for compiler<br>cd ../compiler<br>npm pack<br><br># make a package for router<br>cd ../router<br>npm pack<br><br># make a package for platform-browser<br>cd ../platform-browser<br>npm pack</pre><p>This will prepare packages and place build *.tgz files likedist/packages-dist/{package-name}/{package-name}-{version}-{prject-sha}.tgz.</p><h3>Step 3: User the tarballs in your project</h3><p>Her I assume that you already have your own project set up. If not follow angular official guide to <a href="https://angular.dev/installation#set-up-a-new-project-locally">setup a new project locally</a>.</p><p>In your app’s package.json file, replace Angular dependencies with the tarballs.</p><pre>&quot;dependencies&quot;: {<br>  &quot;@angular/core&quot;: &quot;file:${path_to_angular_dist_folder}/angular-core-${version_and_sha}.tgz&quot;,<br>  &quot;@angular/common&quot;: &quot;file:${path_to_angular_dist_folder}/angular-commo$n-{versi_n-a_d-sha}.tgz&quot;,<br>  &quot;@angular/forms&quot;: &quot;file:${path_to_angular_dist_folder}/angular-forms$-{versio_-an_-sha}.tgz&quot;,<br>  &quot;@angular/compiler&quot;: &quot;file:${path_to_angular_dist_folder}/angular-compi$ler-{ver_ion_and-sha}.tgz&quot;,<br>  &quot;@angular/router&quot;: &quot;file:${path_to_angular_dist_folder}/angular-route$r-{versi_n-a_d-sha}.tgz&quot;,<br>  &quot;@angular/platform-browser&quot;: &quot;file:${path_to_angular_dist_folder}/angular-platf$orm-brow_er-_version-and-sha}.tgz&quot;<br>}</pre><p>Then install:</p><pre># remove old packages and package-lock<br>rm -rf node_modules package-lock.json<br><br># install new packages<br>npm install</pre><h3>Step 4: Use the experimental feature in your app</h3><p>Now try updating your code and importing your new feature in your project — for my specific example importing signal form looked like import { form } from ‘@angular/forms/signals’ .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*a7R4Q24JDvQDWnpClQwJ4w.png" /><figcaption>Using experimental form signals in html file</figcaption></figure><h3>Conclusion</h3><p>That’s it! 🎉 You now have Angular running directly from a GitHub branch in your project.</p><p>This method is super handy for experimenting with prototype features like <strong>Signal Forms</strong>, or even testing bugfixes that haven’t shipped to npm yet.</p><p>Just keep in mind:</p><ul><li>These builds are <strong>experimental</strong> — APIs may change or break.</li><li>Some libraries may not yet support the version you’re testing.</li></ul><p>But if you’re the adventurous type, this is the best way to stay ahead and explore Angular’s future today. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de94401e470f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>