<?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 Mehul Patel on Medium]]></title>
        <description><![CDATA[Stories by Mehul Patel on Medium]]></description>
        <link>https://medium.com/@nomadicmehul?source=rss-41c718ef6ac3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*3AFYhdZcMqz_uLMEg4ypig.jpeg</url>
            <title>Stories by Mehul Patel on Medium</title>
            <link>https://medium.com/@nomadicmehul?source=rss-41c718ef6ac3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 15:10:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nomadicmehul/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[I Ran One Command and My Class Became an npm, PyPI and NuGet Package at Once ( Part I )]]></title>
            <link>https://medium.com/@nomadicmehul/i-ran-one-command-and-my-class-became-an-npm-pypi-and-nuget-package-at-once-part-i-5a836a59f9c9?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a836a59f9c9</guid>
            <category><![CDATA[graftcode]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 15:54:49 GMT</pubDate>
            <atom:updated>2026-11-11T15:56:10.934Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNFc1b5sAA8XPa2JH2bPRA.png" /></figure><blockquote>Meet gg — the <a href="https://github.com/grft-dev/graftcode-gateway">Graftcode Gateway</a> CLI. Install it, point it at six lines of code, and watch it host, discover, and print install commands for seven package managers before you&#39;ve written a single line of glue code.</blockquote><p>Here’s the smallest useful thing I could build to test a new CLI.</p><pre>class Greeter {<br>  static greet(name) {<br>    return `Hello, ${name}! This came from a Graftcode module.`;<br>  }<br>}<br><br>module.exports = { Greeter };</pre><p>One class. One static method. No imports, no decorators, no package.json scripts to wire up. I wanted to see how fast I could go from &quot;nothing installed&quot; to &quot;this method is a real, installable dependency somewhere else.&quot; Turns out: about ninety seconds, most of it spent watching a progress bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*XJwqsyVnRQTyXHArTC5Ojw.jpeg" /></figure><p>This is the whole on-ramp to <a href="https://graftcode.com/">Graftcode</a>: install the gateway, point it at code, get a package. No account, no Docker required for this part. Here’s exactly what happened.</p><h3>Step 1: Install gg — one line, no container</h3><pre>curl -fsSL grft.dev/get/gg | sh      # macOS / Linux<br>iwr grft.dev/get/gg | iex            # Windows</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9klQ8YCCnKHJRe8kxhlJ2Q.png" /></figure><p>That’s it. It drops a gg binary in your current directory — no system install, nothing added to your PATH unless you want it there. Verify it landed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PUohNh8-2qJaN3x_Zut3g.png" /></figure><pre>./gg --help</pre><p>You get a full flag list: --modules, --runtime, --port, --httpPort, --projectKey, and about fifteen more. You won&#39;t need most of them today. Docker is the <em>other</em> way to run it — the way I used in later posts — but for a first run, the one-liner is faster and there&#39;s nothing to clean up after.</p><h3>Step 2: Point it at the class</h3><pre>./gg --modules .</pre><p>That’s the entire invocation. No config file, no manifest describing what to expose. gg scans the current directory, figures out it&#39;s looking at Node.js, loads index.js, and finds Greeter.greet on its own:</p><pre>[Info] WebSocket server: Enabled on port: 80<br>[Info] Graftcode Vision: Enabled on port: 81<br>[Info] Type enabled: Greeter<br>[Info] Install your module with:<br>FOR NPM PROJECT:<br>npm install --registry https://grft.dev/&lt;GUID&gt;__free @graft/npm-hello-gg@1.0.0<br>FOR NUGET PROJECT:<br>dotnet add package graft.npm.hello-gg -v 1.0.0 --source https://grft.dev/&lt;GUID&gt;__free<br>FOR PYPI PROJECT:<br>pip install --extra-index-url https://grft.dev/simple/&lt;GUID&gt;__free graft-npm-hello-gg==1.0.0<br>FOR MAVEN / RUBYGEMS / PACKAGIST PROJECT:<br>...<br>Graft Vision is available on http://localhost:80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZosVulDL18l34q66D6OOlA.png" /></figure><p>Read that again: one class, seven install commands, one for every package manager Graftcode supports. I didn’t pick a target language or write a manifest. gg inspected the method signature and generated a typed client for whichever ecosystem you&#39;re about to consume it from.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*UahX0fJOct1PJzCi9M-VUw.jpeg" /></figure><h3>Step 3: Open Vision and call it before writing any client code</h3><p>gg also starts a small web UI — Graftcode Vision — on that same port. Open http://localhost/GV, find Greeter.greet, click &quot;<strong>Try it out</strong>&quot;, type a name, hit call. The method runs live, in the browser, before a single consuming project exists. That&#39;s the fastest way to prove the thing is real before you commit to wiring anything up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bub1eUPRmJgYZN9_HIrmAQ.png" /></figure><h3>Step 4: Install it somewhere else and call it for real</h3><p>The whole point of “package,” not “endpoint,” is that any other project can depend on it like a normal dependency. In a completely separate folder:</p><pre>mkdir call-greeter &amp;&amp; cd call-greeter<br>npm init -y<br>npm install --registry https://grft.dev/&lt;GUID&gt;__free @graft/npm-hello-gg@1.0.0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZwi1JyOOluDlrYpgPVUqg.png" /></figure><pre>// call.mjs<br>import { Greeter, GraftConfig } from &quot;@graft/npm-hello-gg&quot;;<br><br>GraftConfig.host = &quot;ws://localhost/ws&quot;;<br>GraftConfig.stateless = true;<br><br>console.log(await Greeter.greet(&quot;Graftcode&quot;));</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvOkH9OoeGyM1S21a0aJmQ.png" /></figure><pre>node call.mjs<br># → Hello, Graftcode! This came from a Graftcode module.</pre><p>That string crossed a process boundary — a real WebSocket call, a real network round-trip and came back looking exactly like a local function call. No fetch, no route, no response body to parse.</p><p>One thing worth knowing before you copy a command from this post: <strong>the registry GUID rotates every time </strong><strong>gg restarts</strong>. Don&#39;t reuse the install command above — copy the current one from your own terminal, or from curl localhost/npm.</p><h3>Why this matters more than “a CLI installed cleanly”</h3><p>The interesting part isn’t the installer, plenty of tools have a one-line install script. It’s that the entire integration story discover the method, generate a typed client, print the exact install command, for seven ecosystems, from one run happens <strong>before you’ve decided who’s going to consume it.</strong> You don’t pick a target stack up front. You write the method, run gg, and the client shows up for whichever language asks.</p><p>If you want your editor to default to building things this way — public methods as the contract, gg doing the hosting, no REST scaffolding Graftcode also publishes an AI-assistant rules file (CLAUDE.md + language-specific rules) you can drop into any project:</p><pre>curl -fsSL grft.dev/get | sh        <br># macOS / Linux   (Windows: iwr grft.dev/get | iex)</pre><p>That’s a different, longer story covered in the two posts linked below, where an AI assistant generates a REST API by default without it and a clean Graftcode module with it.</p><h3>Try it yourself (no account, no Docker required)</h3><p>Every command in this post is copy-pastable as-is and has the exact steps, plus the bare-function gotcha above written up in full.</p><p><strong>You’ll need:</strong> Node.js. That’s the entire list — no Docker, no account, no Graftcode SDK to install first.</p><p><strong>You’ll know it worked when:</strong> gg --modules . prints install commands for seven package managers, Vision&#39;s &quot;<strong>Try it out</strong>&quot; returns your greeting in the browser, and a completely separate node call.mjs prints the same greeting after crossing the network.</p><p>🌐 <strong>Start here for the whole ecosystem:</strong> <a href="https://github.com/grft-dev/graftcode">github.com/grft-dev/graftcode</a></p><p>🌱 <strong>Explore more about Graftcode Gateway :</strong> <a href="https://github.com/grft-dev/graftcode-gateway">github.com/grft-dev/graftcode-gateway</a></p><p>This was the on-ramp one CLI, one class, seven packages. Next up: the same gg, but calling a <strong>Python</strong> method from a <strong>Node</strong> storefront — a real cross-language use case, not a toy. That&#39;s <a href="https://medium.com/@nomadicmehul/my-storefront-is-in-node-my-finance-teams-formula-is-in-python-i-never-wrote-an-api-part-ii-c247afef16d4?postPublishedType=initial">Part 2</a></p><p>If this saved you from wondering whether a CLI install was going to eat your afternoon, drop a clap, send it to whoever’s about to hand-roll a fourth SDK this month, and go graft something. 🌱</p><p><em>Built with a throwaway </em><em>Greeter class so you can run every step yourself in under two minutes — no shared demo server, no account, no catch.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a836a59f9c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Storefront Is in Node. My Finance Team’s Formula Is in Python. I Never Wrote an API. ( Part II )]]></title>
            <link>https://medium.com/@nomadicmehul/my-storefront-is-in-node-my-finance-teams-formula-is-in-python-i-never-wrote-an-api-part-ii-c247afef16d4?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/c247afef16d4</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[graftcode]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 15:53:50 GMT</pubDate>
            <atom:updated>2026-11-11T15:53:50.960Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SBbIWzOAkhw6HJOZ5XzRiA.png" /></figure><blockquote>A LoanCalculator.monthly_payment(...) method, written in Python, called directly from a Node/Express product page. No FastAPI wrapper, no OpenAPI spec, no generated client, and no re-implementing the amortization formula in JavaScript.</blockquote><p>Here’s a scenario that shows up in every company past a certain size.</p><p>The finance team owns the loan-payment math — an amortization formula, the kind with a monthly rate and an exponent in it, the kind you do not want two teams maintaining two copies of. The storefront team, meanwhile, is in Node, and they need one number: what does this thing cost per month, today, on the product page.</p><p>Normally that gap becomes a project. Someone stands up a small Python service. Someone else writes an OpenAPI spec for it. The Node team generates or hand-writes a client. Someone adds a fallback for when the Python service is slow. A ticket gets filed six months later because the formula changed and the spec didn’t.</p><p>I skipped all of it. Here’s the whole thing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Z1aMmSrZluI8Ah-EXZSCAQ.jpeg" /></figure><h3>Quick recap for anyone who missed the CLI intro</h3><p>In the last <a href="https://medium.com/@nomadicmehul/i-ran-one-command-and-my-class-became-an-npm-pypi-and-nuget-package-at-once-part-i-5a836a59f9c9">post</a> I installed <a href="https://graftcode.com/">Graftcode</a>’s CLI — gg — with a one-line script, pointed it at a six-line JavaScript class, and got install commands for seven package managers back. This post is the same gg, same idea, but proving the part that actually matters: <strong>it doesn&#39;t care what language wrote the code, or what language is about to call it.</strong></p><h3>Step 1: The formula lives in exactly one place</h3><pre>class LoanCalculator:<br>    @staticmethod<br>    def monthly_payment(principal: float, annual_rate_pct: float, months: int) -&gt; float:<br>        if months &lt;= 0:<br>            raise ValueError(&quot;months must be positive&quot;)<br>        if annual_rate_pct == 0:<br>            return round(principal / months, 2)<br>        monthly_rate = annual_rate_pct / 100 / 12<br>        factor = (1 + monthly_rate) ** months<br>        payment = principal * monthly_rate * factor / (factor - 1)<br>        return round(payment, 2)</pre><p>A plain Python class, one static method, real type hints. No Flask, no FastAPI, no route decorator in sight. This is what “the finance team owns the math” looks like when nobody’s asked them to also own an API.</p><h3>Step 2: Host it — same gateway as always</h3><pre>docker build --no-cache --pull -t loan-calculator-py:test .<br>docker run -d -p 80:80 -p 81:81 --name graftcode_loan_calculator loan-calculator-py:test</pre><p>The Dockerfile is short: a Python base image, the two source files, and gg at the end. Once it&#39;s up:</p><pre>curl -sS --max-time 5 http://localhost:80/npm<br># → npm install --registry https://grft.dev/&lt;GUID&gt;__free @graft/pypi-loan-service@1.0.0</pre><p>That &lt;GUID&gt; is yours, not mine and without a --projectKey it&#39;s regenerated every time the container restarts. So re-run the curl and copy what it prints <em>now,</em> don&#39;t reuse an install command from an earlier run (or from this post).</p><p>Notice the package manager: <strong>npm</strong>. The gateway hosted a Python method and is handing out a JavaScript-consumable package for it, because that’s what I asked for. Same gateway, same auto-generated client story as Part 1 — just crossing an actual language boundary this time instead of staying in one.</p><p>Here’s the part I didn’t expect to matter as much as it did: I never told gg this was Python. The Dockerfile&#39;s CMD is just gg --modules ./loan-service/ — no --runtime flag. Checked the logs to be sure it wasn&#39;t silently falling back to something:</p><pre>docker logs graftcode_loan_calculator | grep -i runtime<br># [Info] Hosted runtime: auto<br># [Info] Launching runtime: python</pre><p>auto is the default when no --runtime is set; python is what gg actually launched, after reading loan_calculator.py + pyproject.toml itself. I also ran it the explicit way — gg --modules ./loan-service/ --runtime python — and got the identical service and install command. So the flag exists for when you want to be certain (a folder with more than one language in it, say), but it isn&#39;t doing the real work here. The auto-detection is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*HjhUUly6gjHFhi8znoecww.jpeg" /></figure><h3>Step 3: The storefront just imports it</h3><pre>import express from &quot;express&quot;;<br>import { LoanCalculator, GraftConfig } from &quot;@graft/pypi-loan-service&quot;;<br><br>GraftConfig.host = &quot;ws://localhost/ws&quot;;<br>GraftConfig.stateless = true;<br><br>const PRODUCT = { name: &quot;Laptop Pro 14&quot;, priceEUR: 1200 };<br>const TERM_MONTHS = 12;<br>const APR_PCT = 9.9;<br><br>const app = express();<br><br>app.get(&quot;/&quot;, async (req, res) =&gt; {<br>  const monthly = await LoanCalculator.monthlyPayment(PRODUCT.priceEUR, APR_PCT, TERM_MONTHS);<br>  res.send(`&lt;h1&gt;${PRODUCT.name}&lt;/h1&gt;&lt;p&gt;&amp;euro;${PRODUCT.priceEUR}&lt;/p&gt;<br>            &lt;p&gt;from &amp;euro;${monthly.toFixed(2)}/month (${TERM_MONTHS} mo, ${APR_PCT}% APR)&lt;/p&gt;`);<br>});<br><br>app.listen(3000);</pre><pre>npm start, open http://localhost:3000:</pre><blockquote>Laptop Pro 14 — €1,200 or from €105.44/month (12 months, 9.9% APR)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8nTBA_aOfPEOQoihKMY0ww.png" /></figure><p>That €105.44 was computed in Python by the finance team’s exact formula and rendered by an Express route that has never seen Python in its life. The storefront doesn’t know an amortization formula exists as it just calls a method and gets a number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vn8jC_fWNI57H2-R9EWgMw.jpeg" /></figure><h3>Keeping it real: the naming gotcha that broke my first attempt</h3><p>I wrote LoanCalculator.monthly_payment(...) in Node the first time, because that&#39;s the Python name, and I&#39;d just been staring at the Python file. It failed immediately:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MWV9Dm-LC-OX1aZqcg36rw.png" /></figure><p>The generated client didn’t keep the Python spelling — it translated the method name to match the consuming language’s own convention. monthly_payment on the Python side becomes monthlyPayment on the JS side. Nothing broke; I just called a name that never existed in the package I&#39;d installed.</p><p>The fix takes ten seconds once you know to look: open the installed package’s .d.ts (or hit /libraries on the gateway) and use the name it actually printed, not the name you remember from the source file:</p><pre>cat node_modules/@graft/py-node-loan-calculator/LoanCalculator.d.ts<br># static monthlyPayment(principal, annualRatePct, months): Promise&lt;number&gt;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WDlKrt9Mw3tDEwNF_kTlQ.jpeg" /></figure><p>Naming is the one translation the generator does for you, so the whole fix is to read the generated file instead of the source file. Beyond names, the way to stay out of trouble is to keep public signatures boring: primitives (str, int, float, bool) and plain lists of them, with dates and ids as ISO-8601 strings. Those map cleanly into every consuming language, the full table of what becomes what is in the docs: <a href="https://docs.graftcode.com/core-concepts/type-mapping">type mapping</a>.</p><h3>Why this is the actual point, not a toy</h3><p>Part 1 proved gg could turn one class into seven install commands. This post proves the more useful half of that claim: <strong>the language that wrote the code and the language that calls it don&#39;t have to match, and nobody had to build a bridge between them.</strong> The finance team keeps their formula in Python, in one file, under their own tests. The storefront team gets a typed function call.</p><p>And when the formula changes a new fee, a different rounding rule — the storefront doesn’t have to do anything at all. The method still <em>runs</em> in the Python service, so a new implementation is live the moment that service redeploys; nobody reinstalls a package, nobody ships a consumer release. Only a change to the <strong>signature</strong> — a new parameter, a different return type needs a regenerated graft and an npm install on the consuming side. Not every code change is a dependency update, most of them aren&#39;t one at all.</p><h3>Try it yourself (Docker + Node, no account)</h3><p>Every command above is copy-pasteable, and the folder for this post is self-contained:</p><p>👉 <a href="https://github.com/grft-dev/graftcode-demos/tree/main/community/py-node-loan-calculator">finance-loan-calculator/ </a>— its README.md has the exact steps and the naming gotcha written up in full.</p><p><strong>You’ll need:</strong> Docker (running) and Node.js. No local Python install required — the container has it.</p><p><strong>You’ll know it worked when:</strong> curl localhost:80/npm returns an install command, and http://localhost:3000 renders <strong>&quot;Laptop Pro 14 — €1,200 — from €105.44/month.&quot;</strong></p><p>👉 <strong>Whole repo:</strong> <a href="https://github.com/grft-dev/graftcode-demos">github.com/grft-dev/graftcode-demos</a></p><p>🌐 <strong>Start here for the whole ecosystem:</strong> <a href="https://github.com/grft-dev/graftcode">github.com/grft-dev/graftcode</a></p><p>If you missed <a href="https://medium.com/@nomadicmehul/i-ran-one-command-and-my-class-became-an-npm-pypi-and-nuget-package-at-once-part-i-5a836a59f9c9">Part 1</a> — installing gg and running your first module — it&#39;s the prequel to this one.</p><p>One Python method, one Node storefront, one real number on the page. If that saved you from standing up a service just to cross a language boundary, drop a clap, send it to whoever’s about to write a Python wrapper API “just for the frontend,” and go graft something. 🌱</p><p><em>Built with a toy </em><em>LoanCalculator so you can run it end-to-end yourself — no shared demo server, no account, no catch.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c247afef16d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your AI Keeps Writing MCP Servers. I Fixed It With One File. (Part II)]]></title>
            <link>https://medium.com/@nomadicmehul/your-ai-keeps-writing-mcp-servers-i-fixed-it-with-one-file-part-ii-8674fe45dad0?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8674fe45dad0</guid>
            <category><![CDATA[graftcode]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Fri, 09 Oct 2026 10:59:26 GMT</pubDate>
            <atom:updated>2026-10-09T11:07:00.941Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5DY_417EfPTNnIcGQfjT7w.png" /></figure><p>I let Claude discover and call my real backend methods over MCP — no MCP server, no tool definitions, no JSON schemas. The method <em>is</em> the tool.</p><p><em>If you’ve touched MCP lately, you know the ritual.</em></p><p>You want your AI agent to call your code. Simple enough. So you go write an MCP server. Then tool definitions. Then JSON schemas describing every parameter. Then handler wiring to route the tool call back to the function that already existed the entire time.</p><p>You wrote a whole translation layer so a model could call a function <em>you already wrote.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*mEi07yCtoeTLrGbWk7S-Zg.jpeg" /></figure><h3>Quick recap for the Part 1 skippers</h3><p>The tool is <a href="https://graftcode.com/">Graftcode</a>. One sticky note:</p><blockquote>Write a method → run a tiny gateway → your code is callable from anywhere.</blockquote><p>In <a href="https://medium.com/@nomadicmehul/i-deleted-my-rest-api-and-my-react-app-didnt-even-notice-part-i-7313df98724a">Part 1</a>, I used it to make a React app call a .NET method as a typed npm package — no REST, no client code.</p><p>Here’s the plot twist for this post: the same gateway also speaks MCP. So the work that made my code callable by <em>apps</em> already made it callable by <em>AI</em>. I don’t do any of it twice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*DIapEixSRjvmzVdZzU8QWA.jpeg" /></figure><p><strong>Step 1: The backend is a plain JS module (nothing AI about it)</strong></p><pre>const NIGHTLY_RATES = { lisbon: 95, tokyo: 140, &quot;mexico-city&quot;: 70, reykjavik: 165 };<br>const DAILY_SPEND_PER_TRAVELER = 75;</pre><pre>class TripBudget {<br>  /** @param {string} city @returns {number} */<br>  static getNightlyRate(city) {<br>    return NIGHTLY_RATES[city.toLowerCase()] ?? 110;<br>  }</pre><pre>  /** @param {string} city @param {number} nights @param {number} travelers @returns {number} */<br>  static estimateTotal(city, nights, travelers) {<br>    const lodging = TripBudget.getNightlyRate(city) * nights;<br>    const spending = DAILY_SPEND_PER_TRAVELER * nights * travelers;<br>    return lodging + spending;<br>  }<br>}</pre><pre>module.exports = { TripBudget };</pre><p>Notice what’s <strong>not</strong> here: no `@modelcontextprotocol/sdk`. No `server.tool(…)`. No schema objects. No `inputSchema` with nested `properties` you copy-pasted and got subtly wrong.</p><p>Also notice that `NIGHTLY_RATES` table up top. Keep an eye on it. It’s private, and it’s going to <em>stay</em> private — that’s the punchline.</p><p><strong>Step 2: Host it (same gateway, one line)</strong></p><pre>docker run -d -p 80:80 -p 81:81 --name graftcode_tripbudget_mcp trip-budget-ai:test</pre><p>The gateway reads the module, exposes the public methods, and — because it speaks MCP — every one of them is now an MCP tool at http://localhost:81/GV. I did not register anything. I did not define anything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_58ZpCvXo3i1z6Ao3AK5Cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*0ly1fqjTYl4RbqfVd56kbw.jpeg" /></figure><p><strong>Step 3: Point Claude at it (it’s literally a URL)</strong></p><p><strong>Claude Code</strong> — one command:</p><pre>claude mcp add --transport http trip-budget http://localhost:80/mcp</pre><p><strong>Claude Desktop</strong> — a few lines in the config that bridge to the endpoint. That’s the <em>entire</em> integration. A URL.</p><p><strong>Step 4: Just… ask</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1SzlxB3NGcTlq_rceVP_FQ.png" /></figure><p>Claude is running <strong>my</strong> code. No prompt engineering. No tool definitions. No schema I had to keep in sync. <strong>The method is the tool.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*uwSw5V3QNgalz6PVXKvfJA.jpeg" /></figure><p><strong>The punchline: the private table stayed private</strong></p><p>Remember `NIGHTLY_RATES`? I checked what Claude could actually see. Two tools: `getNightlyRate` and `estimateTotal`. The rate table? <strong>Not there.</strong> It’s a module constant, not a public method, so it never got exposed.</p><p>You get the encapsulation for free. Public methods become tools; your internals stay yours. No “oops I accidentally exposed the pricing logic to an LLM” incident report.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*cpZOkAhiRdNnha_SqcawSQ.jpeg" /></figure><h4>Keeping it honest: the one gotcha</h4><p>There <em>was</em> a moment. When I first tried to also download the typed package version, Vision threw a warning: <strong>”Graft download requires filters — this module exposes complex types.”</strong></p><p>Plain JavaScript has no types, so the analyzer saw every parameter as `object` and shrugged.</p><p>The fix took thirty seconds — add JSDoc:</p><pre>/** @param {string} city @returns {number} */<br>static getNightlyRate(city) { ... }</pre><p>Now the analyzer sees `string` and `number`, and everyone’s happy.</p><p>Here’s the part I liked: <strong>the MCP tool-calling worked the entire time</strong>, warning or not — because MCP is dynamic. The types only mattered for the <em>downloadable package</em> path. Two integration styles, one module, and the strict one just needed a hint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*-FDTE9115cIMCF6LgpsPkA.jpeg" /></figure><h3>The real cheat code (same as Part 1): let the AI build it this way</h3><p>Graftcode publishes a rules file — CLAUDE.md + a .claude/rules/ folder, one per language. Same installer, run from your own project root:</p><pre>curl -fsSL grft.dev/get | sh        # macOS / Linux   (Windows: iwr grft.dev/get | iex)<br># → 1. Download Graftcode Rules file for your IDE  → 2. Claude Code</pre><p>Cursor, Copilot, Cline, and Windsurf are in the same menu. Browse them first if you’d rather: <a href="https://github.com/grft-dev/graftcode/tree/main/rules">grft-dev/graftcode → rules</a>.</p><p>Same setup as before: <strong>the module already exists.</strong> I’m asking the AI to expose code I already wrote, not to write it — so the logic is fixed and every difference between the two runs is boilerplate.</p><p><strong>The prompt, both times:</strong></p><blockquote>“Here’s my <em>TripBudget</em> module. Expose it so an AI agent can call these methods.&quot;</blockquote><ul><li><strong>Without the rules:</strong> Claude starts scaffolding an MCP server — a server file, tool definitions, JSON schemas, handler wiring. A twenty-line schema describing a two-line function. The exact thing we’re trying to avoid.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAWEjhSMUzveLulAzNPMrg.png" /></figure><ul><li><strong>With the rules:</strong> same prompt → Claude doesn’t touch index.js. It adds a Dockerfile that runs gg, and notes the public methods are already exposed as MCP tools. Done.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*os7WVRLh4OHuCrexb0rwoQ.png" /></figure><p>One file, and the AI builds the thing that makes <em>itself</em> useful — the right way.</p><p>Run it yourself. The starting point is in the repo at <a href="https://github.com/grft-dev/graftcode-demos/tree/main/community/js-mcp-backend/seed">js-mcp-backend/seed/</a> — the same module with neutral comments, so nothing in it hints at Graftcode or MCP. Ask the prompt above, git status, then add the rules and ask again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*PwfgMqfh1XuUpbC4aH2uZw.jpeg" /></figure><h4>The bigger point</h4><p>Here’s what actually got me. In Part 1, one class served a React app. In this post, the <em>same kind of class</em> served an AI agent. <strong>Same gateway. One source of truth.</strong></p><p>You don’t build one API for your app and a <em>separate</em> MCP layer for your AI. You write the method once, and both your product and your agents call the exact same code. No drift. No parallel universe of tool schemas slowly falling out of sync with reality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*MI4Jth84WmmDAWmpyS0VsA.jpeg" /></figure><h3>Try it (runs locally, no account)</h3><p>Every exact command — the Dockerfile, the claude mcp add line, the Claude Desktop bridge config — is in the repo, and the folder for <em>this</em> post is self-contained:</p><p>👉 <a href="https://github.com/grft-dev/graftcode-demos/tree/main/community/js-mcp-backend">js-mcp-backend/</a> — its README.md is the step-by-step: build, run, connect Claude, ask.</p><p><strong>You’ll need:</strong> Node.js, Claude (Code or Desktop), and either Docker or the one-line gg install.</p><p>Graftcode is <strong>free and open</strong> to use — no account, no signup, no key. Everything here ran locally against my own container.</p><p><strong>You’ll know it worked when: </strong>Claude lists getNightlyRate and estimateTotal as tools, Tokyo returns 140, and a 5-night Lisbon trip for 2 returns <strong>1225</strong> — and NIGHTLY_RATES is nowhere in the tool list.</p><p>Two things that trip people up: <strong>Claude loads MCP servers at launch</strong>, so fully restart it after adding the config. And this gateway version serves Vision and /mcp on<strong> port 80</strong>, not 81 — if a route is silent, that&#39;s usually why.</p><p><strong>Want to reproduce the with-vs-without result?</strong> <a href="https://github.com/grft-dev/graftcode-demos/tree/main/community/js-mcp-backend/seed">js-mcp-backend/seed/</a> has the neutral starting files and the exact prompt.</p><p>👉 <strong>Whole repo:</strong> <a href="https://github.com/grft-dev/graftcode-demos">https://github.com/grft-dev/graftcode-demos</a></p><p>🌐<strong> Start here for the whole ecosystem:</strong> <a href="https://github.com/grft-dev/graftcode">github.com/grft-dev/graftcode</a> — the official central Graftcode repo and the entry point to everything else.</p><p>If you missed <a href="https://medium.com/@nomadicmehul/i-deleted-my-rest-api-and-my-react-app-didnt-even-notice-part-i-7313df98724a">Part 1</a> — React calling a .NET method with no API — it’s the prequel to this one.</p><p>Zero MCP code. Private data stayed private. And a rules file made my AI build it all by default. If that’s your kind of magic, drop a clap, send it to whoever on your team is on their third hand-written MCP server this quarter, and go graft something. 🌱</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8674fe45dad0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Deleted My REST API and My React App Didn’t Even Notice (Part I)]]></title>
            <link>https://medium.com/@nomadicmehul/i-deleted-my-rest-api-and-my-react-app-didnt-even-notice-part-i-7313df98724a?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7313df98724a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[graftcode]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Fri, 09 Oct 2026 10:58:28 GMT</pubDate>
            <atom:updated>2026-10-09T11:08:28.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIDPstrLVMl2rDRyecIV4w.png" /></figure><p>How I got a React frontend to call a .NET method like it was a local function — no controller, no DTOs, no OpenAPI, no `fetch` client. Cross-language. In about 15 minutes.</p><p>Let me set the scene.</p><p>I had a method. Six lines of C#. Estimate a trip cost — three inputs, one number out. Kindergarten math, already written, already working.</p><p>All I wanted was for my React app to call it.</p><p>So I asked my AI. And it gave me a controller. A request DTO. A response DTO. A route. CORS config. A `fetch` client on the frontend. And — because it was feeling generous — an OpenAPI spec.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XgE3Nm5-gZoVBJ59Np0dSg.png" /></figure><p><strong>Five files. Wrapped around six lines that already worked.</strong></p><p>Not one of them changed what the code <em>does</em>. Every single one exists so the code can be <em>reached</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*rrZ3VT2eKXKaNl7lGHFZMg.jpeg" /></figure><p>This is the tax. The glue-code tax. We all pay it, every single time we want two pieces of code to talk. And we’ve paid it so long we stopped noticing the bill.</p><p>Today I stopped paying it. Here’s the whole trick.</p><p><strong>The idea: your method </strong><em>is</em><strong> the API</strong></p><p>The tool is called <a href="https://graftcode.com/"><strong>Graftcode</strong></a><strong> </strong>. The mental model fits on a sticky note:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DpR_xbdyO-HgOhsueYlnxA.png" /></figure><blockquote><strong>Write a method → install it → call it.</strong></blockquote><p>You write a normal class. You run a tiny gateway that points at it. And from <em>anywhere else</em> — a different language, a different repo, a different planet you install that class like an npm package and call its methods directly.</p><p>The installed package is called a “Graft.” No endpoints. No DTOs. No client code you hand-wrote at 2am while questioning your career.</p><p>Let me show you with the actual demo: a <strong>React</strong> frontend calling a <strong>.NET</strong> backend. Yes, across languages. No wrapper in between.</p><p><strong>Step 1: The backend is just… a class</strong></p><p>Here’s the entire backend. Look at how much <em>isn’t</em> here:</p><pre>public class TripBudget<br>{<br>    private const double DailySpendPerTraveler = 75d;</pre><pre>    public static double EstimateTotal(int nights, double nightlyRate, int travelers)<br>    {<br>        double lodging = nights * nightlyRate;<br>        double spending = nights * DailySpendPerTraveler * travelers;<br>        return lodging + spending;<br>    }<br>}</pre><p>No `[ApiController]`. No `[HttpPost]`. No attributes cosplaying as architecture. Just a public static method and the business logic. That’s the contract.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*qMa_9MHhzcI9mPrtbskDIw.jpeg" /></figure><p><strong>Step 2: Host it with the gateway</strong></p><p>You point the Graftcode Gateway (gg) at your compiled DLL. There are two ways to get gg, and I want to be clear that Docker is a <em>choice</em>, not a requirement.</p><p>Straight onto your machine — one line, no container:</p><pre>curl -fsSL grft.dev/get/gg | sh      # macOS / Linux<br>iwr grft.dev/get/gg | iex            # Windows</pre><p>Then just gg --modules TripBudgetService.dll and you&#39;re hosting.</p><p>Or in Docker, which is what I used here — mostly so the demo is reproducible on any machine without me knowing your setup:</p><pre>docker build -t tripbudget-dotnet:test .<br>docker run -d -p 80:80 -p 81:81 --name graftcode_tripbudget tripbudget-dotnet:test</pre><p>Same gateway either way. If you’re just poking at this on your laptop, the one-liner is faster.</p><p>On boot, the gateway reads your class, finds every public method, and exposes it. And here’s my favorite part — the part where you don’t dig through logs like a raccoon in a dumpster looking for the install command. You just hit a URL:</p><pre>curl -sS http://localhost:80/npm<br># → npm install --registry https://grft.dev/&lt;your-guid&gt;__free @graft/nuget-tripbudgetservice@1.0.0</pre><p>The gateway <em>prints the exact install command</em>. Copy, paste, done.</p><p>There’s also a little web UI (Graftcode Vision) where you can click “Try it out” and call your method right in the browser before you write a single line of frontend. Five nights, $120/night, two travelers → <strong>$1350.</strong> It’s alive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kow7GtTYX_Tyvcb-wmo_8w.png" /></figure><p><strong>Step 3: React calls .NET like it’s local</strong></p><p>Install the Graft with that command. Then:</p><pre>import { TripBudget, GraftConfig } from &quot;@graft/nuget-tripbudgetservice&quot;;</pre><pre>GraftConfig.host = &quot;ws://localhost/ws&quot;;<br>GraftConfig.stateless = true;</pre><pre>function App() {<br>  const [total, setTotal] = useState(null);<br>  useEffect(() =&gt; {<br>    TripBudget.EstimateTotal(5, 120, 2).then(setTotal);<br>  }, []);<br>  return &lt;h1&gt;Estimated trip cost: ${total?.toFixed(2)}&lt;/h1&gt;;<br>}</pre><p>`<em>npm run dev</em>`, and the page renders <strong>”Estimated trip cost: $1350.00&quot;</strong> — a number computed in <strong>.NET</strong>, rendered in <strong>React</strong>.</p><p>But the part that actually made me sit back in my chair? <strong>Autocomplete.</strong></p><p>When I typed `TripBudget.` my editor knew every method. Parameter types. Return types. On a .NET backend. From a TypeScript file. Because it’s not a guessed-at API — it’s a <em>typed package</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*xYi5eAf1F5hT94hTpV4-GA.jpeg" /></figure><p>I wrote <strong>zero</strong> endpoints, <strong>zero</strong> DTOs, <strong>zero</strong> client code. And when the backend changes? `npm update`. Like any other dependency. No re-syncing specs across five files and praying.</p><h3>“Sure, but that’s just a number”</h3><p>Fair. A double crossing a language boundary isn&#39;t exactly a flex. So here&#39;s the same class returning a whole object:</p><pre>public static TripEstimate EstimateBreakdown(int nights, double nightlyRate, int travelers)<br>{<br>    // ...<br>    return new TripEstimate { Lodging = lodging, Spending = spending, Total = lodging + spending, Summary = ... };<br>}</pre><pre>public class TripEstimate      // plain DTO - primitives + strings<br>{<br>    public double Lodging { get; set; }<br>    public double Spending { get; set; }<br>    public double Total { get; set; }<br>    public string Summary { get; set; } = &quot;&quot;;<br>}</pre><p>And in React:</p><pre>const trip = await TripBudget.EstimateBreakdown(5, 120, 2);</pre><pre>trip.get_Lodging();   // 600<br>trip.get_Spending();  // 750<br>trip.get_Total();     // 1350<br>trip.get_Summary();   // &quot;5 nights for 2 traveler(s)&quot;</pre><p>I never declared that shape on the frontend. It came with the package, typed, autocompleting.</p><p>Two things worth knowing here. <strong>The whole object arrives in one round-trip</strong> — set GraftConfig.stateless = true and the DTO is materialized locally, so those getters are synchronous. No await per field, no N+1 network calls walking a nested object. And you bind the <strong>returned object directly</strong> — don&#39;t re-declare a parallel interface TripEstimateView and copy fields into it. That&#39;s the reflex REST trained into us, and it&#39;s exactly the work you no longer have to do.</p><p>Keep DTOs to primitives, strings, and plain arrays and they cross cleanly into any language. (Dates are the one to watch — use an ISO-8601 string.)</p><h4>The “it’s a demo, of course it worked” section (a.k.a. keeping it real)</h4><p>I’m not going to pretend it was frictionless, because you’d smell the marketing from a mile away. Two things bit me — and honestly they make the point <em>better</em>:</p><p><strong>1. `decimal` vs `double`.</strong> My first version used C# `decimal` for the money. Felt correct. But JavaScript only has one number type, so `120` arrives as an `Int32`, and the gateway went <em>”I will not be widening an Int32 into a Decimal today, sir.”</em> Swapped to `double` → clean. Lesson: across languages, `double` maps to a JS `number`. Small change, whole demo unblocked.</p><p><strong>2. Apple Silicon.</strong> The Dockerfile hardcoded the `amd64` gateway binary and my M-series Mac said no. One-line fix (`ARG TARGETARCH`) and it built natively.</p><p><strong>3. The blank page.</strong> This is the one that’ll get you, so let me save you the twenty minutes. The generated client pulls in Node built-ins, and a browser build can’t resolve those — so npm run dev renders a completely blank page with a cryptic console error. The fix is one dev dependency:</p><pre>npm install -D vite-plugin-node-polyfills</pre><p>…then register it in vite.config.js. Do it <em>before</em> your first npm run dev and you&#39;ll never see the blank page at all.</p><p><strong>One more, less a gotcha than a habit: </strong>the registry GUID in your install command <strong>rotates every time the gateway restarts</strong>. Don’t copy the command out of this post — curl localhost:80/npm and copy whatever it says right now. (Or set a free project key to pin it.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*CSR22bSPslyY9ehWSL1VEw.jpeg" /></figure><p>Neither of these is a Graftcode problem — they’re the normal reality of two languages meeting. The difference is I fixed them <em>in the actual code</em>, not in a mountain of transport glue. The bug surface is tiny because the surface <em>is</em> tiny.</p><h4>The actual cheat code: I made my AI do all of this by default</h4><p>Here’s the thing nobody tells you. You can hand your AI assistant a small <strong>rules file</strong>, and it stops reaching for REST entirely.</p><p>Graftcode publishes them as a CLAUDE.md + a .claude/rules/ folder — one rule file per language. Grab them with the same installer, run from <em>your own</em> project root:</p><pre>curl -fsSL grft.dev/get | sh        # macOS / Linux   (Windows: iwr grft.dev/get | iex)<br># → 1. Download Graftcode Rules file for your IDE<br># → 2. Claude Code</pre><p>It drops CLAUDE.md and .claude/rules/ right where you need them. The menu also covers Cursor, Copilot, Cline, and Windsurf — same rules, translated to each tool&#39;s format. Or browse them first: <a href="https://github.com/grft-dev/graftcode/tree/main/rules"><strong><em>grft-dev/graftcode</em></strong> → rules</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a91rY98S-9FMJgWyUKd8cw.png" /></figure><p>Here’s the setup, and it matters: the backend already exists. Same TripBudget.cs you saw above, sitting next to a plain Vite React app. I&#39;m not asking the AI to invent a service — I&#39;m asking it to connect the one I already wrote. So the business logic is fixed, and every file that differs between the two runs is pure transport plumbing.</p><p>If the AI writes the backend too, the two runs differ in <em>logic</em> as well as plumbing and the comparison proves nothing. Holding the class constant is the whole reason this test means anything.</p><p><strong>The prompt, both times — note it never says “API”, “REST”, or “Graftcode”:</strong></p><blockquote>“Here’s my C# <em>TripBudget</em> class in <em>backend/</em>. Wire it up so my React app can call <em>EstimateTotal</em> and show the estimated trip cost.&quot;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1vmE9Aw8FidkWzzispg6xw.png" /></figure><ul><li><strong>Without the rules:</strong> an ASP.NET Web API project, a controller, request + response DTOs, CORS config, and a fetch client in React. Five files wrapped around six lines that already worked. The glue-code tax, itemized.</li><li><strong>With the rules:</strong> <em>“Implementing this as a Graftcode module,”</em> — and then it <strong>doesn’t touch my class at all.</strong> It adds a Dockerfile that hosts it with gg, pulls the install command from the gateway URL instead of hallucinating one, and calls the method from React. Two files.</li></ul><p>Same class. Same prompt. One rules file between them. The AI stops writing plumbing and starts writing <em>logic</em> — because my public method was already the API; the rules just taught it to see that.</p><p><strong>Don’t take my word for it — run it</strong>. I put the starting point in the repo at <a href="https://github.com/grft-dev/graftcode-demos/tree/main/community/dotnet-react-frontend/seed">dotnet-react-frontend/seed/</a>: the same class with neutral comments, so nothing in it hints at Graftcode. (The shipped demo files explain the Graftcode contract in their comments — hand those to an assistant and you&#39;ve given away the answer.) Drop it next to a fresh Vite app, ask the prompt above, git status. Then add the rules and ask again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*lKlx66_fqCg2wCEuu-roLA.jpeg" /></figure><p><strong>So what did I actually delete?</strong></p><p>- ❌ The controller</p><p>- ❌ The request/response DTOs</p><p>- ❌ The `fetch` client</p><p>- ❌ The OpenAPI spec</p><p>- ❌ The type-sync dance every time a field changes</p><p>And what did I keep? <strong>One method.</strong> Called from another language. With autocomplete.</p><p>That’s not “less boilerplate.” That’s <em>no</em> boilerplate. The transport layer just… left. And my React app didn’t even notice.</p><h3>Try it yourself (it runs locally, no account)</h3><p>I’ve deliberately kept this post at the “why” level. Every exact command — Dockerfile, vite.config.js, the full App.jsx — is in the repo, and the folder for <em>this</em> post is self-contained:</p><p>👉 <a href="https://github.com/grft-dev/graftcode-demos/tree/main/community/dotnet-react-frontend">dotnet-react-frontend/</a> — its README.md is the step-by-step: build, run, grab the install command, wire up React.</p><p>You’ll need: Node.js, plus either Docker or the one-line gg install. No .NET SDK — the container builds the C# for you.</p><p>And to be explicit, since people ask: Graftcode is<strong> free and open </strong>to use. No account, no signup, no key, no trial clock. Everything in this post ran on my laptop against my own container.</p><p><strong>You’ll know it worked when:</strong> Vision’s “Try it out” on EstimateTotal with 5, 120, 2 returns <strong>1350</strong>, and your React page renders <strong>$1350.00</strong>. (5 × $120 lodging = $600, plus 5 × $75 × 2 travelers = $750.)</p><p><strong>Want to reproduce the with-vs-without result from the last section?</strong> <a href="https://github.com/grft-dev/graftcode-demos/tree/main/community/dotnet-react-frontend/seed">dotnet-react-frontend/seed/</a> has the neutral starting files and the exact prompt to paste, both times.</p><p>👉 <strong>Whole repo:</strong> <a href="https://github.com/grft-dev/graftcode-demos">https://github.com/grft-dev/graftcode-demos</a></p><p>🌐 <strong>Start here for the whole ecosystem:</strong> <a href="https://github.com/grft-dev/graftcode">github.com/grft-dev/graftcode</a> — the official central Graftcode repo and the entry point to everything else.</p><p>This was Part 1 — apps talking to apps. In <a href="https://medium.com/@nomadicmehul/your-ai-keeps-writing-mcp-servers-i-fixed-it-with-one-file-part-ii-8674fe45dad0">Part 2</a>, I do something arguably cursed and definitely cooler: I let Claude call this same kind of backend over MCP, and I write <em>zero</em> lines of MCP server code.</p><p>If this saved you from one more folder of glue code, drop a clap, share it with the teammate who keeps writing DTOs by hand, and go graft something. 🌱</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7313df98724a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Deleted 30 Lines of MCP Server Code. My Claude Desktop Agent Still Works.]]></title>
            <link>https://medium.com/@nomadicmehul/i-deleted-30-lines-of-mcp-server-code-my-claude-desktop-agent-still-works-b6ea55a693dd?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6ea55a693dd</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[graftcode]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Wed, 27 May 2026 11:02:52 GMT</pubDate>
            <atom:updated>2026-05-27T11:02:52.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uj0cAbaaHHe-kxMT9zom4A.jpeg" /></figure><p><em>Actually, it works better. Here’s how plain Python classes can become MCP tools without a single decorator.</em></p><p><strong>TL;DR</strong></p><ul><li>Most MCP servers in Python force you to write a second file just to wrap your real code.</li><li>Graftcode Gateway reads your Python module directly and exposes public methods as MCP tools — no decorators, no FastMCP, no wrapper.</li><li>Three files (your code, a Dockerfile, pyproject.toml) and you’re running.</li></ul><p>If you’ve built an MCP server in Python, you know the dance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zhM-SlzpJ8bhimHB0ersaA.jpeg" /></figure><p>You write your business logic in one file. Then you write a second file — the MCP wrapper. You import FastMCP. You sprinkle `@mcp.tool()` decorators everywhere. You re-declare your function signatures because the SDK wants its own view of them. You add a `main()` block. You handle the transport setup.</p><p>You test it. You break it. You fix it.</p><p>And then you do it again for the next class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*RQXa-w8FdFeO_WOgdPoQeA.jpeg" /></figure><p>This is the part of MCP nobody warns you about.</p><p>The protocol itself is fine. The wrapper code around it is where the rot starts. Every time you change a method signature in your real code, you go update the wrapper. Every time you add a method, the wrapper grows.</p><blockquote>The wrapper file becomes a second source of truth that drifts from the first one the moment you stop paying attention.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8DpHyltH-OroF_OYY-jj5w.jpeg" /></figure><p>I got tired of it. So I tried Graftcode Gateway.</p><p><strong>The actual idea</strong></p><p>Here’s what changed. I stopped writing the wrapper.</p><p>I have a plain Python class. Methods, type hints, docstrings the stuff you’d write anyway. <a href="https://graftcode.com/"><strong>Graftcode</strong></a><strong> Gateway</strong> (we call it `<em>gg</em>`) reads that module at startup, looks at the public methods, and exposes them as MCP tools over HTTP.</p><p>No decorators. No FastMCP import. No second file pretending to be the first one.</p><blockquote>The Python file looks like the Python file. That’s the whole point.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYEW_T7QtJSyEWgr9MjEPQ.png" /></figure><p><strong><em>Spot the MCP code. (There isn’t any.)</em></strong></p><p>If I add a method tomorrow, it shows up as a tool. If I rename a parameter, the tool signature updates. There’s nothing to keep in sync because there’s only one file describing the behavior.</p><p><strong>What the setup actually looks like</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1K78TI3-19_9t2W7kwdODA.png" /></figure><p><strong>Three files. That’s it.</strong></p><ol><li>Your Python module — the one you’d write anyway</li><li>`Dockerfile`that pulls the gateway image and points it at your module : Use <a href="https://docs.docker.com/desktop/">Docker Desktop</a> for better experinece</li><li>Create module meta data file: `pyproject.toml`</li></ol><p>You build the image. You run it. The gateway hosts your tools at an HTTP endpoint. <a href="https://claude.com/download">Claude Desktop</a> talks to it through `mcp-remote`. Done.</p><p>There’s no Model Context Protocol SDK in your code. There’s no FastMCP. If you ripped <a href="https://graftcode.com/">Graftcode</a> out tomorrow, your Python file would still run unchanged because it never knew it was being exposed as an MCP server in the first place.</p><p>That last bit is the part I keep coming back to.</p><blockquote>The business logic doesn’t know about the transport. It shouldn’t have to.</blockquote><p><strong>Testing without Claude Desktop in the loop</strong></p><p>One thing that surprised me as you don’t actually need to wire Claude Desktop in to test your tools.</p><p><a href="https://graftcode.com/">Graftcode</a> Vision gives you a browser UI for the gateway. You hit your tool, see the inputs, see the outputs, iterate. Once it works there, you point Claude Desktop at the same endpoint and it just works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jvBtrskP7kv1lYcEx_XR6w.png" /></figure><p>This shortens the loop a lot. The usual MCP debugging flow is “change code → restart Claude Desktop → hope the logs tell you something.”</p><p><strong>Now it’s </strong><em>“change code and run Docker Container → refresh tab and Claude Desktop.”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*ZSZyYZSsI29TBDqiPo1NwQ.jpeg" /></figure><p><strong>Why this matters past the convenience</strong></p><p>The decorator-heavy approach has a deeper problem than ergonomics. It locks your tool logic to one transport.</p><p>The moment you want the same class to power an MCP server <em>and</em> a REST endpoint <em>and</em> a CLI, you’re either copying decorators or building your own abstraction layer.</p><p>When the transport lives outside your code in a gateway that introspects your module, the same class can be exposed however you need it. MCP today. HTTP for a frontend tomorrow. Internal microservice calls the day after.</p><p>The logic is just logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3naAb_T-W6UdVspVwK2snQ.png" /></figure><p>This is the part people don’t usually see until their project grows. The wrapper-per-protocol model works for one tool. It doesn’t scale to five.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*FJxHybJuVxyKehkfOSdOaw.jpeg" /></figure><p><strong>Try it</strong></p><p>If you’re building MCP servers in Python and you’ve felt the wrapper pain, this is worth half an hour.</p><ul><li><strong>Graftcode Gateway</strong> → <a href="https://graftcode.com/">graftcode.com</a></li><li><strong>Python quick-start</strong> → <a href="https://docs.dev.graftcode.com/quick-start/expose-mcp/python">https://docs.dev.graftcode.com/quick-start/expose-mcp/python</a></li><li><strong>Example repo</strong> → <a href="https://github.com/nomadicmehul/Graftcode-By-Examples/">github.com/nomadicmehul/Graftcode-By-Examples/</a></li><li><strong>Watch the full walkthrough</strong> → <a href="https://youtu.be/goy8nS3hWvg?si=GQ3oTo83nDRd64B9">https://youtu.be/goy8nS3hWvg?si=GQ3oTo83nDRd64B9</a></li><li><strong>Discord community</strong> → <a href="https://discord.com/invite/2tWb3BAE36">https://discord.com/invite/2tWb3BAE36</a></li></ul><p>I’d genuinely like to know what you build with it. Drop a comment below, leave one on the video, or find me in the <a href="https://discord.com/invite/2tWb3BAE36">Discord</a>.</p><p><strong><em>If this saved you from writing a wrapper file today, give it a clap!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6ea55a693dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enhancing Developer Productivity with AI: A Guide to Using Refact.ai with Docker Model Runner]]></title>
            <link>https://medium.com/@nomadicmehul/enhancing-developer-productivity-with-ai-a-guide-to-using-refact-ai-with-docker-model-runner-8520b72b8411?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8520b72b8411</guid>
            <category><![CDATA[llm-deployment]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[docker-desktop]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 09:02:36 GMT</pubDate>
            <atom:updated>2025-04-21T09:25:28.828Z</atom:updated>
            <content:encoded><![CDATA[<p>This guide will teach you how to leverage AI, specifically <a href="https://refact.ai/">Refact.ai </a>and <a href="https://docs.docker.com/desktop/features/model-runner/">Docker Model Runner</a> to enhance your developer productivity. You will learn how to use these tools to improve existing applications, generate code in different programming languages, and create comprehensive documentation of your changes.</p><blockquote><strong>Please Note👇</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*t1PX_r0kDqmvDkkAzhGg4A.png" /></figure><p><strong>Expected Outcome:</strong> By the end of this guide, you will be able to use Refact.ai and Docker Model Runner to improve your coding workflow, experiment with different programming languages, and contribute to open-source projects.</p><p><strong>Prerequisites:</strong></p><ul><li><a href="https://www.docker.com/products/docker-desktop/">Docker Desktop </a>4.40.0 installed and running</li><li>VS Code (or any other supported IDE)</li><li><a href="https://marketplace.visualstudio.com/items?itemName=smallcloud.codify">Refact.ai </a>extension installed in your IDE [ Added the link for VS code extension, for JetBrains extension click <a href="https://plugins.jetbrains.com/plugin/20647-refact--open-source-ai-agent-code-generator--chat">here</a>]</li><li>Basic understanding of Docker and containers</li><li>Basic understanding of at least one programming language — Your choice!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*owgb3Xhcg5u8F62PNMMCdg.png" /></figure><h3>The Power of AI in Daily Life</h3><p>AI is increasingly prevalent in our daily routines, from personal tasks like writing emails and social media posts to complex activities like code refactoring and infrastructure automation. This presents both opportunities and challenges, particularly for developers who must navigate a rapidly evolving technological landscape.</p><h3>The Developer’s Dilemma: Balancing Code and Infrastructure</h3><p>Modern developers face the challenge of balancing programming expertise with a deep understanding of cloud infrastructure and DevOps principles. While specialized roles exist, companies increasingly demand programming proficiency across various engineering disciplines. This necessitates continuous learning and adaptation.</p><h3>AI-Powered Tools for Enhanced Productivity</h3><p>Several AI-powered tools can significantly enhance developer productivity. One such tool is Refact.ai, which offers code refactoring, error detection, and AI agent capabilities for streamlined development workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yrFP-QK--5RyKzom.jpg" /><figcaption>Credits: Refact.ai</figcaption></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=taDVXEqJsgNnCOPM&amp;t=360">https://youtu.be/js1dsRbdJSo?si=taDVXEqJsgNnCOPM&amp;t=360</a></p><h3>A Practical Use Case: Enhancing Docker Model Runners “Hello GenAI” App!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uUTkyepNtFu9brTb.jpg" /><figcaption>Credits: Docker</figcaption></figure><p>Docker Model Runners allow developers to run AI models locally using Docker Desktop. A simple “Hello GenAI” application demonstrates this functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iYCM0y7a-LPO4Hjt" /></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=5Gbm8Elpi4bs510Y&amp;t=750">https://youtu.be/js1dsRbdJSo?si=5Gbm8Elpi4bs510Y&amp;t=750</a></p><p>This application hasGo, Python, and Node.js versions which connects to a local Large Language Model (LLM) to provide AI-powered responses. However, the initial response format lacked structure and responsiveness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BKyqG4DysS1jnkhQ" /></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=_JC4F2cwweA34Ruu&amp;t=972">https://youtu.be/js1dsRbdJSo?si=_JC4F2cwweA34Ruu&amp;t=972</a></p><h3>Improving the “Hello GenAI” Application with Refact.ai</h3><p>Using Refact.ai, the Python component of the application was enhanced to provide a more structured and user-friendly response. This involved adding a health checkpoint for monitoring application status and integrating Swagger for API interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uGxwUrzuCOyx2iND" /></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=-vCjYRfE9d0Uk4Np&amp;t=1129">https://youtu.be/js1dsRbdJSo?si=-vCjYRfE9d0Uk4Np&amp;t=1129</a></p><p>The improved application offers predefined questions, structured responses, and a health check feature. Direct API interaction is also possible through Swagger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LBKnIttvaQFaHqUL" /></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=5J7J0ZbgxebUwCTz&amp;t=1197">https://youtu.be/js1dsRbdJSo?si=5J7J0ZbgxebUwCTz&amp;t=1197</a></p><h3>Refact.ai’s Role in Code Improvement</h3><p>Refact.ai played a crucial role in analyzing the project, suggesting code improvements, and generating documentation. The AI agent facilitated code modifications, error resolution, and the creation of a multi-stage Dockerfile for optimized disk space usage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tZgLVV2vrnxb25H9" /></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=-YbAYBt6Iaw3cnQh&amp;t=1701">https://youtu.be/js1dsRbdJSo?si=-YbAYBt6Iaw3cnQh&amp;t=1701</a></p><h3>Expanding Improvements to Go Application</h3><p>The improvements made to the Python application were extended to the Go application using Refact.ai. This demonstrates the tool’s versatility across different programming languages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W7yz7Ndw4yzis0LL" /></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=CfhFzxIkfw6dVwdz&amp;t=2317">https://youtu.be/js1dsRbdJSo?si=CfhFzxIkfw6dVwdz&amp;t=2317</a></p><p>The updated Go application, developed with the assistance of Refact.ai, offers similar enhancements in terms of structure and user experience.</p><h3>Troubleshooting</h3><ul><li><strong>Agent Not Responding:</strong> Ensure the Refact.ai extension is properly installed and connected to your IDE. Check your internet connection.</li><li><strong>Code Errors:</strong> Carefully review the error messages and use the Refact.ai agent to help debug and fix the issues.</li><li><strong>Docker Issues:</strong> Verify that Docker Desktop is running and that the necessary images are pulled.</li></ul><h3>Contributing to the Open-Source Community</h3><p>The improved code was submitted as a pull request to the original Docker Model Runner repository, contributing to the open-source community and enhancing the application for all users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DHV-oDKvQp8UKHLq" /></figure><p>Watch here: <a href="https://youtu.be/js1dsRbdJSo?si=AjnGqSkMCALFAw9i&amp;t=2181">https://youtu.be/js1dsRbdJSo?si=AjnGqSkMCALFAw9i&amp;t=2181</a></p><h3>Conclusion</h3><p>By leveraging AI-powered tools like Refact.ai, developers can significantly improve their productivity, enhance code quality, and contribute meaningfully to the open-source community. Continuous learning and adaptation are essential for navigating the evolving technological landscape and maximizing the potential of AI in software development.</p><p><strong>Next Steps:</strong></p><ul><li>Explore different AI models available within Docker Model Runner.</li><li>Experiment with other programming languages and projects.</li><li>Learn more about advanced features of Refact.ai, such as agent integration and customization.</li><li>Continue contributing to open-source projects and sharing your knowledge with the community.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8520b72b8411" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Terraform on Cloud: Leveraging Cloud-Native Infrastructure Management]]></title>
            <link>https://medium.com/@nomadicmehul/terraform-on-cloud-leveraging-cloud-native-infrastructure-management-136c25b0b66c?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/136c25b0b66c</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Sun, 30 Jul 2023 04:31:57 GMT</pubDate>
            <atom:updated>2023-07-30T04:31:57.337Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2KDeUBCXxK39eEPZ.jpg" /></figure><h3>Introduction:</h3><p><strong>Terraform</strong> is an open-source tool that has revolutionized infrastructure provisioning and management. By defining infrastructure resources using a declarative syntax, it allows for automated, scalable, and repeatable infrastructure deployments. However, Terraform’s true power shines when combined with cloud-native environments, giving rise to “Terraform on Cloud.” In this blog post, we will explore what Terraform on Cloud is, how it works, its benefits in production, and steps to learn and master it from scratch.</p><h4>What is “Terraform on Cloud”?</h4><p><a href="https://www.terraform.io/">Terraform</a> on Cloud extends the capabilities of the traditional Terraform tool by providing a cloud-native environment for seamless integration with various cloud providers like AWS, Azure, and Google Cloud. This integration enables users to manage cloud resources efficiently using Terraform’s declarative syntax, HashiCorp Configuration Language (HCL).</p><p>The cloud-native environment enhances collaboration, version control, and remote state management, making it easier for teams to work together on complex infrastructure projects.</p><h4>How does “Terraform on Cloud” work?</h4><p>Terraform on Cloud leverages cloud provider APIs to manage infrastructure resources. Using HCL, users define the desired state of the infrastructure, and Terraform compares it with the current state. It then applies the necessary changes to achieve the desired state in the cloud environment.</p><p>This cloud-native integration simplifies infrastructure deployment and management, providing a unified experience across various cloud platforms.</p><h4><strong>Using “Terraform on Cloud” in Production — Step by Step</strong></h4><p><strong>1. Infrastructure Definition:</strong> Begin by defining your infrastructure requirements in a Terraform script using HCL syntax. This script outlines the desired state of the cloud resources you want to deploy.</p><p><strong>2. Terraform on Cloud Deployment:</strong> Utilize Terraform on Cloud to apply your script to the target cloud environment. The platform will use the cloud provider APIs to create the specified resources.</p><p><strong>3. Verification of Infrastructure:</strong> After the deployment, verify that the infrastructure is correctly provisioned and that the desired state has been achieved. This step ensures that your cloud resources are set up according to your requirements.</p><p><strong>4. Lifecycle Management:</strong> Use Terraform on Cloud for ongoing management of your cloud resources. Whether it’s updating configurations or deleting unnecessary resources, Terraform streamlines the entire lifecycle.</p><p><strong>5. Leveraging Key Features:</strong> Capitalize on Terraform on Cloud’s powerful features, including remote state management and version control. These functionalities ensure consistency and collaboration, particularly when working with larger teams.</p><h4><strong>Learning “Terraform on Cloud” from Scratch</strong></h4><p><strong>1. Infrastructure as Code Fundamentals:</strong> Start by understanding the basics of infrastructure as code and its benefits. Recognize how Terraform simplifies infrastructure management.</p><p><strong>2. Cloud Provider Setup:</strong> Sign up for an account with a cloud provider like AWS or Azure. This step allows you to practice Terraform scripts in a real cloud environment.</p><p><strong>3. Terraform Documentation &amp; Tutorials:</strong> Dive into the official <a href="https://developer.hashicorp.com/terraform?product_intent=terraform">Terraform</a> documentation and follow tutorials provided by <a href="https://www.hashicorp.com/">HashiCorp</a>. This helps you grasp the syntax and concepts essential for Terraform.</p><p><strong>4. Hands-on Practice:</strong> Write and execute Terraform scripts for various use cases, such as deploying virtual machines, storage, and networking resources. Hands-on experience is invaluable in mastering Terraform.</p><p><strong>5. Community Engagement:</strong> Engage with the Terraform community by joining forums and webinars. Learn from experts, share experiences, and gain insights into best practices.</p><p><strong>6. Explore Advanced Features:</strong> Experiment with Terraform on Cloud’s advanced features, such as remote state management and version control. These features significantly enhance collaboration and streamline infrastructure management.</p><h3>Conclusion:</h3><p>Terraform on Cloud brings the power of Terraform into the cloud-native environment, offering a unified approach to infrastructure management across various cloud providers. By learning and leveraging this combination, you can streamline your infrastructure deployment, increase collaboration, and ensure scalability and reliability in your cloud-based projects.</p><p>Embrace the cloud-native way of managing your infrastructure with Terraform on Cloud and embark on your journey to cloud success. Happy Terraforming! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=136c25b0b66c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CKA Exam Preparation Series — 15 Important Terms Explained]]></title>
            <link>https://medium.com/@nomadicmehul/cka-exam-preparation-series-15-important-terms-explained-42af76a2a043?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/42af76a2a043</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[kubectl]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Thu, 27 Jul 2023 14:49:43 GMT</pubDate>
            <atom:updated>2023-07-27T15:07:58.151Z</atom:updated>
            <content:encoded><![CDATA[<h3>CKA Exam Preparation Series — 15 Important Terms Explained</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0Gj60aIlJ8eqGMXD.jpeg" /></figure><ol><li><strong>Container:</strong></li></ol><p>Containers are a lightweight and portable way to package and run software applications. They provide a consistent and reproducible environment for running applications across different computing environments. In production, containers are often used to isolate applications and their dependencies, improve resource utilization, and streamline software delivery processes.</p><p><em>Real-world example:</em><br>A web application can be containerized and run in a containerized environment such as Kubernetes, which allows easy scaling and management of the application.</p><p><strong>2. Container Orchestration:</strong><br>Container orchestration refers to the automated management of containerized applications, including deployment, scaling, and monitoring. It helps to abstract the underlying infrastructure and provides a unified API for managing applications across different environments.</p><p><em>Real-world example:</em><br>Kubernetes is an example of a container orchestration platform that automates the deployment, scaling, and management of containerized applications.</p><p><strong>3. Kubernetes (K8s):</strong><br>Kubernetes is an open-source container orchestration platform that provides a unified API for managing containerized applications. It automates the deployment, scaling, and management of containerized applications, making it easier to manage applications in production.</p><p><em>Real-world example:</em><br>Kubernetes is used by many companies, such as Airbnb, Spotify, and Lyft, to manage their containerized applications in production.</p><p><strong>4. Core Concepts of K8s:</strong><br>The core concepts of Kubernetes include Pods, ReplicaSets, Deployments, Services, ConfigMaps, Secrets, and Persistent Volumes. These concepts are used to define and manage the lifecycle of containerized applications in Kubernetes.</p><p><em>Real-world example:</em><br>Pods are used to run one or more containers together, while ReplicaSets and Deployments are used to manage the scaling and rollout of these Pods.</p><p><strong>5. K8s Architecture:</strong><br>The Kubernetes architecture consists of a control plane and worker nodes. The control plane includes the Kube API server, ETCD, Kube Controller Manager, and Kube Scheduler, while the worker nodes include Kubelet and Kube Proxy. The control plane is responsible for managing the state of the cluster, while the worker nodes are responsible for running containers.</p><p><em>Real-world example:</em><br>In a Kubernetes cluster, the control plane can be run on a set of dedicated servers or in the cloud, while the worker nodes can be run on a set of physical or virtual machines.</p><p><strong>6. Kube API Server:</strong><br>The Kube API server provides a unified API for managing Kubernetes objects, such as Pods, ReplicaSets, and Deployments. It also acts as the front-end for the Kubernetes control plane, handling authentication, authorization, and admission control.</p><p><em>Real-world example:</em><br>The Kube API server is used by Kubernetes administrators to manage the state of the cluster and the applications running on it.</p><p><strong>7. ETCD:</strong><br>ETCD is a distributed key-value store that is used by Kubernetes to store the state of the cluster. It provides a consistent and reliable way to store and retrieve data, making it easy to manage the state of the cluster.</p><p><em>Real-world example:</em><br>ETCD is used by Kubernetes to store information about the Pods, Services, ConfigMaps, Secrets, and other objects that are used to manage containerized applications.</p><p><strong>8. Kube Controller Manager:</strong><br>The Kube Controller Manager is responsible for running controllers that monitor the state of the cluster and make changes as necessary. It includes controllers for ReplicaSets, Deployments, Services, and other Kubernetes objects.</p><p><em>Real-world example:</em><br>The Kube Controller Manager is used by Kubernetes to ensure that the state of the cluster is consistent and that containerized applications are running as expected.</p><p><strong>9. Kube Scheduler:</strong><br>The Kube Scheduler is responsible for scheduling Pods on worker nodes in the cluster. It takes into account factors such as resource requirements and node availability when making scheduling decisions.</p><p><em>Real-world example:</em><br>The Kube Scheduler is used by Kubernetes to ensure that Pods are scheduled on worker nodes in an efficient and reliable manner, based on the available resources and constraints.</p><p><strong>10. Kubelet:</strong><br>The Kubelet is an agent that runs on each worker node in the Kubernetes cluster. It is responsible for managing the lifecycle of Pods on the node, including pulling container images and starting and stopping containers.</p><p><em>Real-world example:</em><br>The Kubelet is used by Kubernetes to manage the containers running on each worker node in the cluster, ensuring that they are running as expected and that their resource usage is optimized.</p><p><strong>11. Kube Proxy:</strong><br>The Kube Proxy is responsible for managing network traffic between Pods in the Kubernetes cluster. It runs on each worker node and is responsible for routing traffic to the appropriate Pod.</p><p><em>Real-world example:</em><br>The Kube Proxy is used by Kubernetes to ensure that network traffic between Pods is managed efficiently and securely, providing a stable and reliable network environment for containerized applications.</p><p><strong>12. Pod:</strong><br>A Pod is the smallest deployable unit in Kubernetes. It represents a single instance of a running process in a container. Pods are used to run one or more containers together, and can be scaled up or down as needed.</p><p><em>Real-world example:</em><br>In Kubernetes, a web application can be run in a Pod, with multiple instances of the Pod running to ensure high availability and scalability.</p><p><strong>13. YAML:</strong><br>YAML is a human-readable data serialization language used to define the configuration of Kubernetes objects. It is used to define and manage the state of Kubernetes objects such as Pods, ReplicaSets, and Deployments.</p><p><em>Real-world example:</em><br>Kubernetes administrators use YAML to define and manage the configuration of the various objects used to manage containerized applications running on the Kubernetes cluster.</p><p><strong>14. ReplicaSet:</strong><br>A ReplicaSet is a Kubernetes object that manages the scaling and replication of Pods. It ensures that the specified number of replicas of a Pod is running at any given time.</p><p><em>Real-world example:</em><br>A ReplicaSet can be used to ensure that multiple instances of a web application are running in the Kubernetes cluster, with automatic scaling based on demand.</p><p><strong>15. Deployments:</strong><br>A Deployment is a Kubernetes object that manages the rolling out and rolling back of changes to the state of the cluster. It provides a declarative way to manage updates to containerized applications running in the Kubernetes cluster.</p><p><em>Real-world example:</em><br>A Deployment can be used to manage the rollout of a new version of a web application, with automated rollbacks in case of failures.</p><p>I’ve organized the terms and examples in a sequential order to make it easier to understand and follow the concepts of Kubernetes and containerization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42af76a2a043" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Essential Things to Know About Docker]]></title>
            <link>https://medium.com/@nomadicmehul/10-essential-things-to-know-about-docker-19b827235bfa?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b827235bfa</guid>
            <category><![CDATA[dockerfiles]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[docker-swarm]]></category>
            <category><![CDATA[docker-image]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Sat, 15 Jul 2023 15:56:31 GMT</pubDate>
            <atom:updated>2023-07-15T15:56:31.586Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>In recent years, <a href="https://www.docker.com/">Docker</a> has rapidly gained popularity in the software development industry. This open-source containerization platform has revolutionized application deployment and has become a vital tool for developers and system administrators alike. Here are the top 10 things you should know about Docker to understand its importance and potential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/0*EdFQHppXhfscp5Fb.jpg" /></figure><p><strong>1. What is Docker?</strong></p><p>Docker is an open-source containerization platform that allows you to automate the deployment, scaling, and management of applications within isolated containers. Containers bundle an application’s code, dependencies, and configuration, ensuring consistency and portability across different environments.</p><p><strong>2. Containerization vs. Virtualization:</strong></p><p>Unlike traditional virtualization, where each virtual machine runs a full fledged operating system, Docker uses containerization to run applications on a shared OS kernel. Containers are lightweight, faster, and require fewer resources compared to virtual machines, making them ideal for microservices architectures.</p><p><strong>3. Portability and Scalability:</strong></p><p>Docker containers are highly portable, which means they can be easily transferred across various operating systems and cloud platforms. This portability simplifies deployment and avoids potential compatibility issues. Moreover, Docker’s scalability enables seamless replication and management of containers to accommodate varying workloads.</p><p><strong>4. Docker Images:</strong></p><p>Docker uses Docker images as the building blocks for containers. Images are templates that define the application’s code, runtime environment, dependencies, and configurations. You can create your own images or use pre-built ones from Docker Hub, the central image repository.</p><p><strong>5. Docker Hub:</strong></p><p>Docker Hub is a vast public repository of Docker images. It offers a broad range of pre-built images contributed by the Docker community. Leveraging Docker Hub saves significant time and effort in setting up and configuring the necessary environments for your applications.</p><p><strong>6. Docker Compose:</strong></p><p>Docker Compose is a tool for managing multi-container applications. It allows you to define and run complex application architectures as code, using a YAML file. Compose simplifies the setup of interconnected containers, enabling developers to define services, networks, and volumes with ease.</p><p><strong>7. Microservices Architecture:</strong></p><p>Docker and microservices have a strong correlation. With Docker, applications can be decomposed into smaller, independently deployable and scalable services. Each service can run within its own container, facilitating agility, fault isolation, and easier maintenance.</p><p><strong>8. Docker Swarm:</strong></p><p>Docker Swarm is the native container orchestration tool that comes integrated with Docker. It enables you to cluster and manage multiple Docker hosts as a single virtual host. Docker Swarm simplifies container deployment, scaling, and high availability, making it a viable alternative to other orchestration tools like Kubernetes.</p><p><strong>9. Docker Security:</strong></p><p>Docker provides various security features to ensure the safety of applications and the host environment. These features include user namespaces, resource constraints, secure API communication, image scanning, and vulnerability management. By following best practices, developers can maintain robust container security.</p><p><strong>10. Continuous Integration and Deployment (CI/CD):</strong></p><p>Docker plays a pivotal role in modern CI/CD pipelines. By packaging applications into Docker containers, teams can build portable artifacts that consistently work across development, testing, and production environments. Docker’s predictable behavior and fast startup times contribute to efficient CI/CD processes.</p><p><strong>Conclusion:</strong></p><p>Understanding Docker and its core concepts can significantly enhance your ability to develop, deploy, and manage applications. Its portability, scalability, and efficiency make it an essential tool for modern software development. By leveraging Docker, organizations can achieve lightweight, portable, and easily scalable application architectures. As the digital landscape continues to evolve, mastering Docker will undoubtedly become an invaluable skill for any developer or system administrator.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b827235bfa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MakerFest Vadodara 2023 — A Celebration of Innovation and Creativity]]></title>
            <link>https://medium.com/@nomadicmehul/makerfest-vadodara-2023-a-celebration-of-innovation-and-creativity-2897dfea5cb3?source=rss-41c718ef6ac3------2</link>
            <guid isPermaLink="false">https://medium.com/p/2897dfea5cb3</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[firefox]]></category>
            <category><![CDATA[mozilla]]></category>
            <category><![CDATA[mozilla-hubs]]></category>
            <category><![CDATA[mozillareps]]></category>
            <dc:creator><![CDATA[Mehul Patel]]></dc:creator>
            <pubDate>Mon, 27 Feb 2023 13:35:27 GMT</pubDate>
            <atom:updated>2023-02-27T13:42:27.787Z</atom:updated>
            <content:encoded><![CDATA[<h3>MakerFest Vadodara 2023 — A Celebration of Innovation and Creativity</h3><h3>Introduction</h3><p>MakerFest Vadodara 2023 was an exciting event that brought together innovators, makers, and technology enthusiasts from all over India. The event was held from January 28–29, 2023, at the Faculty of Technology &amp; Engineering, M.S University, Near Kalabhavan, Vadodara, Gujarat. The main objective of the event was to showcase cutting-edge technologies and promote innovation and creativity.</p><h3>About MakerFest Vadodara 2023</h3><p>MakerFest Vadodara 2023 was a two-day event that featured a wide range of exhibits, demonstrations, and workshops. The event was organized by ;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EAMS_DFa94SsWxz-y9UUUA.png" /><figcaption><em>Image Credits: </em><a href="https://makerfestvadodara.com/"><em>https://makerfestvadodara.com/</em></a></figcaption></figure><blockquote><em>The theme of the event was “Innovate, Create, and Make a Difference.”</em></blockquote><p>The event saw participation from several organizations and individuals, including makers, innovators, entrepreneurs, and investors. The event also featured a range of speakers, including industry experts, thought leaders, and innovators.</p><h3>Mozilla India Community’s Participation</h3><p>The Mozilla India Community was a key participant in MakerFest Vadodara 2023. This was the first participation with MakerFest Vadodara post-Covid-19, and the first large event that we as a Mozilla India community participated in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lhNBAPL-vZu97R_6FqS3ng.png" /><figcaption><em>Image Credits: </em><a href="https://makerfestvadodara.com/"><em>https://makerfestvadodara.com/</em></a></figcaption></figure><p>For me, it was like coming home because I have been contributing to Mozilla for the last 7+ years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jjfI9ZUGHvdw8lUf607_iQ.jpeg" /></figure><p>Currently, I am also one of the council members at Mozilla Reps, and one of my KPIs or goals when I have taken this responsibility is to activate the local community, and this was our first initiative towards it.</p><p>This will help us to set an example and motivate others to join the community and contribute to the program based on their interest areas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bq3m67m5w5j6MFWJP4rpoA.jpeg" /><figcaption>Mozilla India Booth — Setup</figcaption></figure><p>The community showcased several initiatives and projects that aligned with the event’s theme and goals. These initiatives included:</p><ol><li><strong>Privacy and Security:</strong> The Mozilla India Community also highlighted its work on privacy and security on the web. The demo showcased how Mozilla’s privacy and security tools, such as Firefox browser and VPN, can help users stay safe and secure online.</li><li><a href="https://hubs.mozilla.com/"><strong>Mozilla Hubs:</strong></a> Mozilla Hubs is an open-source platform that allows users to create and share 3D virtual spaces. The Mozilla India Community showcased Hubs at the event to demonstrate its potential for creating immersive, collaborative learning environments. The community used Hubs to create a virtual exhibition space where attendees could explore and interact with the community’s initiatives and projects.</li><li><a href="https://relay.firefox.com/"><strong>Firefox Relay</strong></a><strong>:</strong> Firefox Relay is a privacy-focused email forwarding service that helps users protect their online identity and avoid spam. The Mozilla India Community showcased Relay at the event to demonstrate how it can help users stay safe and secure online.</li><li><a href="https://developer.mozilla.org/en-US/"><strong>Mozilla Developer Network [MDN]</strong></a><strong>:</strong> Mozilla Developer Network (MDN) is an open platform that provides web developers with resources and documentation to help them build better websites and applications. The Mozilla India Community showcased MDN at the event to demonstrate its commitment to promoting an open and accessible web.</li><li><a href="https://blog.mozilla.org/l10n/"><strong>Mozilla l10n</strong></a><strong>:</strong> Mozilla l10n is a localization platform that allows users to translate Mozilla’s products and services into their local languages. The Mozilla India Community showcased l10n at the event to demonstrate how it can help promote linguistic diversity and enable users to access Mozilla’s tools and services in their native languages.</li><li><strong>Building the local community and encouraging more participation:</strong> In addition to showcasing its initiatives and projects, the Mozilla India Community also organized a community drive experience during the event. This drive aimed to encourage attendees to participate in Mozilla’s mission of promoting an open and accessible web. Attendees were invited to sign up for Mozilla’s community programs and learn about various volunteer opportunities. The community also provided information on how attendees could contribute to Mozilla’s various initiatives, such as localization, testing, and documentation.</li></ol><p>In addition to showcasing its initiatives, the Mozilla India Community also organized a community drive experience during the event. This drive aimed to encourage attendees to participate in Mozilla’s mission of promoting an open and accessible web. Attendees were invited to sign up for <a href="https://community.mozilla.org/en/">Mozilla’s community programs</a> and learn about various volunteer opportunities.</p><p>Among many visitors who visited our booth, I could not resist mentioning these fantastic kids who spent almost 4–5 hours with our volunteers and especially learned about Mozilla Hubs. One more thing, they love Firefox!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rd31VwnFO4vnD0rXlePDqg.jpeg" /></figure><h3>Challenges Faced by US</h3><p>Despite the success of the initiatives and projects showcased by the Mozilla India Community at MakerFest Vadodara 2023, the community faced several challenges during the event. These included:</p><ul><li><strong>Technical issues:</strong> The Mozilla India Community faced technical issues with some of the demos because of poor network connectivity, which affected the overall user experience.</li><li><strong>Limited time:</strong> The two-day duration of the event limited the amount of time the Mozilla India Community had to showcase its initiatives and projects.</li><li><strong>Limited resources:</strong> The Mozilla India Community faced resource constraints, such as limited space and equipment, which affected its ability to showcase its initiatives and projects.</li></ul><h3>Key Takeaways and Lessons Learned</h3><p>Despite the challenges faced, we have addressed 1500+ visitors in two days, and it provided several key takeaways and lessons learned. These include:</p><ul><li><strong>The importance of preparation:</strong> The event highlighted the importance of adequate preparation, particularly in terms of technical setup and user experience.</li><li><strong>The importance of collaboration:</strong> The event emphasized the importance of collaboration and partnerships, particularly in the context of community-based initiatives and projects.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*QzC12n3oUhn-9X-dlGyQNA.jpeg" /><figcaption>Power of Collaboration!</figcaption></figure><ul><li><strong>The importance of flexibility:</strong> The event highlighted the importance of flexibility and adaptability, particularly in the context of resource constraints and technical issues.</li></ul><blockquote>And, of course, keep learning and keep sharing!</blockquote><p>Our awesome volunteer team and I got featured in <a href="https://medium.com/u/95f4ec6ae6f6">Mozilla</a>’s <a href="https://links.email.mozilla.org/servlet/MailView?ms=MzIxMDcyOQS2&amp;r=MTI1NTgwNzU4ODMS1&amp;j=MTIwMDAzMDI4MgS2&amp;mt=1&amp;rt=0">Community Newsletter</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QdurGJPuT3KOI1ntmVDgoA.png" /></figure><h3>Feedback from the participants 🤩</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TRsZckoZxApMAAyHWaZxJA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pa9Mj07HLU4KezJzaSJSYw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ce6in9ReCYl7PVe7h8rOMw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jaq0UGQBqQpA9S9_jbkGLg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4YqnduyPUCRjKnxtp2kfPA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0KSlbiE1b1fXzZvoL_i4Fw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibSdwFqvvUi8BDhYzhkzDA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QiBAHhNH-jJEiWCgGe31rg.jpeg" /><figcaption><strong>Wall of Feedback!</strong></figcaption></figure><h3>Conclusion</h3><p>MakerFest Vadodara 2023 was a highly successful event that provided a platform for innovators and makers to showcase their work and promote innovation and creativity.</p><p>The Mozilla India Community’s participation in the event demonstrated its commitment to promoting opensource and innovative technologies.</p><p>The challenges faced by the community highlighted the importance of adequate preparation, collaboration, and flexibility. Overall, the event provided several key takeaways and lessons learned that can be applied to future events.</p><h4>Thank you for reading! 🙏</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2897dfea5cb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>