AINextJS2 MIN READ
02.01.2026
.md

Building a Pixel Art Converter: From DOOM to Modern Portraits

Last updated: 02.01.2026

🎧

Building a Pixel Art Converter: From DOOM to Modern Portraits

Audio Narration

retro version of image

What started with that I was to laisy, to ask my friend for the origina file of the 8bit pixle art portrate of me. turned into a simple DOOM-inspired image converter. The project has evolved into a full-featured pixel art transformation tool. This project showcases how AI-assisted development can rapidly iterate on ideas, turning a nostalgic concept into a practical creative tool.

From DOOM to Portraits

The initial inspiration came from DOOM's iconic color palette - those distinctive reds, browns, and grays from the original PLAYPAL. I wanted to recreate that authentic retro look, so I implemented the true 32-color DOOM palette with nearest-color matching using Euclidean distance in RGB space.

But as the project grew, I realized the tool could do more than just DOOM aesthetics. I added a Portrait palette specifically optimized for human faces, with graduated skin tones, hair colors, and grayscale accents. This made the converter practical for profile pictures and avatars, not just retro gaming tributes.

Key Features

The final tool includes:

  • Seven Color Palettes

- DOOM (32 colors), Portrait (28 colors for faces), Skin Tones (20 realistic human tones), Game Boy, PICO-8, Commodore 64, and Grayscale

  • Floyd-Steinberg Dithering

- Error diffusion algorithm for smooth gradients

  • Pixel Scaling

- Adjustable pixelation from 1-16px for that chunky retro look

  • PNG Export

- Download your pixel art with timestamped filenames

Technical Implementation

Built with Next.js and the Canvas API, the converter uses a processing pipeline that applies effects in sequence: background removal → pixelation → color reduction or palette mapping. The Floyd-Steinberg dithering implementation distributes quantization error across four neighboring pixels (7/16 right, 3/16 bottom-left, 5/16 bottom, 1/16 bottom-right) for smooth gradients even with limited color palettes.

The interface includes a loading spinner during processing, since dithering can be computationally intensive. A responsive layout ensures the tool works on both desktop and mobile devices.

AI-Assisted Development

This project was built collaboratively with AI assistance, demonstrating how modern development tools can accelerate prototyping and iteration. From implementing authentic DOOM colors to optimizing portrait rendering, each feature evolved through rapid experimentation and refinement.

The result is a fun, practical tool that bridges retro gaming aesthetics with modern web development. Try it out at /image-converter and transform your photos into pixel art!

Continue Reading
varlock
NextJSSecurity5 MIN

Securing My Blog's Secrets with Varlock and Doppler

The author describes the security risks of traditional .env files in Next.js projects: secrets stored in plain text on local machines, duplicated across environments, and easily exposed through accidental commits or misconfigured deployments. Varlock is introduced as a structured, schema-based replacement for dotenv, using a committed .env.schema file that defines variable types, requirements, and sensitivity without storing actual secrets. It integrates with Next.js as a drop-in replacement for @next/env, providing TypeScript types, startup validation, sensitivity-aware client bundling, and log redaction. Doppler is chosen as the secrets provider for its generous free tier, clean dashboard, environment configs, and especially its native Vercel sync, which keeps secrets updated without tokens or runtime API calls. Locally, Varlock’s exec() calls the Doppler CLI to fetch secrets in memory; in production, Vercel’s environment variables are used directly, with the same schema validating both paths. Benefits include zero secrets on disk, early configuration error detection, automatic sensitivity handling, and an AI-friendly schema. The author would skip Varlock’s Doppler plugin next time and rely solely on the CLI-based exec() approach despite a small startup performance cost.

Read post
brewfather, mcp & ai
Home BrewingAI2 MIN

I Fed Brewfather's API to Claude and Built My Own MCP Server

Brewfather is a comprehensive app for homebrewers that manages recipe design, batch tracking, fermentation logs, water chemistry, and ingredient inventory, making it a central hub for homebrew recipes. An MCP (Model Context Protocol) server acts like a plugin that exposes local tools and data to an AI such as Claude, letting it call a locally run server without any cloud intermediary or custom UI. Using Brewfather’s REST API, the author fed the documentation to Claude and quickly generated a local MCP server that connects Brewfather to Claude Code. This setup enables three key capabilities: browsing and inspecting real Brewfather recipes, checking the brew schedule and batch stages, and verifying whether the ingredient inventory is sufficient for an upcoming brew day. The main benefit is turning brewing data into a conversational interface, so users can simply ask questions like whether they are ready to brew on a given day. Future extensions could include logging fermentation readings, auto-creating batches from recipes, and sending notifications as batches progress through stages.

Read post