Learning Resources

Tutorials

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

Page 4 of 9

How to Stream Partial JSON to the Client

Parse a JSON stream incrementally so the UI renders the first items before the full response arrives and the user sees progress not a spinner.

Data Fetching

How to Stream Uploads Without Buffering

Pipe a multipart upload straight to storage with Node streams so a 2 GB file never sits in memory and the server stays responsive under load.

File Upload

How to Sync Client and Server Schemas

Share one Zod schema between client and server so the validation rules never drift and a change in one place updates both sides.

Form Validation

How to Upload to S3 with Presigned URLs

Generate a presigned S3 URL so the browser uploads directly to the bucket and your server never proxies the bytes or pays for the bandwidth.

File Upload

How to Validate Credit Cards with Luhn

Implement the Luhn checksum to validate credit card numbers client-side, strip spaces, and reject obviously invalid input early.

Form Validation

How to Validate Dates Across Timezones

Parse, normalize, and compare dates across timezones with a library so a midnight UTC date does not become the wrong day locally.

Form Validation

How to Validate Enum Inputs in Forms

Validate select and radio inputs against an enum so a tampered POST with an out-of-range value is rejected at the boundary, not in the UI.

Form Validation

How to Validate JWT Claims Strictly

Check the issuer, audience, expiry, and required claims on every token so a token from the wrong audience or a missing role is rejected at the boundary.

Auth Jwt

How to Validate Multipart Boundaries

Parse multipart form data with a streaming parser that enforces boundary and part limits so a malformed request cannot exhaust the server.

File Upload

How to Validate Nested Data with Zod

Compose Zod object schemas to validate deeply nested data and collect every error path so the user sees all problems at once.

Data Integrity

How to Validate on Blur vs Submit

Choose when validation fires so blur gives early feedback without blocking typing and submit gives the full check before the request leaves.

Form Validation

How to Validate Password Strength Scores

Score password strength with a rule set for length, character classes, and entropy, show feedback live, and reject weak passwords at submit.

Form Validation

How to implement async form validation

Validate form fields against the server without blocking typing, debouncing requests and cancelling stale ones with AbortController.

Form Validation

How to implement CLI progress bars

Show a progress bar for long tasks by writing carriage returns to the same line, and hide it when stdout is not a TTY.

Cli Tooling

How to implement graceful degradation

Serve a reduced experience when a dependency is down by falling back to cached data or a default, never showing an error page for a non-critical feature.

Resilience

How to implement OAuth2 PKCE flow

Secure public-client authorization with PKCE by generating a code verifier, sending its challenge, and validating on token exchange.

Auth Jwt

How to queue work during outages

When a downstream service is down, enqueue the work in a durable queue and process it on recovery instead of failing the user request.

Resilience

How to sanitize HTML output against XSS

Encode data on output, not input, and use a context-aware encoder so values inserted into HTML, attributes, or script contexts are all safe.

Security Boundaries

How to secure JWT against CSRF

Store JWT in an httpOnly cookie with SameSite=strict and a double-submit token for stateless CSRF defense, not in localStorage.

Auth Jwt

How to stream partial JSON responses

Parse a large JSON stream incrementally as chunks arrive, so the UI can render the first items before the whole response downloads.

Data Fetching

How to sync conflicting concurrent edits

Resolve concurrent edits to the same record with last-write-wins per field or a CRDT merge, so collaboration does not silently drop changes.

Data Fetching

Aggregating Form Errors

Collect per-field and form-level errors into one structure, order them by severity, and render an accessible error summary that links to each field.

Form Validation

Cancellable Uploads with AbortController

Cancel an in-flight upload with AbortController, clean up the partial server-side artifact, and refund the UI to idle without leaked listeners.

File Upload

Chunked Resumable Upload

Split a large file into chunks, upload each with its own retry, and resume from the last confirmed chunk after a network drop without restarting.

File Upload

Conditional Required Fields

Make fields required based on another field value using discriminated unions or refine, so the schema encodes the dependency instead of the UI.

Form Validation

Cross-Field Validation Rules

Validate rules that span multiple fields like password confirm, date ranges, and conditional billing with a single refine over the whole form.

Form Validation

Debounced Async Validation

Debounce async field checks so the server is hit once after typing settles, cancel stale requests, and keep the submit button responsive during checks.

Form Validation

Drag and Drop Upload Zone

Build an accessible drag-and-drop zone that also works with keyboard and click, validates dropped files, and avoids the common dropoutside bug.

File Upload

File Type Sniffing

Sniff the real file type from magic bytes instead of trusting the extension or Content-Type, and reject mismatches before storing the upload.

File Upload

How to Build a Feature Flag Service

Design an in-process feature flag service with rules, gradual rollouts, and safe overrides that degrade gracefully when the flag store is unavailable.

Resilience

How to Build a Webhook Retry System

Deliver webhooks with exponential backoff, jitter, dead-letter queues, and idempotency to handle endpoint failures without losing events.

Resilience

How to Secure GraphQL Resolvers

Authorize every GraphQL resolver with field-level checks, depth limiting, and query cost analysis to prevent data leaks and expensive queries.

Security Boundaries