I am a...
Learn more
How it worksPricingFAQ
Account
Cadence blog

Best practices

Engineering playbooks: CI/CD, code review, monitoring, multi-tenancy, async standups. The how-to layer of running a modern team.

May 24, 2026 · 11 min read
How to use Vercel Blob for file storage

Vercel Blob is a managed object-storage service built on Cloudflare R2 that lets a Next.js or any Node.js app upload, store, and serve files behind a global CDN with zero infrastructure setup. You ins

May 24, 2026 · 11 min read
How to set up a security review process

A security review process for a startup is three things: a one-page threat model template you fill out per surface, a pre-merge checklist gate that blocks risky PRs, and a calendar of recurring audits

May 24, 2026 · 10 min read
How to build a real-time collaborative editor

To build a real-time collaborative editor in 2026, pick a CRDT library (Yjs or Automerge) for conflict-free sync, pair it with a rich-text framework (Tiptap or ProseMirror), and pipe updates through a

May 24, 2026 · 10 min read
How to design a multi-region SaaS in 2026

Multi-region SaaS design in 2026 means picking one of three patterns: read-replicas with a single writer region, full multi-master via Spanner / CockroachDB / Yugabyte, or edge runtime with regional d

May 24, 2026 · 11 min read
How to secure a SaaS API endpoint

To secure a SaaS API endpoint, stack defenses in layers: TLS in transit, authenticated sessions or JWTs at the edge, per-object authorization in the handler, schema-validated input with Zod, rate limi

May 24, 2026 · 12 min read
How to set up error tracking and logging for a startup

The day-1 stack for a startup is Sentry for errors, pino for structured logs shipped to Better Stack or Axiom, and a single Slack channel for alerts. Total cost: $0 to $50 a month until you're past 5,

May 24, 2026 · 10 min read
How to add observability to a Next.js app

To add observability to a Next.js app, instrument three pillars in this order: traces via OpenTelemetry through `instrumentation.ts` (stable since Next 14.0), metrics via Vercel Speed Insights plus a

May 24, 2026 · 11 min read
How to onboard a new developer to your codebase fast

To onboard a new developer to your codebase fast, set one goal: they ship a real pull request on day one. Hit that with a README that gets them running in 5 minutes, a 15-minute architecture-tour Loom

May 22, 2026 · 11 min read
How to design a SaaS for HIPAA from day 1

To design a SaaS for HIPAA from day 1, treat Protected Health Information (PHI) as a contaminant: catalog every field that touches it, run only on vendors that will sign a Business Associate Agreement

May 22, 2026 · 11 min read
How to design a multi-tenant Postgres schema

The default multi-tenant Postgres schema is a shared database with a `tenant_id` column on every tenant-scoped table, a composite index of `(tenant_id, ...)` on every query path, and Row Level Securit

May 19, 2026 · 10 min read
How to use Prisma in 2026

Use Prisma in 2026 as a typed query layer over Postgres or SQLite, with the new Rust-free query engine, driver adapters for serverless, and `prisma generate --no-engine` for edge deploys. Define your

May 17, 2026 · 11 min read
How to roll out feature flags safely

To roll out a feature flag safely, ramp on a fixed curve (1% → 5% → 25% → 50% → 100%), gate every step behind an error-rate check per cohort, and ship a kill switch that flips faster than your CI can

May 17, 2026 · 11 min read
How to write a postmortem after an incident

