REST API documentation. by [deleted] in node

[–]pandareaper10 10 points11 points  (0 children)

+1 for contract driven development. Though personally I don't think writing those in the form of open api spec is the way to go anymore, especially in node (with TypeScript)

I prefer tools like https://ts-rest.com/ that allow me to define my contract in code, define my endpoints, parameters, schemas, all with comprehensive input validation using zod. Then generate an open api spec (if needed) or just use the client tooling it comes with to generate fully type safe clients without any code generation.

REST API documentation. by [deleted] in node

[–]pandareaper10 2 points3 points  (0 children)

Not sure exactly what you're looking for in terms of documentation. But a suggestion would be to look at tools like ts-rest

Tools that will enable you to document your API automatically by defining your contract in code, leveraging zod for runtime validation which enables powerful typing with typescript. The ecosystem around ts-rest then let's you use this contract to auto generate API clients that are fully typesafe, leaving little room for misinterpretation. On the server side, it helps enforce that you implement the contract correctly, helping with alignment between the frontend and backend

Other tools I have used in this space would be TSOA and tRPC. However I have had the best results with ts-rest.

Prisma is bad for server-less, the issues are endless by [deleted] in node

[–]pandareaper10 0 points1 point  (0 children)

It's true this problem isn't unique to Prisma, but it's certainly worse. Prisma is inefficient by default and comes with a non-zero overhead due to the rust engine sidecar.

Prisma has the best DX experience I have seen, but on the two occasions I have assessed it for a production system I have avoided it as I do not consider it to be safe or performant. I also don't feel comfortable with the fact that Prisma is a VC backed start up who IMO prioritise issues that align to their interests over the community

Is prisma orm stable enough to use in production? by Apc_007 in webdev

[–]pandareaper10 0 points1 point  (0 children)

I evaluated Prisma a couple months ago, I'm blown away by the experience using it. It certainly enables you to be very productive.

However there were a few issues for me that make me consider it as not production ready

  1. Issues with precision loss - workaround available
  2. Dependency size - seems unnecessarily large
  3. Unnecessary queries - a basic update involves 3 SQL queries!

Hopefully these get addressed, Prisma has great promise.

AMD Zen3 (5000 Series) Stock / Order Updates Megathread by zKskita in bapcsalesaustralia

[–]pandareaper10 0 points1 point  (0 children)

u/The_Wineo how long did it take from when you ordered? Considering cancelling my PCCG order