Search for a command to run...

This is the first post on Hakim, and I want to start with the platform itself โ because the most honest introduction to how I build software is the system you are reading this on.
Nothing in this setup is a demo topology from a tutorial. This blog runs on infrastructure I operate end to end: a Next.js frontend on Vercel, an ASP.NET Core API in Docker on a small Linux server, PostgreSQL for data, Redis for caching, and Cloudflare in front of all of it. When you typed abdullahhakim.me and pressed Enter, your request took a specific path through those pieces. This post traces that path, step by step, exactly as it runs today.
Your browser does not know where abdullahhakim.me lives, so it asks DNS. My DNS is managed by Cloudflare, which answers from the edge location nearest to you. Then comes the TLS handshake: your browser and the server agree on encryption before a single byte of the page moves. That is the https:// and the padlock.
On a personal blog this can look like ceremony, but the rule I follow is simple: if it travels over the internet, it travels encrypted. Login tokens and comments cross the same connection as the HTML.
The HTML you receive is rendered by a Next.js (React) frontend hosted on Vercel. I use Next.js for one main reason: server rendering. The post you are reading was turned into HTML on the server side, not assembled in your browser from a blank page and a pile of JavaScript. That means a fast first paint and pages a search engine can actually read โ for a blog, SEO is not decoration, it is the distribution channel.
Rendered pages are cached and revalidated in the background (ISR), so most readers get a ready page from Vercel's edge instead of triggering a fresh render. The frontend is bilingual: every post exists in English and Arabic, and the Arabic pages render right-to-left.
Page data โ the post body, tags, comments, like counts โ does not live in the frontend. The frontend calls a separate origin, api.abdullahhakim.me, which is where my backend lives. Splitting the two means the frontend and the API deploy and fail independently: a frontend redeploy never restarts the API, and an API rebuild never touches the pages.
api.abdullahhakim.me also resolves to Cloudflare โ but there is no public server address behind it. The connection works the other way around: a small daemon on my server (cloudflared) keeps an outbound tunnel open to Cloudflare, and requests are forwarded down that tunnel to the API, which listens only on the machine's local interface.
I like this arrangement for a concrete reason: the server exposes no inbound ports to the internet. There is no API port for scanners to knock on. Cloudflare is the only public entrance, and the machine only ever dials out.
The tunnel ends at a Docker Compose stack of exactly three containers on a private network:
api โ the ASP.NET Core 8 backend (the subject of Part 2).
postgres โ PostgreSQL 16, the only place data permanently lives: posts, translations, tags, comments, users.
redis โ Redis 7, an in-memory cache in front of the database.
Reading a post is cache-aside: the API checks Redis first; on a miss it queries PostgreSQL through EF Core, then stores the result in Redis for ten minutes. I measured this on the server: a cached read answers in roughly 1โ2 ms, and a read that has to reach the database lands around 5โ10 ms. The point of the cache here is not the milliseconds โ on a machine this small, both paths are fast. The point is that a traffic spike hits memory instead of multiplying database queries.
This was not the first setup. The blog started life on Azure, and when the student subscription behind it expired, I had a choice: pay for managed hosting I barely used, or rebuild the platform on infrastructure I control and actually understand. I rebuilt it โ the frontend moved to Vercel, and the backend came home to containers on a small Linux machine.
What I kept from the managed version is the discipline, not the bill: separate frontend and API, encrypted traffic only, a cache in front of the database, and a server with no public doors. What I dropped is everything I could not explain the cost of.
That is the journey your request took to read this post. In Part 2, I open the API container itself โ Clean Architecture, CQRS with MediatR, and the exact handler that fetched this page's data.
When you open abdullahhakim.me, your request crosses Cloudflare, a Next.js frontend on Vercel, a tunnel into a small server I run myself, and an ASP.NET Core API backed by PostgreSQL and Redis. This post traces that exact path โ the real one, as it runs today.
I've shipped CQRS with MediatR in two real systems โ and deliberately left it out of a third. Then I pointed my own CQRS mapping tool at this blog, and it showed me where my pipeline was bluffing.
Inside the API from Part 1: an ASP.NET Core 8 backend in Clean Architecture and CQRS โ 63 requests, 63 handlers, one validation pipeline โ and the real handler code that serves every post on Hakim.