To write a postmortem after an incident, do five things in order: reconstruct a minute-by-minute timeline from logs and chat, run a five-whys analysis to find the system-level root cause (not the huma

May 17, 2026 · 12 min read
How to use server-sent events vs WebSockets

Use Server-Sent Events (SSE) when the server needs to push updates to the client and the client rarely sends data back (AI token streaming, live dashboards, notifications, progress bars). Use WebSocke

May 17, 2026 · 11 min read
How to write production-grade tests in 2026

Production-grade tests in 2026 are the ones that catch the bug *before* a paying customer does, and stay green through a year of refactors. Skip the testing pyramid. Optimize for integration tests aga

May 17, 2026 · 11 min read
How to implement OWASP Top 10 mitigations

To implement OWASP Top 10 mitigations in a startup, pick one Node/TypeScript fix per category and ship them in this order: access control middleware, parameterized queries, secrets out of git, depende

May 17, 2026 · 11 min read
How to handle secrets in production

Production secrets management means storing API keys, database URLs, signing keys, and tokens in a dedicated secrets manager (Doppler, Infisical, 1Password Secrets Automation, AWS Secrets Manager, or

May 17, 2026 · 11 min read
How to set up event-driven architecture

To set up event-driven architecture in 2026, pick a broker (Redpanda or AWS SNS+SQS for most teams), use the Outbox pattern from a transactional database to guarantee delivery, design events as past-t

May 17, 2026 · 10 min read
How to mock external APIs in tests

To mock external APIs in tests, intercept HTTP at the boundary (not inside your business logic), use Mock Service Worker (MSW) as the default for both frontend and Node, and pin every fixture to a spe

May 17, 2026 · 10 min read
How to write Vitest tests for Next.js apps

--- slug: vitest-tests-nextjs title: How to write Vitest tests for Next.js apps metaDescription: Set up Vitest for Next.js in 5 minutes, test the 5 layers that matter, skip async Server Components, an

May 17, 2026 · 11 min read
How to design webhooks for SaaS in 2026

To design webhooks for SaaS in 2026, start from the consumer's perspective: ship a stable event taxonomy with versioned payloads, sign every request with a rotatable secret, retry on an exponential cu

May 17, 2026 · 11 min read
How to handle data retention policies in SaaS

A SaaS data retention policy is a written rule plus an automated job that decides, for every table in your database, how long a row lives before it gets deleted, anonymized, or archived. The policy li

May 17, 2026 · 11 min read
How to Handle Long Running Tasks in Vercel (2026)

--- slug: long-running-tasks-vercel title: "How to Handle Long Running Tasks in Vercel (2026)" metaDescription: "Pick the cheapest pattern that fits your longest job. Fluid Compute, Workflows, queues,

May 15, 2026 · 11 min read
How to manage technical debt in a startup

To manage technical debt in a startup, treat it like a credit card you opened on purpose: take it on deliberately to ship faster, track every charge in Linear with a cost-of-delay tag, and pay down 20

May 14, 2026 · 12 min read
How to handle Stripe webhooks correctly

To handle Stripe webhooks correctly, do four things in order: parse the raw request body, verify the `Stripe-Signature` header with `stripe.webhooks.constructEvent`, store the `event.id` in a dedupe t

May 14, 2026 · 12 min read
How to set up E2E testing for a SaaS

To set up E2E testing for a SaaS in 2026, pick Playwright, write tests for five critical flows (signup, onboarding, billing, core happy path, account deletion), seed a fresh tenant per CI run, save au

May 14, 2026 · 11 min read
How to deploy Next.js on Render in 2026

To deploy Next.js on Render in 2026, create a **Web Service** from your GitHub repo, set the build command to `npm run build` and the start command to `npm start`, then add the env vars your app reads

May 14, 2026 · 10 min read
How to design a serverless backend in 2026

To design a serverless backend in 2026, pick a runtime model first (functions-as-a-service, container-on-demand, or always-warm), match the platform to your traffic shape, and solve the database-conne

May 14, 2026 · 11 min read
How to use Pulumi for infrastructure as code

Pulumi lets you define cloud infrastructure in TypeScript, Python, Go, or .NET instead of HCL, which means your application engineers can ship infra without learning a second language. The fastest pat

May 14, 2026 · 11 min read
How to write a technical specification that engineers actually follow

A technical specification document engineers actually follow has 10 sections (Problem, Goal, Non-Goals, Constraints, User Stories, API Contract, Data Model, Security, Rollout, Open Questions), fits on

May 14, 2026 · 12 min read
How to run integration tests in CI

To run integration tests in CI, spin up your real dependencies (Postgres, Redis, the queue) inside service containers or [testcontainers](https://testcontainers.com/), seed test data with factories, r

May 14, 2026 · 11 min read
How to use Postgres row-level security for SaaS

Postgres row-level security (RLS) for SaaS works in four moves: enable RLS on every tenant-scoped table, write `USING` plus `WITH CHECK` policies per operation, set a `tenant_id` session variable in y

May 14, 2026 · 10 min read
How to plan a software development sprint in 2026

Plan a software development sprint in 2026 by picking a cycle length your team actually ships in (1, 2, or 6 weeks), triaging the backlog with AI before the meeting, and running a 60-minute planning s

May 14, 2026 · 9 min read
How to set up structured logging in Node.js

To set up structured logging in Node.js, install Pino, configure it to emit JSON with `pino({ level: 'info' })`, attach a request-scoped child logger via `AsyncLocalStorage`, redact secrets with the `

May 14, 2026 · 11 min read
How to handle data residency for international SaaS

Data residency for SaaS means storing and processing each customer's data inside the legal jurisdiction they require, usually by routing tenants to region-specific stacks (EU, US, India, Australia, KS

May 14, 2026 · 11 min read
How to set up monitoring for a SaaS app in 2026

To monitor a SaaS app in 2026, install Sentry for errors, Better Stack for uptime and on-call, PostHog for product analytics, and lean on your host's built-in metrics (Vercel, Render, Fly). Total cost

May 14, 2026 · 12 min read
How to implement multi-tenancy in SaaS in 2026

To implement multi-tenancy in SaaS in 2026, default to a shared Postgres database with a `tenant_id` (or `org_id`) column on every business table, Postgres Row Level Security policies that filter by `

May 14, 2026 · 11 min read
How to handle data deletion (right to be forgotten)

Handling a GDPR data deletion request means soft-deleting the user's account, waiting a 30-day grace period, hard-deleting with a database CASCADE, fanning the deletion out to every sub-processor (Str

May 14, 2026 · 11 min read
How to use Zod for API validation

To use Zod for API validation, define a schema with `z.object()`, parse incoming requests with `safeParse()`, and infer your TypeScript types directly from the schema using `z.infer<typeof Schema>`. O

May 14, 2026 · 11 min read
How to estimate software development time accurately

To estimate software development time accurately, get a 3-point estimate (best, likely, worst) from the engineer who will do the work, run it through PERT = (best + 4 × likely + worst) / 6, then multi

May 14, 2026 · 9 min read
How to implement authentication in 2026 (without building it yourself)

To implement authentication in 2026, do not build it yourself. Pick a managed provider that matches your product shape (Clerk for B2C polish, Auth0 for enterprise compliance, WorkOS for B2B SSO, Bette

May 8, 2026 · 11 min read
How to implement optimistic UI in React

To implement optimistic UI in React, use the React 19 `useOptimistic` hook inside a `startTransition` or Server Action: render the assumed result instantly, await the mutation, and let React revert au

May 8, 2026 · 11 min read
How to do API versioning correctly in 2026

API versioning in 2026 means picking one of four patterns (URI, header, query, date) and committing to additive-only changes plus a 12-month deprecation runway. URI versioning (`/v1/`, `/v2/`) is the

May 8, 2026 · 10 min read
How to handle email deliverability for SaaS

Email deliverability for SaaS is an engineering problem, not a marketing one. Split transactional and marketing mail onto separate sending subdomains, warm new IPs on a scripted ramp from 50/day to yo

May 8, 2026 · 11 min read
How to set up a microservices monitoring stack

A 2026 microservices monitoring stack is OpenTelemetry SDKs in every service, an OpenTelemetry Collector aggregating the data, and a vendor of your choice (Datadog, Honeycomb, Grafana Cloud) or self-h

May 8, 2026 · 11 min read
How to optimize Postgres queries in 2026

To optimize Postgres queries in 2026, start with `pg_stat_statements` to find your slowest queries, run `EXPLAIN (ANALYZE, BUFFERS)` on the worst offender, then pick the right index type for the acces

May 8, 2026 · 8 min read
How to migrate from monolith to microservices

Most teams should not migrate from monolith to microservices in 2026. The strangler-fig pattern works only at scale (above roughly 50 engineers with separate release-cadence pressure across teams). Fo

May 8, 2026 · 11 min read
How to do code reviews effectively in 2026

To do code reviews effectively in 2026, let an AI reviewer (CodeRabbit, Greptile, Bito, or Cursor BugBot) clear the syntax floor in under four minutes, then spend your human attention on intent, invar

May 8, 2026 · 12 min read
How to handle database migrations safely in production

To handle database migrations safely in production, use the expand-migrate-contract pattern, set `lock_timeout` and `statement_timeout` before any DDL, test the migration on a Neon branch first, and r

May 8, 2026 · 12 min read
How to set up disaster recovery for a SaaS

Disaster recovery for a SaaS is the engineering discipline of getting your product back online (RTO) with acceptable data loss (RPO) after something breaks. The five artifacts you need: written RPO/RT

← All posts