Make the client work (island/silo architecture)

This is why you are vibe coded application is full of errors

An application is made up of back end, front end and the communication between those two

It can also be seen as client, server and communication between those two

The problem with AI is it has no awareness of where it stands in time and what the scope of the thing it dealing with is

It does not know anything outside its context window and it does not know if it has worked on the same problem before or if some action was taken in this context why it was taken even if it itself was the one taking it

Basically AI has sense of scope and And continuity

That makes it unaware of the things that are in your code base And why they’re the way they’re

And that they might be deliberate or may be mistake

It’s like it is looking at a huge billboard but it can only flashlight at some spot

So it won’t know if The whole billboard has some grammatical mistakes in its content

because it is only able to look so few words of the metaphorical billboard

And that’s why when you create code with AI it forgets the back end and front end points and thus it fucks up the communication between them

That’s why tools like Rohkun help you to map out your code base

So that you can effectively communicate with AI that this is the situation of your code base so that it can work better

But we can take more steps to make this process more smooth for us

One is to make the code as literal as possible such that we have maximum info pre execution of code so that we can debug it better

And another one is to understand client server relationship better

Client means the user’s device and the server means your own computer from which you run all the services that run your application

There was a time when the computers we had were very weak so it made sense to load most of the computation into servers

But these days entry level android phones have 16 times the RAM that render free cloud provides

Clearly the client’s head has gotten a lot stronger over years

That you have to shift your load from server side to client side so that you can minimize the communication layers between these two

What that does for you is your application and AI can get away with much less of your code based talking with each other

Islands or silos become sustainable and may be even desirable this way

A lot of errors arise because the endpoints are just not communicating the way they should be because AI is not able to orchestrate that huge level of operation because of its context window

But if you eliminate the need of that communication then you are on the right track

And there are a lot of advantages to this

Even if you are building up a small application if you have each and every step be processed on server

Even then it’s very inefficient

If you are page has five interaction points and each API called text 200 milliseconds

Then five interactions just take so much of wasted time

It makes your application feel very slow and buggy

Better method is to just make that application self sufficient and get all those five interactions recorded and then send them in bulk

Without infrastructure design like this we would never have applications like Figma, Canva, Miro

Where a lot of things need to be processed on client side and then only irrelevant information is sent back to server

Can you imagine how bad it would be if you move a rectangle on Canva and then have to wait for 200 milliseconds so that server can catch it and then you are able to move that again?

No that’s not how it works

Applications like Instagram they preload a lot of reels onto your device which will come in your next scrolls

Imagine if for every scroll Instagram sent a request to server

That would be so inefficient

It would break your immersion and you won’t spend as much time there as you do right now

The equation is clear

You have to load a lot of stuff either on client side or on server side so that you can minimize communication

That minimized communication create simplicity in your code and reliability and good user experience

In modern time computation is very fast Internet is the slowest link of apps

So API calls or fetching information from client or server is very inefficient in real time

Server complexity explodes fast.

Client-side complexity grows far slower.

The client is now the fastest place to compute

So get your computation done there

For your clients work the client side should be the source of truth and your server is just a record keeper so that we can restore those states or show those states to others.

Of course there are things which shall never be done on client side

Things that require universal truth like payments authorization limits rates etc should never be given to the client side

In early days there were mobile games that used to do that and an application called Lucky Patcher used to exploit just that

Even I used to spoof the daily reward system of many games by just changing that date

In many things you need universal truth because the assumption that OK the client’s device will give you honest feedback or input is naive

That’s why keep the computation on client side

Keep universal truths on server side

Keep the communication minimal and strictly limited to necessary things

The browser of your users is a very powerful application it can run things you cannot imagine

But of course there are times when it is better to do things on the server side

You cannot expect an LLM to run on your client’s computer

But you’ve still got to maximize the proportion of computation of your app that is done on client side.

Reduce the surface area where AI can break things by minimizing client-server communication.

Also the silos that we talked about are essentially mini apps which perfectly fit the domain artificial intelligence capabilities to write code

We are shrinking our huge app into smaller apps which fit the context window and communicate with each other in batches that are simple to digest and send


Examples from AI :

AspectTraditional Silo Architecture
ScopeOne large interconnected systemMultiple isolated mini-apps
AI ContextExceeds context windowFits in context window
CommunicationConstant real-time API callsBatched, event-driven sync
Failure RadiusCascading failures across systemContained within silo
DevelopmentAI loses track of dependenciesAI can reason about entire silo
State ManagementDistributed across client/serverSelf-contained in silo
TestingComplex integration tests neededEach silo tests independently

Communication Patterns: Traditional vs. Silo

Traditional (High-Frequency, Real-Time)

User ActionServer CallsLatency ImpactAI Complexity
Type in search box1 call per keystroke10 calls × 200ms = 2000msMust coordinate API debouncing
Move slider1 call per change5 calls × 200ms = 1000msMust sync state constantly
Add to cartImmediate API call200ms per actionMust handle race conditions
Update profile fieldCall per field5 fields × 200ms = 1000msComplex form state management
Total21 API calls4200ms wastedHigh coordination complexity

Silo Architecture (Low-Frequency, Batched)

User ActionClient ProcessingServer CallsLatency ImpactAI Complexity
Type in search boxInstant filter local data0 (data preloaded)0msSimple filter function
Move sliderInstant UI update0 (batched later)0msSelf-contained state
Add to cartInstant optimistic update0 (batched)0msLocal array operation
Update profile fieldsAll fields edit freely1 call when clicking “Save”200ms onceSimple form object
TotalInstant feedback1 API call200ms totalLow coordination complexity

Breaking Down a 20,000 Line App

ApproachResult
Give AI entire codebaseContext overflow, hallucinations
Give AI one silo (1,500 lines)Full understanding, correct changes
Give AI silo + interface contractPerfect isolation, reliable output

We are essentially designing our system around the slowest link (internet) and the weakest cognitive link (LLMs)