Learning Resources

Tutorials

Step-by-step guides and in-depth articles to level up your skills.

Page 5 of 9

How to Structure Error Responses for APIs

Return consistent, machine-readable error objects with a code, message, details, and request ID so clients can handle errors programmatically.

Data Integrity

I18n Validation Messages

Localize validation messages by passing a message key and parameters to the schema, then resolving them through a translation function at render time.

Form Validation

JSON Schema Boundary Validation

Validate untrusted request bodies with JSON Schema at the API boundary, reuse the schema for client forms, and evolve it with compatibility checks.

Form Validation

Large File Resume Upload

Resume a large upload after a drop by tracking confirmed ranges, re-requesting only the missing part, and verifying the assembled file with a checksum.

File Upload

Multi-File Upload Queue

Queue multiple uploads with a bounded concurrency, retry each independently, and report per-file and overall progress without blocking the UI thread.

File Upload

Nested Zod Schema Validation

Compose nested Zod schemas for deeply structured forms, discriminate unions, and surface field-level errors with type-safe parse results.

Form Validation

Binary Packaging with esbuild

Bundle a Node CLI into a single file with esbuild, mark node deps external, and add a shebang so the output runs as a bin on any machine with Node.

Cli Tooling

Bulkhead Isolation

Partition resources like connection pools by tenant or feature so a flood in one cannot starve the others, and a failure stays contained.

Resilience

Cancellation Propagation

Propagate an AbortSignal through async layers so a user cancel stops all in-flight work, and each layer cleans up on abort.

Resilience

Chalk Structured Output

Color CLI output with Chalk to signal severity, keep color optional with a no-color flag, and structure lines so they parse as well as they read.

Cli Tooling

Circuit Breaker Pattern

Wrap a flaky call in a circuit breaker that trips after N failures, half-opens to test recovery, and fails fast instead of queuing doomed calls.

Resilience

CLI Argument Parsing

Parse argv with a typed schema so flags become typed values, unknown flags fail, and a usage message prints on a parse error.

Cli Tooling

CLI Config File

Load CLI config from a file with layered overrides for flags and env, validate it with a schema, and fail closed on an invalid config.

Cli Tooling

CLI Progress Reporting

Report progress for a long CLI task with a single-line spinner or a bar, throttle redraws, and clear the line on completion for clean logs.

Cli Tooling

CLI Scaffold Generator

Generate a project scaffold from templates with variable substitution, conditional files, and a post-install hook so the user gets a runnable project.

Cli Tooling

Commander Subcommands

Structure a CLI with Commander subcommands, share options, and keep help readable as the command tree grows beyond a handful of actions.

Cli Tooling

Concurrent Request Control

Bound concurrency with a pool so you do not trip connection limits or saturate bandwidth, and let the rest queue until a slot opens.

Data Fetching

Error Retry Boundary

Retry transient failures with backoff, give up after a budget, and render a retry-able error boundary instead of a blank page when the budget is spent.

Data Fetching

Graceful Degradation

When a dependency is down, serve a cached or partial result with a banner rather than failing the whole page, and keep the write path honest.

Resilience

GraphQL Cursor Pagination

Paginate a GraphQL list with cursors rather than offsets so inserts during paging do not shift the window, using the Relay connection spec.

Data Fetching

Health Check Endpoints

Expose liveness and readiness probes with different meanings, keep them cheap, and never let them depend on a slow dependency.

Resilience

Infinite Scroll Pagination

Load more as the user scrolls with an IntersectionObserver sentinel, keep the query key stable, and avoid fetching the same page twice on overlapping events.

Data Fetching

Inquirer Interactive Prompts

Add interactive prompts with Inquirer for choices, confirmations, and multi-select, with sensible defaults so the CLI works non-interactively too.

Cli Tooling

JWT Claims Design

Choose the right claims for a JWT, use registered names like sub and exp, add custom claims for authorization, and keep the payload small and non-sensitive.

Auth Jwt

JWT Refresh Token Rotation

Rotate refresh tokens on each use, detect reuse as a theft signal, and keep access tokens short without forcing re-login on every call.

