Writing

What I wrote down while building things. The system design entries come first, then everything else.

System design

I’m still learning system design, by building things and putting them online. An entry only goes up once a deployed project is behind it, so each one links to something you can open, install or read the source of. Where I got it wrong first, that is in the entry too.

  1. I Built an Online Fighting Game That Costs Nothing to Run

    Kursi Fighter is a browser fighting game with peer-to-peer rollback netcode on Cloudflare’s Free plan. How the Fight, the netcode and Ranked Fights work.

    · Backed by Kursi Fighter

  2. I Audited My Own Payment SDK. It Accepted Forged Callbacks.

    I audited nepal-payment-go and found that v1 accepted forged callbacks. The v2 fixes, the threat model, what I tested live, and the design that came next.

    · Backed by Nepal payment SDK

  3. Putting 141 Hydro Plants on a Map of Nepal by River Basin

    How the NTX hydro page works: a hand-reviewed plant table, nine river basins, a static SVG map, and daily rain and discharge for every plant.

    · Backed by NTX

  4. Building a Unified Payment SDK for Nepal in Go

    A type-safe Go SDK that puts eSewa, Khalti, ConnectIPS and FonePay behind one interface and handles their HMAC signatures and RSA certificates.

    · Backed by Nepal payment SDK

  5. Introducing NTX: The Modern Way to Explore NEPSE

    How I built NTX, a fast, ad-free company snapshot and screener for NEPSE, with Go, ConnectRPC, SQLite and SvelteKit.

    · Backed by NTX

  6. How I Built a Go Library for the NEPSE API

    A type-safe Go client for NEPSE that runs the original css.wasm to handle tokens automatically, with structured errors, retries and a modular design.

    · Backed by NEPSE library

More entries follow as the projects grow. The code behind each one is on the projects page.

Other writing

How the labs were built, and what broke.

  1. Boids in a Small Box

    The home page fits 120 boids in a 600 by 400 plate, and the lab rules looked wrong there. What cohesion, perception radius and edges do when the box shrinks.

    Has a live lab boidssimulationcanvastypescript

  2. Making Game of Life Playable on a Phone

    The Game of Life grid drew 1,203 cells at six pixels each on a 390-pixel screen. What it took to make every cell a real tap target.

    Has a live lab accessibilitymobilesveltegame-of-life

  3. Migrating to SvelteKit 3: What Actually Broke

    The automated migration handles imports and config. Here are eight things it missed, from a crash in onDestroy to a pnpm workspace file Cloudflare refused.

    sveltekitsveltemigrationpnpmcloudflare

  4. Why My Pathfinding Visualizer Forgot Its Past

    For a year my pathfinding grid lit one cell at a time, because every step snapshotted the original grid instead of the live one. One working grid fixed it.

    Has a live lab algorithmspathfindingtypescriptdebuggingvisualization

  5. Redesigning My Site as a Magazine Spread

    I swapped a dark terminal look with a red accent for white stock, one cobalt ink, and numbered figures that are the labs themselves, running.

    designsveltekitportfolioprocess

  6. Dockerizing SvelteKit for Production

    A step-by-step guide to containerizing a SvelteKit app with Docker multi-stage builds, ending with a lean production image served by Nginx.

    dockersveltekitnginxdeploymentci-cd

  7. Building a Bagchal AI with Minimax for an Asymmetric Game

    Building an AI for the traditional Nepali board game Bagchal, with asymmetric gameplay, minimax optimization, and strategic evaluation functions.

    Has a live lab aigame-devsveltekitminimaxtypescriptnepal

  8. Building Conway's Game of Life in SvelteKit

    Implementing Conway's Game of Life with SvelteKit, covering cellular automata rules, performance optimization, and pattern library integration.

    Has a live lab gamedevsveltekittypescriptcellular-automatasimulation

  9. Building a DSA Visualizer and Its Animation Engine

    How I built an interactive data structures and algorithms visualizer with step-by-step animations, covering sorting, pathfinding and performance optimization.

    Has a live lab algorithmsvisualizationsveltekittypescripteducation

  10. Advent of Code 2024 Day 17: A 3-Bit VM and a Quine

    A 3-bit virtual machine written in Go, and a reverse search for the input that makes the program print itself.

    adventofcodequinego

  11. Cloudflare WARP on Arch Linux: Setup and Network Modes

    How to set up the Cloudflare WARP client on Arch Linux: configuration, choosing a network mode, and performance tuning.

    arch-linuxcloudflarewarpvpnprivacynetworking