Home·Writings
Blog
Writings on backend, cloud & payments
Short notes on building systems.
How to Evaluate AI-Generated Python Code Safely
Score generated Python with hidden tests, a short-lived sandbox, and a separate check for complexity claims.
Building an AI Recommendation System with Python
From BMR/TDEE rules to content-based and collaborative filtering in FastAPI: features, cold start, evaluation, and what to keep out of the model service.
Building an LLM Evaluation Framework in Python
A practical LLM eval harness: benchmark tasks, deterministic checks, rubric scores, and JSONL run reports so prompt changes stop being vibes.
Deploying Dockerized Node.js Applications to AWS
Multi-stage Dockerfiles, ECR, ECS Fargate vs App Runner vs EC2, health checks, SSM secrets, and a GitHub Actions path that does not bake credentials into the image.
What LangChain Is (and a Tiny Chain You Can Run)
LangChain as orchestration glue for LLM apps, not magic: prompts, models, parsers, and a runnable mini chain for a fictional FAQ desk.
AWS MediaConvert + S3 + CloudFront for Video Streaming
On-demand video on AWS end to end: MediaConvert ladder in code, HLS output groups, immutable paths, CloudFront cache behaviors, CORS, and where the money goes.
Redis Distributed Locks for Payment Processing
Use Redis locks around payment work without trusting them too much: SET NX PX, Lua release, TTLs, fencing tokens, and database guarantees.
Node.js + Python Architecture for AI Applications
Splitting an AI product between a Node.js API and a Python service: who owns what, HTTP vs queues, timeouts, shared contracts, and when not to split.
What Shift Left in DevOps Actually Means
Shift left means catching bugs, security holes and broken infrastructure where they are cheapest to fix: on the laptop and in the pull request.
Running NestJS on EC2 with systemd
A systemd unit for a NestJS API on EC2: env file secrets, restart policy, graceful shutdown, journald logs and symlinked releases for near-zero-downtime deploys.
Building an RTMP-to-HLS Video Pipeline on AWS
Taking a live RTMP feed from an encoder to adaptive HLS on CloudFront: MediaLive vs nginx-rtmp on EC2, segment sizing, caching, and the latency vs cost trade.
How I Built Idempotent Payments with Redis and PostgreSQL
Stop double charges when mobile clients retry: an Idempotency-Key header, Postgres as the source of truth, and Redis as the fast path.
Next.js App Router SEO for a News Site: A Practical Guide
A practical Next.js App Router SEO pass for a news site: per-page metadata, server-rendered content, structured data, sitemaps and robots.
WebSockets vs SSE: Which to Use for Real-Time Features
A practical comparison: duplex vs one-way push. Use a rare site toast as the example of when SSE (or a short poll) beats an idle WebSocket per client.
AWS MediaConvert HLS: One S3 Bucket, One CloudFront
Why we kept uploads and MediaConvert HLS output on one S3 bucket and one CloudFront domain, and what has to stay in-region for job events.
S3 Transfer Acceleration with Presigned URLs: How It Works
S3 Transfer Acceleration does nothing until presigned upload URLs hit s3-accelerate. When it speeds uploads, when it won't, and the one-line SDK fix.
Private S3 with CloudFront OAC for Media Uploads
A walkthrough of wiring cover uploads behind a private bucket and CloudFront OAC, using a fictional newsroom, Northlight Press, as the demo.
Why "API Complete" Doesn't Mean Production Ready
Endpoints celebrate. Launch checklists look at money moves, invitation state, and incomplete decisions.
How I publish here
This site’s blog is plain Markdown in git: no database, no CMS panel.