Building HEYHEY — Scaffolding a Modern Web App In 2022
Why we chose to stick to the basics
We are now live on https://heyhey.to. While registrations are closed, we hope to open them slowly for users who want to help us in testing.
In my latest blog post, I wrote that I had chosen to revive an old project with some friends. Well, the project is anything but old now as we’ve opted for rebuilding everything from scratch. The reasoning behind this is actually nuanced, and I want to dedicate this post to explaining our decisions.
First, as a big fan of first-principles thinking, I usually reject doing (or using) something if I can’t comprehend the reason behind it. And when you look at the current trends in web development — especially the JavaScript/Node.js landscape — you see the opposite of what I like: people base their projects on whatever’s deemed the standard without questioning why, they install small libraries that depend on all sorts of things to add simple functionalities, and my favorite, they use JavaScript for the front-end just because the back-end is coded in it.
The excuse for all this? That developers either have enough time to ship products or learn stuff. This is true to some extent, which is why I love Node — but we have to balance convenience and quality.
The Monolith
Since we are not constrained by time, we started by making the lowest possible number of assumptions and proceeded carefully. For instance, instead of basing HEYHEY on Express, which has seen no significant updates for more than 7 years, we decided to go with Fastify. Express is great, but everything about Fastify — from the philosophy of its core team to its technical structure — gets me really excited about back-end development.
We made good use of Fastify’s excellent core plugins — beginning with a rate limiter, we implemented a static asset server, compressor, template engine. Also, we chose to use encrypted cookies for sessions.
Here’s what our package.json file looked like:
Here’s what HEYHEY looked like:
In 2022, the expectations of consumers are at their peak. When creating an internet service, one has to match the likes of Instagram, Amazon, Linktree… Fortunately, we discovered two fantastic open-source tools that make writing front-end code actually bearable — Tailwind CSS and DaisyUI.
This is what we’ve come up with:
A sneak peek of the first update, Themes:
I was highly impressed with how cheap Google AppEngine could get, so we were ready to give it a shot. It seems promising so far. The following are the estimated costs for February:
To Be Continued
For now, that’s all. The next update will focus on adding more customization. The big Widgets update will come later since we hate rushing.
— Gün