
Our Blog
Explore our blog posts on web design, development, and digital marketing to stay up-to-date with the latest trends and strategies.
Found 103 blog posts
N+1 Queries in Node.js APIs: How We Detect Them, Batch with DataLoader, and Enforce a Query Budget — Field Notes
An N+1 query hides in local development and multiplies database round trips in production. Here is how our team detects N+1 queries with per-request counting and pg_stat_statements, when we pick a JOIN, a batched IN query, or DataLoader, and the CI test that keeps the query count flat as page size grows.
noUncheckedIndexedAccess and exactOptionalPropertyTypes: How We Turn On TypeScript's Strict-Plus Flags in Real Codebases
"strict": true still lets TypeScript assume items[0] always exists and that an optional property never holds an explicit undefined. We cover what noUncheckedIndexedAccess and exactOptionalPropertyTypes catch, the fix patterns that avoid non-null-assertion spam, and the per-file CI ratchet we use to adopt both flags without one giant pull request.
Postgres Row-Level Security for Multi-Tenant Node.js Apps: Roles, Pooled Connections, and Blind Spots — Field Notes
We move tenant isolation for shared-schema Node.js apps into PostgreSQL Row-Level Security so a forgotten WHERE tenant_id filter returns zero rows instead of another customer's data. Our field notes cover the policy shape, the role split that stops RLS from being silently bypassed, the set_config pattern that survives connection pooling, and the blind spots.
React Activity in Next.js 16: How We Handle Hidden Routes, Re-running Effects, and useEffectEvent
With cacheComponents enabled, Next.js 16 stops unmounting pages and hides them with React's Activity component instead. This is how our team decides which state should survive navigation, resets the DOM side effects that keep running under display: none, uses useEffectEvent to keep re-running Effects cheap, and keeps Playwright from clicking pages the user already left.
BullMQ 6 in NestJS: Stalled Jobs, Deduplication, and Moving Repeatable Jobs to Job Schedulers — Field Notes
How we run BullMQ 6 behind NestJS in production: a noeviction Redis, sandboxed processors that stop stalled jobs from running twice, jobId versus deduplication, and migrating repeatable jobs to Job Schedulers before the BullMQ 6 upgrade.
Refresh Token Rotation in NestJS and Next.js: Reuse Detection, Token Families, and the Parallel-Refresh Race — Field Notes
How we rotate refresh tokens on every use in our NestJS APIs, store them as hashed token families in Postgres, revoke a whole family when a used token comes back, and stop parallel requests and Next.js prefetches from logging users out.
Speculation Rules in Next.js: How We Prerender Hard Navigations Without Breaking Analytics or CSP
The Speculation Rules API lets Chromium prefetch or fully prerender the next page before a click, but in a Next.js App Router app it only speeds up hard navigations. This is how we scope the rules, ship them safely under a strict CSP, keep side-effecting URLs out, and keep prerenders out of our analytics.
Cache Stampedes in Node.js: How We Use Request Coalescing, Redis Locks, and Stale-While-Revalidate for Hot Keys
A hot cache key expiring under load sends every concurrent request to the database at once. Here is how we layer stampede protection in our Node.js and NestJS services: in-process request coalescing, a Redis SET NX lock across instances, soft TTLs that serve stale data while one worker refreshes, probabilistic early expiration, and TTL jitter.
Typed API Contracts from NestJS to Next.js with OpenAPI: How We Keep Frontend Types Honest
We stopped hand-copying DTO types between our NestJS APIs and Next.js frontends and now generate them from the OpenAPI spec Nest already emits. This is our pipeline — the Swagger CLI plugin, openapi-typescript, a per-request openapi-fetch client, and a CI drift check — and the places where generated types still lie.
The Transactional Outbox Pattern in Postgres and NestJS: How We Ended Dual Writes Between the Database and the Queue
We replaced the save-then-publish dual write in our NestJS services with a transactional outbox in Postgres: the event row commits with the business change, a SKIP LOCKED relay publishes it, and consumers deduplicate by event ID. Here is the design, the failure modes it closes, and how we operate it.
JSON-LD in the Next.js App Router: How We Type, Serialize, and Test Structured Data — Field Notes
Our team renders JSON-LD from Next.js App Router Server Components, escapes every less-than sign so content can't close the script tag, types the graph with schema-dts, and keeps it in sync with the page through a CI test. Here's which schema.org types still earn their place in 2026.
Why CORS Breaks Between Next.js and NestJS: Our Field Notes on Preflights, Credentialed Cookies, and Proxying Instead
Every time we split a Next.js frontend from a NestJS API, we hit the same three CORS failures: rejected preflights, a wildcard origin that breaks with cookies, and sessions that never arrive. Here is what each CORS header actually does, the allowlist config we ship, and when we proxy /api through a Next.js rewrite instead.
Stay Updated
Subscribe to our newsletter for the latest insights on web design, development, and digital marketing.