How this website was made

This is a simple website I made for my portfolio and blogs. It’s written in pure HTML, CSS, and JavaScript.

I want to build this website using as many raw tools that I can write myself as possible. Just for the fun of it.

Let’s get into the details of the fun.

Server setup

First, I needed a server for my site. I didn’t want to use any 3rd-party website hosting provider like Vercel or Netlify. Seems less fun. So I opened an AWS account. They provide a 1-year free tier. Managing a virtual machine and playing with website security is more fun.

I started an EC2 instance with 8 GB storage space and 1 vCPU. One of the long-term goals is to see how much performance I can squeeze out of this small virtual machine.

For beginners, I will make a setup guide later.

Domain registration

I bought this domain from Cloudflare. It was convenient, and I am used to working with Cloudflare from my job.

Then I set up the DNS record to point to my VM and enabled proxy. We need to hide our server's public IP address behind a proxy for security reasons.

Also, I used a rate limiter to restrict the number of requests served by my server. Really don’t wanna pay any bill :)

CI/CD pipeline

After I set up my server and Cloudflare, my server was ready and accessible from the web. I had a dummy webpage served temporarily.

Now the even more fun part. The repository for this website code is hosted on GitHub. But I don’t want to manually deploy every time I change something. So we need a CI/CD pipeline.

I know there are many tools available like Jenkins to run deployment tasks. I use Jenkins at my job. But I wanted to write everything myself.

Setting up webhook from GitHub

First, from my GitHub repository → Settings, I set up a webhook to send to my website. The webhook will be triggered for GitHub push and pull requests. Also, I carefully set up the authentication method and secret key. Most webhooks use HMAC-SHA256 signature for validation.

Lenkins: Lightweight Jenkins

Just for the fun of it, I named my webhook handler project Lenkins (Lightweight Jenkins).

Lenkins is written in Go. It's very simple so far. It performs the most basic functions. First, it validates the webhook. Then, depending on some conditions, it pulls the update from the repository and deploys it.

And voila, now everything is set up and I can edit my code and just push it to the main branch, and Lenkins will deploy it instantly.

Putting It All Together

So now I have a simple website written in HTML, CSS, and a bit of JavaScript. It’s hosted on my own virtual machine running on AWS, behind Cloudflare for security and performance.

The domain is managed by Cloudflare, which also takes care of hiding my VM’s IP address and rate-limiting traffic.

Any change I push to the GitHub repository triggers a webhook that hits my Go-based CI/CD tool — Lenkins. It pulls the latest code and deploys it automatically.

It’s fast, lightweight, and entirely under my control. Just how I like it.