IAMUVIN

Blog

Blog

Technical writing on Web3, AI, and building things. Written by Uvin Vindula.

130 articles

Supabase & PostgreSQL12 min
IAMUVIN

Supabase Authentication: The Complete Guide for Next.js Apps

A hands-on guide to implementing Supabase Auth in Next.js 16 apps — email/password flows, OAuth providers, server-side middleware, Row Level Security, and the production gotchas I learned building uvin.lk, EuroParts Lanka, and FreshMart.

U
Uvin Vindula·July 15, 2024
DeFi Deep Dives13 min
IAMUVIN

DeFi Lending Protocols: How Aave and Compound Actually Work

A deep dive into DeFi lending protocols — utilization rates, interest rate curves, health factors, liquidation mechanics, flash loans, and a Solidity lending pool implementation. How Aave V3 and Compound V3 actually work under the hood.

U
Uvin Vindula·July 8, 2024
Full-Stack Engineering11 min
IAMUVIN

Zod Validation in Next.js: From Form Inputs to API Responses

A complete guide to using Zod v4 for runtime validation in Next.js applications. Covers form validation with Server Actions, API route validation, environment variable safety, external API response parsing, React Hook Form integration, custom error messages, and battle-tested validation patterns from production codebases.

U
Uvin Vindula·June 17, 2024
Web3 Development11 min
IAMUVIN

The Graph Protocol: Indexing Blockchain Data for dApps

A practical guide to indexing on-chain data with The Graph Protocol — from subgraph definition and schema design to event handlers, deployment on Subgraph Studio, and querying with GraphQL. Covers hosted vs decentralized network, performance optimization, and real patterns from production DeFi and NFT indexing.

U
Uvin Vindula·June 17, 2024
AI & Machine Learning10 min
IAMUVIN

LangChain vs Building from Scratch: When to Use a Framework

An honest comparison of LangChain versus building custom AI pipelines from scratch using the Anthropic SDK. After shipping production apps both ways, I break down when LangChain genuinely helps, when it actively hurts, and why most production applications are better served by a thin custom layer over the Anthropic SDK. Includes code comparisons, a decision framework, and the maintenance reality nobody talks about.

U
Uvin Vindula·June 10, 2024
Sri Lanka Tech Scene11 min
IAMUVIN

The Sri Lanka Tech Scene in 2026: What You Need to Know

An insider perspective on Sri Lanka's tech industry in 2026 — from the growing developer talent pool and startup ecosystem to blockchain adoption, infrastructure challenges, and opportunities for international companies looking to build teams in South Asia.

U
Uvin Vindula·June 10, 2024
Web3 Development10 min
IAMUVIN

ERC-721A: Gas-Efficient NFT Minting at Scale

A deep dive into ERC-721A — the gas-optimized NFT standard that makes batch minting dramatically cheaper than standard ERC-721. Real gas benchmarks, implementation guide with Merkle tree whitelists, delayed reveal mechanics, and common pitfalls from production drops I have shipped.

U
Uvin Vindula·June 10, 2024
AI & Machine Learning11 min
IAMUVIN

Building an AI Content Generation Pipeline

A practical guide to building production AI content pipelines using Claude API with structured prompts, quality control layers, and human review checkpoints. Covers prompt design for consistent output, template systems, automated quality checks, SEO optimization, cost analysis with real numbers, and honest assessment of when AI content works and when it doesn't. Based on pipelines I've built for clients generating blog posts, product descriptions, and SEO content at scale.

U
Uvin Vindula·June 3, 2024
NFT & Digital Assets12 min
IAMUVIN

NFT Smart Contract Development: ERC-721 and ERC-1155 Guide

A complete guide to building NFT smart contracts with ERC-721 and ERC-1155. Covers on-chain SVG metadata, batch minting with ERC-721A, royalties with ERC-2981, gas optimization, security patterns, and deployment checklists.

U
Uvin Vindula·June 3, 2024
Blockchain Security12 min
IAMUVIN

Flash Loan Attacks: How They Work and How to Defend Against Them

A deep technical breakdown of flash loan attacks in DeFi — how attackers exploit atomic composability to manipulate prices, drain protocols, and hijack governance. Covers real exploits (Euler Finance, Beanstalk), oracle manipulation vectors, and battle-tested defense patterns with working Solidity code for TWAP oracles, timelocks, and circuit breakers.

U
Uvin Vindula·June 3, 2024
Web3 Development14 min
IAMUVIN

Building a Decentralized Exchange (DEX) with Solidity

A complete guide to building a Uniswap V2 style automated market maker (AMM) DEX from scratch — factory, pair, and router contracts in Solidity. Covers constant product formula, liquidity provision, swap execution, fee collection, slippage protection, and comprehensive Foundry testing. Security-first approach based on real DeFi client work.

U
Uvin Vindula·June 3, 2024
AI & Machine Learning10 min
IAMUVIN

Vercel AI SDK: Streaming AI Responses in Next.js

A production guide to streaming AI responses in Next.js using the Vercel AI SDK with Claude as the provider. Covers useChat, useCompletion, streamText, tool calling, custom providers, error handling, token counting, and cost control. Based on real implementations where streaming cut perceived latency by 80% and tool calling replaced brittle prompt chains. Includes the exact patterns I use to ship AI features at iamuvin.com and in client projects.

U
Uvin Vindula·May 20, 2024