Content pfp
Content
@
0 reply
0 recast
2 reactions

Steve pfp
Steve
@stevedylandev.eth
Gotta side with @gregfromstl; mono repos give the ick @polluterofminds and I have been using this stack lately for Pinata and other projects like Orbiter: name-client (Vite + React) name-backend (Hono on a Cloudflare Worker) name-contracts (foundry) Clean, simple, and easy for either of us to jump into and work on
4 replies
1 recast
16 reactions

alex pfp
alex
@alexgrover.eth
How do you share ABIs and API types? Being able to have all of those in the same repo has been a huge speed boost for me personally
3 replies
0 recast
2 reactions

greg pfp
greg
@gregfromstl
I'd argue they shouldn't. Your backend should parse inputs and your app should parse responses from the backend. It's safer that way
1 reply
0 recast
2 reactions

alex pfp
alex
@alexgrover.eth
Those approaches aren’t mutually exclusive - for example you can share the request/response schemas (using eg zod) and then get type inference that your request body conforms to what it thinks the backend expects. The backend still needs to validate the payload, but at least TS can help make the DX better
1 reply
0 recast
1 reaction

greg pfp
greg
@gregfromstl
That's true, but I think manually setting the types for each is good practice
0 reply
0 recast
1 reaction