HNHacker News
TopNewBestAskShowJobs

graftcodecom

5 karma · joined September 5, 2026

Co-founder and CEO of Graftcode. Are you already grafting? If not what you are waiting for! Academy.graftcode.com
submissionscomments
graftcodecom··on Reduced integration layer code by 67% replacing REST with grafting
I just changed this sample python app to grafting reducing integration layer code by 67%, decoupling code from integration method and making backend API a pure public methods which now can be called through any channel and immediately support MCP as well.

It gives different benefits: less code > easier to understand and maintain by AI > much less tokens used (compared same prompt on grafting and without - what is obvious without even checking as adjusting or understanding public method vs public method + fast api wrapper + client is obvious win) > easier to review pull requests from AI > implementation match simple OOP UML class, interaction and sequence diagrams > ability to change architecture of integration via env var in production even changing from http2 to WebSocket to azure ServiceBus queue etc…

All is based on our solution that now is achieving stable release with full open telemetry support but already gives all you need for majority of projects.

Same will work for you across netcore, Java, kotlin, groovy, python, ruby, php, node, js/ts in browser. Ruby and php is in more alpha state.

If you want to try create empty folder open in cursor run:

Windows: iwr grft.dev/get | iex

Linux/mac: curl -fsSL grft.dev/get | sh

And choose ai rules > cursor and next just type your prompt to get any distributed system you will see magic of grafting on your own sample :)

Let me know your thoughts!

Bests, Przemek graftcode co-founder and CEO

graftcodecom··on Maybe we shouldn't be reviewing all this code
And forgot the best ;) those public methods being decoupled from any integration method are natively callable by MCP as our gateway support MCP out of the box ;)

Beat it! ;)

graftcodecom··on Maybe we shouldn't be reviewing all this code
And very important doing same system with and without grafting can reduce codebase up to 50% or at least the integration layer part by easily 70-80%. Check that sample repo from GitHub I recently transformed as migration of the day to present soon on LinkedIn: https://github.com/pladynski/graft-fastapi-react-todo/pull/1...
graftcodecom··on Maybe we shouldn't be reviewing all this code
I would propose slightly different solution, I was doing software development for 30 years learning first patterns from Martin articles and what always felt strange was the fact that we had top 20 programming languages living in kind of silos.

I stride to address that by implementing runtime bridge for Java and .net and it was quite successful but only in niche use cases where somebody badly needed to use jar in .net or other way. One of funny achievement was that we managed to allow our customers use wpf user controls inside Java jframe! And it was living nicely in the UI and was binding events allowing to call methods etc..

That led me to though why if we take unzip library in Java we just add it as dependency via maven but if we call the same remotely or want to use unzip from Nuget we suddenly host it on separate node, write either rest, gRPC, subscribe queue via sdk or use thrift and then we write client for that and call it through those artificial layers up to unzip(string:filename) methods we wanted to call. WHY?

And therefore looking how to broaden our runtimebridge market we tried a crazy idea to allow any tech use any other tech by simple calling their public methods regardless if it’s in memory or remotely.

It took building runtime bridge for 143 tech pairs supporting clr, jvm, python, ruby, php, c++, go, node (js/ts), browsers js/ts etc…

NEXT we made it possible so they can call each other in memory and remotely.

Than we made that strongly typed interface is obtainable via simple package manager call.

And now users can take any module write just public methods and host it on our gateway running in their container/vm/machine and immediately they get api browser with commands for any package manager to get strongly typed client on the fly that always stays up to date.

Whenever anyone uses the module obtained (we call it graft) and calls any method it gets routed via any channel based on runtime config i.e. via env var and it can go http2, WebSocket, tcp/ip, any queue/event bus etc, or in memory!

And the system design is super simple just public methods and classes using them. It fits 1:1 what we see in OOP uml, code is fully decoupled from integration method, so we can change architecture in runtime even extracting logic to microservices from monolith. All services clearly reference their dependencies and get always up to date strongly typed client.

All of that makes AI, understand such system much better, use much less tokens, use much more efficiently context, and makes pull request review much easier!

The team either before or after code is written has much better control through simple OOP design.

It’s still evolving but we already achieved enterprise readiness and have many great POCs including IBM. We support full open telemetry, authentication, standard encryption of underlying channels purely removing the difference from same tech, cross tech, remote or local calls. Now everything feels like local method calls.

You think it would help to solve the issue of reviewing that code? @martinfowler?