The Architecture of Intent: How I Rebuilt My Digital Home

The Architecture of Intent: How I Rebuilt My Digital Home
The following image was generated by AI and has obvious flaws.

In Pakistan, we are masters of the "workaround." We find ways to make things flow when systems are rigid or non-existent. For a long time, my digital life was a series of these workarounds. I am a teacher, a writer, and a 3D-printing hobbyist—roles that generate a mountain of data, insights, and resources.

But for the longest time, that data was homeless.

I had a library of 600+ books scattered across WhatsApp chats, local folders, and a lonely server directory. I had essays living in half-finished drafts and a 3D-printing hustle that required manual invoicing. My digital "quality of life" was plummeting because I was spending more time searching for my work than actually doing it.

This website—this Ghost instance—is the centerpiece of a journey to reclaim that time. It wasn't just about "launching a blog"; it was about building an ecosystem.

The Catalyst: The 600-Book Problem

As a teacher, I have a responsibility to consume and replicate information with total comprehension. To do that, I need my library to be accessible, not just "stored." When you have 20 books, a folder is fine. When you have 600, a folder is a graveyard.

I knew I needed a self-hosted solution. I didn't want my data sitting on a corporate cloud where I was the product. I started at selfh.st and found Kavita. It was the first "brick" in the wall. It provided a beautiful, Netflix-style interface for my PDFs and ePubs, deployable via Docker.

But a library needs a desk next to it. That’s where Trilium came in—a specialized, hierarchical note-taking app that allowed me to think in branches and links rather than flat files.1

The Technical Wall: Nginx and the 200-Line Nightmare

The vision was simple: I wanted my library (Kavita), my brain (Trilium), and my voice (Ghost) to live on one high-performance Hostinger VPS.

But as I started deploying, the "clutter" followed me into the backend. I was managing everything via the terminal, and my Nginx configuration was becoming a monster. I had written over 200 lines of config code just to route traffic properly. It was fragile. One typo, and the whole house of cards would fall. Nginx is powerful, but it wasn't built for the fluid, modular nature of Docker stacks.

I was hitting a ceiling. I needed a way to monitor my "ship" without staring at a black terminal screen all day.

The Solution: Dockge and the Magic of Caddy

Two discoveries changed the trajectory of this project:

  1. Dockge: A crisp, web-based manager for Docker Compose stacks.2 Suddenly, I could see my entire ecosystem at a glance. No more guessing which container was eating memory.
  2. Caddy: This was the "God-send." Someone on Discord mentioned it as a modern alternative to Nginx. I migrated my entire setup to Caddy, and my 200-line Nginx nightmare shrunk to less than 10 lines of code. It handled my SSL certificates automatically and communicated with my Docker containers effortlessly.

With these two tools, the friction disappeared. Within two hours, I had a persistent, rock-solid stack.

The Final Ecosystem

What you see here on this Ghost site is just the "front porch" of a much larger house.

Today, my workflow looks like this:

  • I find a new book or research paper.
  • I drag it into Nextcloud.
  • Because of the way I’ve mapped my Docker volumes, Kavita sees that folder instantly. The book is indexed and ready to read on my phone or tablet before I’ve even closed my laptop.
  • I take notes in Trilium, which are then refined into the essays you read here on Ghost.
  • I even integrated an invoice generator into this setup to keep my 3D-printing side hustle organized.

Why "Self-Hosted" Matters

People often ask why I don't just use Notion, Medium, or Google Drive.

The answer is ownership. In a world of monthly subscriptions and changing Terms of Service, I wanted a place that was truly mine. By using open-source tools and managing them through a lean Docker stack, I’ve built a "Homelab" in the cloud that costs less than a couple of cups of coffee a month but provides more value than any "Pro" subscription ever could.

This site isn't just a blog. It’s a testament to the open-source community and a reminder that with the right tools—and a few hours of troubleshooting—you can build exactly the world you want to live in.

Next on the horizon? Integrating LearnHouse to bridge the gap between my library and my students. The journey, as they say, is just beginning.