Auth Jwt

JWT vs Session Trade-offs

Compare stateless JWT sessions against server-side sessions, weigh revocation and size against lookup cost, and pick based on who verifies and how you log out.

Auth Jwt

Multi-Tenant JWT

Scope a JWT to a tenant with a tid claim, enforce tenant isolation in every query, and prevent cross-tenant access through a forged or reused token.

Auth Jwt

OAuth2 PKCE Flow

Add a code challenge to the OAuth2 authorization code flow so a public client like a SPA cannot have its code intercepted, without a client secret.

Auth Jwt

Optimistic Updates

Apply a write to the UI before the server confirms, roll back on error, and keep the window small so a failed update does not confuse the user.

Data Fetching

Rate Limiting Strategies

Pick a rate limit strategy, fixed window, sliding window, or token bucket, and apply it fairly per caller so one client cannot starve the rest.

Resilience

Request Deduplication

Deduplicate in-flight requests by key so concurrent callers share one fetch, cache the result, and avoid doubling load when components mount together.

Data Fetching

Retry with Backoff

Retry a transient failure with exponential backoff and jitter, cap the attempts, and classify which errors are worth retrying.

Resilience

RS256 Key Management

Sign JWTs with RS256 using a key pair, rotate keys with a kid header, and publish the public key in a JWKS endpoint for verifiers.

Auth Jwt

Short-Lived Access and Refresh Tokens

Split auth into a short access token for API calls and a longer refresh in a cookie, so a stolen access token expires fast and refresh is bound to one origin.

Auth Jwt

Single Flight Dedup

Collapse concurrent identical expensive calls into one in-flight work so the result is computed once and shared with all waiters.

Resilience

SSR Prefetch Data

Prefetch data on the server and pass it to the client as dehydrated state, so the first paint is full and the client hydrates without a flash of empty content.

Data Fetching

Stateless Session with JWT

Put the session in a signed JWT so the server keeps no session table, enforce expiry and claims, and accept the trade-off that revocation needs a list.

Auth Jwt

SWR Cache Strategy

Use SWR to cache, revalidate, and dedupe fetches in React, with a focus on key design and the revalidate-on-focus policy for fresh data.

Data Fetching

TanStack Query Invalidation

Use TanStack Query invalidation to refetch only the queries a mutation touches, with query keys as arrays and partial invalidation by prefix.

Data Fetching

Testing CLI Commands

Test a CLI by invoking its action with argv and a mock stdout, assert the exit code and output, and avoid spawning a process for every case.

Cli Tooling

Timeout Cascade Control

Set per-hop timeouts tighter than the caller budget so a slow leaf does not hold the root, and propagate cancellation up the chain.

Resilience

Token Revocation List

Keep a bounded revocation list of jti values to force logout before expiry, prune expired entries, and check it on every verify without a session table.

Auth Jwt

React Hook Form Async Validation

Wire async validators into React Hook Form, debounce server checks, and resolve field errors without blocking the submit button.

Form Validation

S3 Presigned Upload

Let the browser upload straight to S3 through a presigned URL so your server never proxies the bytes, with a short-lived PUT and a content-type constraint.

File Upload

Streaming File Uploads in Node

Stream multipart uploads straight to storage without buffering in memory, enforce size limits mid-stream, and abort on limit breach.

File Upload

Upload Progress Reporting

Report upload progress with XMLHttpRequest upload.onprogress or fetch with a streaming response, and render a percent without re-rendering on every byte.

File Upload

Valibot Lightweight Runtime Validation

Adopt Valibot for tree-shakeable schema validation that ships a fraction of Zod bytes while keeping a comparable ergonomic API.

Form Validation

Building a Data Contract Between Services

Define the fields, types and guarantees a producer owes its consumers, enforce the contract in tests, and evolve it without breaking downstream jobs.

Data Integrity

Building Incremental ETL with Watermarks

Extract only what changed since the last run with durable watermarks, handle late data, and make reruns idempotent instead of duplicating rows.

Data Integrity

