How I host my Side Project on Digital Ocean

I was brainstorming a couple of side-project ideas and decided to start setting up my tech stack. However, I am not quite sure what I'll build next. In the meantime, I thought it would be a great idea to have a place on the internet to show-off/host my experiments and Minimum Viable Products (MVPs).

How I host my Side Project on Digital Ocean

Hey! It has been more than a month since my last post about Why I decided to Start Blogging Again. Before I hosted this blog in Feb 2020, I made up my mind to start blogging regularly but talk about consistency! I am going to dedicate a post to that topic later.

Anyway, in March 2020, I was brainstorming a couple of side-project ideas and decided to start setting up my tech stack. However, I am not quite sure what I'll build next. In the meantime, I thought it would be a great idea to have a place on the internet to show-off/host my experiments and Minimum Viable Products (MVPs).

Started working towards it with a few goals in mind:

  1. Find a place to host my MVP
  2. Set up a common Frontend and Backend for all projects
  3. Configure a sub-domain of TechBum.io to point to my projects
  4. Not spend too much time and money on hosting initially
  5. Learn to set up & configure a system by-hand (as much as possible).

Where do I host my Application?

Following two options exist today to host your applications:

  1. IaaS (Infrastructure as a Service)
  2. PaaS (Platform as a Service)

I chose to compare Heroku and Render for a PaaS, on the other hand, I looked at AWS and DigitalOcean for IaaS.

PaaS - Heroku or Render

Heroku and Render both make it is easy to deploy an application by stripping away a lot of boilerplate and configuration needed for your application to go live. You don't need to set up your own CI/CD system. In many cases you don't need to deal with SSL certificates or installing reverse proxies and load balancers. This makes such platforms a preferred place to host your MVPs as it saves you quite some time and hassle. I have used Heroku in the past and continue to use it for a very small side-project of mine and my experience has been great. No complaints there!

As much as I enjoy the speed of delivery on Heroku, my goal this time around is different. I am in no rush to just ship code. This time I really would like to configure and appreciate more control over my system architecture. As you read above in Goal #5, I want to get my hands dirty by playing around with components in my system. It will be time-consuming but it's not like I am on a deadline :)

I believe it will be a good learning curve and I might as well gain some hands-on experience starting with this small System Design. Eventually, I would love for this system to grow more complex. This will happen as I keep experimenting and try to ship new applications.

You will fully appreciate the value of a solution only when you yourself experience the underlying problem it is trying to solve.

On the other hand, I haven't used Render but did signup and went through the docs. I will not be using it since it is almost exactly the same as Heroku. And did not have support for the stack that I am planning to use.

IaaS - Amazon Web Services (AWS) or DigitalOcean

I use AWS all the time at work. I did host a side-project long time back on an EC2, but I have used up the free tier entirely. If I host an EC2 instance now, I will be over-budget. As per Goal #4, I want to make my deployments cost-effective until I really have a solid product to ship. I ended up looking at DigitalOcean, simply because I host this blog there. I use one of their 5$ Droplets (That's what they call their virtual machines). I just bought another 5$ instance for hosting my side projects and scale it later as needed. The 5$ Droplet instance includes 1 vCPU and 1 Gb memory. This is one of the most affordable options out there! I was up and running in minutes. Here is a 100$ credit if you sign-up for a new DigitalOcean account with my referral code.

powered by Typeform

What's my Tech Stack?

Frontend

Let's discuss front-end first. I am well-versed with JavaScript and for my quick experiments (like the one hosted on Heroku) I usually use Vanilla JS and JQuery. But for a slightly bigger project that has a potential to become a shippable product, I prefer using a framework. Today, the choices for me being Angular or React. Initially, I wanted to learn React but I don't want to invest time in learning a new UI framework yet again. So the obvious choice left was Angular JS. In the past, I have built production grade Web Applications and Hybrid mobile apps using Angular and TypeScript. It was the first major UI framework I learned many years ago and overtime I have become comfortable with it.

The biggest issue with Single Page Applications (SPA) is Search Engine Optimization (SEO). Although it sounds important, what I am building is essentially a playground for me right now and I don't need it to rank in search results. We can overcome the SEO limitation using Angular Universal to implement Server-Side Rendering (SSR) along with Node.js. But I am yet to explore it.

Backend

The Backend Stack is completely dependent on the type of application I plan to build. I use Java and Spring Boot at work for writing services. I understand the argument that Java is quite verbose but still a go-to choices for production-grade applications. I have used Django, Node.js, and PHP in the past and if I have to invest time to learn something a little better, I would choose Node.js. The Java ecosystem has a few options like Spring Reactor, Vert.x, and Akka which are promising event-driven and non-blocking server frameworks that can utilize multiple CPU cores for achieving high scalability without the complexity of handling threads.

It's too early for me to talk about my choice of Database and Caching. But since I am hosting on DigitalOcean I could use one of their services for Managed Postgres, MySQL and Redis.