CodeKits.shopNew developer offer

The CodeKits notebook

Ideas into working code.

Practical tutorials, project walkthroughs and development notes. Explore the code, understand the structure, and build something of your own.

16 articles · Newest first

Upload ID, Confirmed chunks, and Resume missing

Next.js

Add resumable uploads with progress and cancellation

Build resumable upload progress around server-confirmed chunks, distinguish pause from cancel, and recover safely after an uncertain response.

· 4 min read

blog canonical social rss sitemap workflow diagram

Next.js

Add canonical URLs, social cards, RSS and sitemaps

Give a Next.js blog consistent canonical URLs, share images, RSS and sitemap entries using one published-post collection and real dates.

· 3 min read

blog drafts scheduled publication workflow diagram

Next.js

Add drafts and scheduled blog publication

Use one publication rule for blog pages, listings, RSS and sitemaps, then account for timezone boundaries and cached pages when scheduling posts.

· 4 min read

blog image uploads metadata removal workflow diagram

Next.js

Resize blog images and remove camera metadata

Prepare blog images with bounded uploads, orientation correction, WebP resizing and metadata removal while keeping useful alt text and captions.

· 4 min read

Random token, Expiry + identity, and Private stream

Next.js

Build expiring download links with Next.js and MySQL

Design expiring private download links with random bearer tokens, hashed lookup values, database expiry and authorization at the download boundary.

· 4 min read

Diagram showing measure peak, then reduce input, then build elsewhere

Next.js

Build Next.js on a memory-limited VPS

Measure Next.js build memory, distinguish heap failures from OOM kills, and reduce avoidable work without silently skipping validation.

· 4 min read

Expired + idle, Deleting claim, and Remove + retry

Next.js

Clean up expired uploads without deleting active files

Use explicit upload states and expiring claims to clean abandoned data, retry storage failures and reconcile orphans without racing active transfers.

· 4 min read

Diagram showing build release, then start service, then proxy https

Next.js

Deploy Next.js on Ubuntu with Nginx and systemd

Deploy a Next.js release behind Nginx on Ubuntu, run it as an unprivileged systemd service, add HTTPS and verify each layer.

· 4 min read

Claim allowance, Commit decision, and Stream attempt

Next.js

Make download limits safe under concurrent requests

Use atomic database claims for limited downloads, define whether attempts or sessions count, and handle retries and ranges without overselling delivery.

· 4 min read

migrate php blog nextjs urls workflow diagram

Next.js

Move a PHP blog to Next.js and keep its URLs

Move a PHP blog to Next.js with an explicit URL inventory, permanent redirects, preserved publication dates and a tested rollback plan.

· 4 min read

nextjs markdown blog metadata workflow diagram

Next.js

Build a Markdown blog with Next.js metadata

Create a Markdown publishing pipeline with validated frontmatter, article metadata and readable dates in a Next.js App Router website.

· 4 min read

Foreground upload, Suspended / unknown, and Reconcile + resume

Next.js

Resume large uploads after iPhone browser suspension

Recover mobile uploads using server-confirmed chunks and explicit resume actions, without promising that iPhone browsers keep uploading in the background.

· 4 min read

Diagram showing build aside, then check candidate, then switch or revert

Next.js

Stage a Next.js release and roll back safely

Build Next.js in a separate release directory, smoke-test before promotion and restore a known-good release without overwriting live files.

· 4 min read

Choose a file, Bounded chunks, and Private staging

Next.js

Stream large uploads in Next.js

Stream bounded upload chunks into private storage, reject oversized bodies, and handle partial writes without holding the complete file in memory.

· 4 min read

Authorized list, ZIP stream, and Backpressure

Next.js

Stream ZIP downloads without buffering whole folders

Design a streaming ZIP export with an authorized immutable manifest, bounded resources, backpressure and explicit handling of interrupted archives.

· 4 min read

Relative path, Validate manifest, and Opaque storage

Next.js

Upload folders and preserve their directory tree

Preserve a selected folder's relative paths while rejecting traversal, duplicate portable names and file-directory conflicts before storing any bytes.

· 4 min read

Follow the RSS feed
Coding tutorials & development notes | CodeKits | CodeKits.shop