Skip to main content
shivam gairola..

OPEN TO SELECT PROJECTS

OPEN TO SELECT PROJECTS

OPEN TO SELECT PROJECTS

OPEN TO SELECT PROJECTS

Frontend

Type-Safe From the Database to the Button

How a well-typed API layer killed 80% of my frontend bugs. Zod at the edges, inferred types everywhere else.

Apr 30, 20261 min read

Most of the frontend bugs I used to chase were really shape mismatches: the API returned something the UI did not expect. Closing that gap with types is the highest-leverage habit I have picked up.

Validate at the boundary, infer inward

I parse every API response with a Zod schema at the network edge. From there the type flows through the whole app by inference, so I never hand-write an interface that can drift from reality.

If the data is wrong, I want to know at the fetch, not three components deep in a render.

Building something in this space?

I take on select builds when the work is worth doing right.

Start a conversation