Skip to content

Instantly share code, notes, and snippets.

@horushe93
horushe93 / merging-images-secret-frontend.md
Created October 19, 2025 02:46
The Secret to Merging Images on the Frontend: A Canvas-Based Approach

The Secret to Merging Images on the Frontend: A Canvas-Based Approach

Image composition features power many modern web applications. Take background removal tools where users upload photos, strip away backgrounds, and add custom ones. Free Background Remover demonstrates this workflow: AI processes images while users customize results with solid colors or image backgrounds. Most developers send images to servers for composition, creating network delays and consuming infrastructure resources. The browser already has everything needed to merge images instantly without touching your servers.

The Problem with Server-Side Image Processing

Server-side composition introduces multiple pain points. Network latency dominates the user experience. Each upload and download cycle adds seconds of waiting. Users watch loading spinners for what should feel instant.

Server resources become a scaling bottleneck. Every composition consumes CPU and memory. Traffic growth demands prop

@horushe93
horushe93 / online-puzzle-games-similar-to-wordle.md
Created September 29, 2025 15:17
20 Online Puzzle Mini-Games Similar to Wordle in 2025

20 Online Puzzle Mini-Games Similar to Wordle in 2025

This compilation presents a curated collection of 20 online puzzle mini-games that share similar mechanics, daily challenge formats, or guessing elements with the popular word game Wordle. These games offer diverse puzzle experiences ranging from word-based challenges to logic puzzles, geography games, and mathematical brain teasers.

The games listed below represent various categories of puzzle entertainment, each offering unique twists on the core concept of daily puzzle-solving with limited attempts and feedback-based gameplay. Whether you're interested in expanding your vocabulary, testing your mathematical skills, or exploring geography and music knowledge, this collection provides engaging alternatives to keep your puzzle-solving skills sharp.

Game Collection Table

Name Link Type Description User Rating (out of 5)
@horushe93
horushe93 / building-credit-system-user-management-ai-application.md
Created September 21, 2025 15:21
Building Credit Systems and User Management for AI Applications

Building Credit Systems and User Management for AI Applications: Database Design Patterns That Scale

How to architect robust database schemas that power modern AI applications with credit systems, multi-provider authentication, and user-generated content at scale

The Challenge

Building AI applications requires rethinking traditional database design patterns. Unlike conventional web applications where operations complete instantly, AI systems process tasks asynchronously over extended periods while managing complex credit systems, tracking computational costs, and storing diverse content types. These unique requirements demand sophisticated database architectures that balance performance, consistency, and cost efficiency.

Modern AI applications face several critical database design challenges:

@horushe93
horushe93 / intelligent-prediction-state-management.md
Created September 11, 2025 04:15
Intelligent Prediction State Management: Building Scalable Storage Abstractions for AI Applications

Intelligent Prediction State Management: Building Scalable Storage Abstractions for AI Applications

Creating flexible, environment-adaptive storage systems that seamlessly switch between Cloudflare KV and Durable Objects while maintaining consistent state management across distributed AI processing pipelines

The Challenge

Modern AI applications face complex state management challenges that traditional database approaches struggle to address effectively. When building systems that process long-running AI tasks like image generation, video processing, or complex language model operations, developers encounter several critical problems:

Storage Flexibility Requirements: Different deployment environments and scaling requirements demand different storage solutions. What works in development may not be optimal for production, and what performs well under light load may fail under heavy traffic.

@horushe93
horushe93 / enterprise-grade-webhook-processing.md
Created September 10, 2025 02:51
Enterprise-Grade Webhook Processing: Securing AI Service Integration at Scale

Enterprise-Grade Webhook Processing: Securing AI Service Integration at Scale

Building bulletproof webhook handlers that protect against attacks while ensuring reliable AI task completion

The Challenge

Modern AI applications rely on external services for computational heavy lifting. These services communicate results through webhooks, creating critical security and reliability challenges:

Security Vulnerabilities: Webhook endpoints are publicly accessible attack vectors. Malicious actors can forge requests to trigger unauthorized actions, bypass payment systems, or access sensitive processing results.

@horushe93
horushe93 / building-non-blocking-ux-ai-tasks.md
Last active September 5, 2025 03:50
Asynchronous AI Processing Architecture: Building Non-Blocking User Experiences for Long-Running AI Tasks

Asynchronous AI Processing Architecture: Building Non-Blocking User Experiences for Long-Running AI Tasks

How to handle AI image generation requests that take 5-15+ seconds without blocking your users or consuming server resources?

The Challenge

AI-powered applications face a fundamental user experience challenge: modern AI tasks like image generation, video processing, or complex language model operations often require 5-30 seconds to complete. Traditional synchronous request-response patterns create several problems:

Connection Timeouts: HTTP requests timing out during long AI processing, leaving users with error messages instead of results.

@horushe93
horushe93 / rate-limitation-cloudflare-durable-object.md
Created August 30, 2025 02:16
Distributed Rate Limiting with Cloudflare Durable Objects

Distributed Rate Limiting with Cloudflare Durable Objects

The Challenge

When building AI-powered applications that generate images or process intensive tasks, rate limiting becomes crucial for preventing abuse and managing costs. Traditional rate limiting solutions face several challenges in serverless environments:

Stateless Nature: Serverless functions are ephemeral and cannot maintain state between requests, making it difficult to track request counts across multiple function invocations.

Distributed Environment: Requests are distributed across multiple edge locations and instances, requiring a centralized state management solution.

@horushe93
horushe93 / introduction-to-decker.md
Created June 28, 2025 15:07
Introduction to Decker: Your First Interactive Creation

Introduction to Decker: Your First Interactive Creation

Welcome to the world of Decker! If you've ever been curious about creating your own interactive stories, games, or multimedia projects, but felt intimidated by complex programming languages, Decker might be the perfect tool for you. In this article, we'll introduce you to Decker, explore its philosophy, and guide you through creating your very first interactive deck.

What is Decker?

Decker is a unique multimedia platform designed for creating and sharing interactive documents. It draws significant inspiration from classic tools like Apple's HyperCard, offering a nostalgic yet powerful environment for creative expression. Imagine a digital stack of index cards, where each card can contain text, images, and even interactive elements. That's the essence of Decker.

@horushe93
horushe93 / calculate-geographic-distance.md
Last active February 23, 2025 10:26
Calculating Geographic Distances: The Haversine Formula in TypeScript

Calculating Geographic Distances: The Haversine Formula in TypeScript

Introduction

When building location-based applications, one of the most common requirements is calculating the distance between two points on Earth. While it might seem straightforward at first, accurately calculating distances on a spherical surface requires some careful consideration. In this article, I'll share how I implemented this calculation for an educational geography game, Flagle Explorer.

The Challenge

The primary requirements for our distance calculation were:

  1. Accuracy suitable for educational purposes
@horushe93
horushe93 / color-mixing-algorithm.md
Last active August 19, 2025 13:46
RGB Color Mixing Algorithm: A Mathematical Approach to Digital Color Blending

RGB Color Mixing Algorithm: A Mathematical Approach to Digital Color Blending

Color mixing in digital space is fundamentally different from mixing physical pigments. While artists blend paints using subtractive color mixing, digital displays use additive color mixing with RGB values. This implementation demonstrates a precise mathematical approach to mixing RGB colors with specific proportions.

The Algorithm

Here's a TypeScript implementation that handles proportional color mixing:

typescript