DCDaily Calcsindaily-calcs.hashnode.dev·Just now · 6 min readHow to Convert a Dog’s Birthday Into Human Years in TypeScriptdogAge * 7 is a one-liner. It is also wrong. A 1-year-old dog is about 15 in human years, not 7. A 2-year-old is about 24. After that, size is a parameter: a Chihuahua adds ~4 human years per calendar00
TNThe Nguyeninevershop.hashnode.dev·1h ago · 8 min readEverShop 2.2.1: our biggest release since 2.0 — page builder, metafields, and React 19 We just shipped EverShop 2.2.1 — the largest release since 2.0. It folds in the React 19 work that had been sitting in an unpublished 2.1.3 branch and stacks four months of development on top of it: a00
TDT Dinivibe.hashnode.dev·17h ago · 7 min readFix prisma-guard Errors by Finding the Failing StepSearching a long prisma-guard error verbatim often hides the useful clue: when did it fail? Router descriptors, shape construction, caller routing, request validation, scope policy, and HTTP transport00
TDT Dinivibe.hashnode.dev·17h ago · 6 min readFive Prisma Guard Mistakes That Still Return 200 OKErrors are easier to debug than successful requests with wrong semantics. A response can be 200 while the guard discarded client input, moved a condition, returned a wider mutation record, left a nest00
TDT Dinivibe.hashnode.dev·17h ago · 6 min readBuild Safer Create, Update, and Bulk Routes with PrismaGenerated write routes save handler code, but they do not make every Prisma mutation safe to expose. Write safety comes from complete data shapes, constrained selectors, explicit bulk filters, control00
TDT Dinivibe.hashnode.dev·17h ago · 6 min readControl What Your Prisma API Returns with `select`A correct tenant filter answers which records may qualify. It does not answer which fields and related records may leave the server. In a generated Prisma API, projection needs its own contract becaus00
TDT Dinivibe.hashnode.dev·17h ago · 7 min readWhere Generated Prisma Routes Need Hooks—and Where They Don’tGenerated routes remove repetitive handlers, but applications still make decisions that schema and shape configuration cannot express. The hard part is not writing a hook. It is deciding whether the r00
TDT Dinivibe.hashnode.dev·17h ago · 6 min readServe Different User Types from One Prisma ModelA single Prisma model often serves users with different permissions and response needs. Copying the model into separate routers duplicates rules. One broad shape exposes too much. Caller variants let 00
TDT Dinivibe.hashnode.dev·17h ago · 7 min readPrisma Guard `force()` Explained: Defaults vs Server RulesThe name force() can sound like “use this value unless the client supplies another.” That is not its job. A forced value is server-owned. It describes who decides a value, not when a default applies. 00
TDT Dinivibe.hashnode.dev·17h ago · 7 min readKeep Prisma Queries Inside the Right Customer Account: 7 ChecksMost tenant-isolation reviews start with one question: “Does every query include tenantId?” That catches the obvious failure and misses several others. A filter can exist but come from the client. It 00