Caching LLM Responses with Semantic Keys

Cache model answers by meaning rather than exact text, set a similarity threshold that bounds false hits, and invalidate entries when prompts or models change.

Resilience

Chunking Strategies for Embedding Pipelines

Choose chunk sizes, overlaps and boundaries that keep retrieved passages meaningful, then measure how each strategy affects recall before committing to one.

Data Integrity

Detecting Data Drift in Production

Compare live feature and prediction distributions against training baselines, choose tests that catch real drift, and alert only when the shift matters.

Data Integrity

Enforcing JSON Schemas on LLM Output

Constrain model output to a schema, validate every response before trusting it, and repair or retry invalid payloads without looping forever or hiding failures.

Data Integrity

How to Achieve Reproducible Builds

Make a build produce byte-identical output from the same source, so you can verify an artifact was built from the code you reviewed.

Cli Tooling

How to Advertise HTTP/3 with Alt-Svc

Offer HTTP/3 alongside HTTP/2 with the Alt-Svc header, using a compatible port, migration and fallback so clients upgrade safely.

Resilience

How to Apply Semantic Conventions to Spans

Name spans and label attributes with OpenTelemetry semantic conventions so traces are consistent and queryable across services and languages.

Config Management

How to Avoid Async Deadlocks

Recognise and prevent deadlocks in async code: lock ordering, bounded waits, transaction scope and cancellation so a stall is impossible or fails fast.

Resilience

How to Build JS Monorepos with Bazel

Use Bazel for hermetic, incremental JavaScript builds: BUILD targets, the dependency graph, remote caching and correct globals.

Cli Tooling

How to Bundle a Library with Rollup

Build a publishable library with Rollup: multiple output formats, external peer deps, type declarations and preserving tree shaking.

Cli Tooling

How to Choose a Log Level Strategy

Assign levels by what an operator does with the line, keep structured fields, and control volume so logs stay useful and affordable.

Resilience

How to Choose a Primary Key Type

Pick between auto-increment, UUID and time-ordered identifiers by weighing index locality, predictability and uniqueness.

Data Integrity

How to Communicate During an Incident

Run an incident with a clear commander, a single channel and regular status updates so responders and stakeholders stay aligned.

Resilience

How to Control Metric Cardinality

Keep time-series storage affordable by limiting label combinations, avoiding unbounded dimensions and aggregating high-cardinality data.

Resilience

How to Define SLIs and Error Budgets

Turn reliability goals into measurable service level indicators and error budgets that decide when to ship features and when to stop.

Resilience

How to Design Actionable Alerts

Turn monitoring signals into alerts a human can act on, with thresholds from your SLO, grouping, and a runbook per alert.

Resilience

How to Detect Event Loop Starvation

Measure event loop lag and per-phase time to find the synchronous code that starves I/O, and fix latency spikes that come from your own process.

Resilience

How to Detect Schema Drift in Data Pipelines

Catch producer changes before they corrupt downstream tables: compare observed schemas against a pinned contract and quarantine the records that diverge.

Data Integrity

How to Detect Typosquatted Packages in CI

Catch typosquatted and malicious dependencies in CI with name-similarity checks, allow-lists, lockfile review and install-script blocking.

Security Boundaries

How to Enable TLS 1.3 Early Data

Use TLS 1.3 0-RTT early data to cut a round trip on resumed connections, and restrict it to safe requests to avoid replay.

Security Boundaries

How to Fuzz Parsers and Decoders

Feed malformed input to parsers automatically so crashes, hangs and wrong-but-accepted output surface before attackers find them.

Data Integrity

How to Generate an SBOM in CI

Produce a software bill of materials for every build so you can answer within minutes whether a new vulnerability affects you.

Security Boundaries

How to Handle Expect: 100-continue

Use the Expect: 100-continue handshake to avoid uploading a body a server will reject, and implement it correctly on both client and server.

Resilience

How to Implement a Bounded Work Queue

Keep a work queue from growing without bound by applying backpressure, priorities and deadlines instead of accepting unlimited tasks.

Resilience