Learning Resources

Tutorials

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

Page 3 of 9

How to Follow HTTP Redirects with a Cap

Follow redirects up to a cap, reject cross-origin redirects without consent, and never forward the Authorization header to a different host.

Data Fetching

How to Generate Thumbnails on Upload

Run a sharp or Pillow pipeline to generate thumbnails the moment an image upload completes so the UI has previews without a separate job.

File Upload

How to Handle Partial Offline Data Sync

Queue mutations made offline, replay them on reconnect, and merge conflicts with a last-write-wins or CRDT strategy so the user keeps working.

Data Fetching

How to Hot-Reload Config Without Restarts

Watch the config file, validate the new value, and swap atomically so a config change takes effect without a deploy or a dropped request.

Config Management

How to Implement CLI Update Notifications

Check the latest version from npm in the background and print a one-line upgrade hint so the user knows a new release exists without a forced update.

Cli Tooling

How to Implement RBAC with JWT Claims

Carry roles in a JWT claim and check them in a guard so an endpoint declares its required role and the middleware enforces it in one place.

Auth Jwt

How to Layer Env Vars with Fallbacks

Read env vars with type coercion and fall back to defaults so a missing var uses the default and a wrong type fails fast.

Config Management

How to Layer Environment Configs Safely

Merge config from defaults, file, env, and flags in a fixed order so the precedence is explicit and a later source overrides an earlier one.

Config Management

How to Localize Validation Messages

Map validation error codes to translated strings so the form shows the right language without changing the schema or the logic.

Form Validation

How to Prevent Double Form Submission

Disable the submit button and track in-flight state so an impatient user clicking twice never sends two requests to the server.

Form Validation

How to Prevent Open Redirects in OAuth

Validate the redirect URI against a registered list so a login does not bounce the user to an attacker-controlled site with a code in the URL.

Security Boundaries

How to Process Uploads with Backpressure

Apply backpressure in a Node stream pipeline so a slow consumer signals the producer to pause and memory stays bounded under bursty traffic.

File Upload

How to Reduce Re-Renders When Fetching

Keep fetched data in a stable reference, split selectors so only the component that needs the slice re-renders, and avoid inline objects in render.

Data Fetching

How to Report Upload Progress with Fetch

Use a fetch ReadableStream or XHR progress event to report byte-level upload progress to the UI so the user sees the bar move, not a spinner.

File Upload

How to Reset Forms Without Losing Data

Reset a form to initial values while preserving unsaved drafts in a separate buffer so a misclick does not destroy the user is work.

Form Validation

How to Sanitize HTML with DOMPurify

Pass user HTML through DOMPurify with an allowlist so script tags and event handlers are stripped before the HTML reaches the DOM.

Security Boundaries

How to Scan Uploads for Viruses Async

Pipe uploaded files to ClamAV in a background task so the user does not wait on the scan and infected files are quarantined after detection.

File Upload

How to Secure JWTs Against CSRF

Use a double-submit cookie so a cross-site request lacks the cookie-bound token and the server rejects it before the JWT is ever checked.

Auth Jwt

How to Show Accessible Error Summaries

Render a linked, aria-live error summary that lists every invalid field so screen reader users hear what to fix and can jump to it.

Form Validation

How to Store JWTs Safely in Browsers

Choose between httpOnly cookies and in-memory storage by the threat model, never localStorage for sensitive tokens, and defend against XSS and CSRF.

Auth Jwt