Double-Entry Bookkeeping, Explained Through a Digital Wallet

Double-Entry Bookkeeping, Explained Through a Digital Wallet A ledger sits at the core of any fintech system — it’s the source of truth for who has what and who is owed what. Working in that space, it’s worth understanding double-entry bookkeeping properly rather than treating balances as opaque numbers in a database row. This is a writeup of that exploration: the fundamentals of double-entry, worked through a virtual wallet platform, with the points that are easy to get wrong called out explicitly. ...

June 15, 2026 · 7 min · Anil Paudel

Building OAuth 2.0 From Scratch in Go — Part 1: The Authorization Code Flow

Building OAuth 2.0 From Scratch in Go — Part 1: The Authorization Code Flow You’ve clicked “Log in with Google” a hundred times. This is what’s happening on the other side — built from scratch, in three small Go servers you can run yourself. Why build it instead of reading about it OAuth 2.0 has a reputation for being confusing, and I think the reason is that most explanations start with the vocabulary — “resource owner,” “bearer token,” “grant type” — before you have anything to hang it on. So I did the opposite: I built the whole thing. Three tiny Go programs, three roles, one flow, end to end. By the time the photos showed up in the browser, the vocabulary had explained itself. ...

June 10, 2026 · 12 min · Anil Paudel

Layered Error Handling in Go

When I started building HTTP services in Go, my error handling was a mess — and I didn’t notice until the project got big enough to hurt. Every handler decided its own HTTP status. One endpoint returned 400 for a missing record; another returned 404 for the same thing. Validation errors came back in the raw shape of the validator library. My repository returned plain errors.New("not found") strings that the handler had to pattern-match. And one memorable afternoon I found a raw Postgres error — table names and all — sitting in a JSON response I’d shipped to the frontend. ...

June 1, 2026 · 12 min · Anil Paudel