Digital DIY: Building My New Website from Scratch

I’ve been planning to do this for a while now. I’ve been stuck making decisions about how to go about it, such as the design, which framework to use, and other choices that led to decision paralysis.

For work, I mainly use Node.js on the backend and React.js on the frontend. I wanted to try something new. That’s why in the past months, I’ve been learning Rust. They say it’s challenging, but many find it intriguing. I started a personal project, a desktop cycling app, using Rust for the backend and Svelte for the frontend. Through this, I’ve seen the potential of Svelte, and I found myself enjoying it more than React. I’ll discuss this further in a future blog post.

I’ve completed the basic functionality of the cycling app, and it got me thinking about creating a personal website. I initially considered using Rust for the backend API, but I realized Rust is better suited for desktop apps and CLI programs than for web APIs. So, I explored Go, which has been on my bucket list.

At first, I searched for a suitable routing framework for Go and found several options like Gin or Beego. I stumbled upon a framework called Fiber. Fiber seemed similar to Express.js, which felt more comfortable for me, coming from a Node.js background. I planned to use Svelte for the frontend.

High-Level Architecture

My plan was to keep it simple—a website with blog posts and related pages. I also considered adding an admin page for editing/creating posts but decided not to overcomplicate it, so I kept it in a monorepo.

High-level Architecture

The backend had endpoints for post manipulation and authentication. I used a simple SQLite database since I only store lightweight posts. You could read more about when to use SQLite here. SQLite is different from most SQL databases because it doesn’t require a separate server. Instead, it directly interacts with regular disk files. To keep the data safe, an AWS S3 bucket is used as a backup storage. Every day at 1 am, a copy of the database is sent there.

I used SvelteKit for easier UI development and to leverage SvelteKit’s SSR and SEO optimizations. For styling, I employed Tailwind CSS because it made implementing light/dark mode easy.

I’m delighted with the results of my work, and I’ve learned a lot during development, thoroughly enjoying the process. This isn’t the final version, as there’s room for improvement, but for now, it’s okay.

Once I finalize everything, I’ll write a detailed post about the architecture.

Thank you for reading.