0
0 Comments

Sharing Remoted's stack

  • Hosting: DigitalOcean. This one was hard, because I had zero previous experience with VPS management. I thought about releasing with Heroku, but because I plan to release multiple projects, it would be too expensive to go that way. It took me around 15 hours to learn and to to set up DigitalOcean, including Nginx and TLS. Now, to deploy a new website, it will be super easy.
  • Database: Postgres. This one was also not obvious. For the majority of MVP projects, all you need is SqLite. A good reason to go Postgres is when you anticipate the need for full-text or spacial/geolocation search. Also, another question was whether to go managed or unmanaged. Again, because I needed to be able to deploy multiple projects, going managed would be too expensive. The feedback I received from a lot of indie hackers is that managing Postgres yourself is not as hard as it sounds. I'm having a good experience so far.
  • App server: Node.js with TypeScript. Node is amazing for the ecosystem alone. You can basically find anything you need on NPM. For example: Sitemap and RSS feeds.
  • Process management: PM2. This is only relevant for Node. Node runs only 1 thread per process. This causes the problem that you need a mini-load-balancer if you're using multiple processes. PM2 does that, PM2 also does a very good job organizing your logs/errors.
  • Web server: Nginx. Node developers often don't understand why you would Need Nginx if you can use Express for everything. Three reasons I use it for: 1) TLS/SSL certificates from LetsEncrypt, including auto-renewing, was a breeze due awesome Certbot integration. 2) Node output cache and static resources cache is much better than anything you can do with Express. 3) Rate limit.
  • Crawlers: Puppeteer: I believe no language can beat JavaScript/TypeScript for making bots, for the sole reason that you can execute your code inside the context of the browser. What I mean by that is: I can pass a function to Puppeteer, that I expect will run inside the page that I'm crawling. this is super useful for collecting information. If you make a crawler in Python, for example, even with Chromium is being used under the hoods, you would have to switch to JavaScript to control the browser, internally. With JavaScript/TypeScript, it's the same language, the code is more straight-forward.
  • UI: React with Next.js + Apollo. Next.js is basically a runtime that allows you to use React with SSR out of the box. It's fantastic. Apollo made it super easy to set up my API.
  • API: GraphQL. Not trying to predict anything, but there is a chance GraphQL will become the de facto standard for REST APIs because it is statically typed, self-documented and it enforces consistency.
  • CI/CD: Codeship. One question I had in mind when I chose to run a VPS with DigitalOcean is how would I manage CI/CD, that comes out of the box with Heroku. The answer was Codeship. Basically, they will test your code and, if the code passes, they will deploy. They support deploying to all major cloud providers, but for a VPS, you just upload an SSH certificate and let them connect to your VPS, after a push and successful tests, and git pull.
  • DNS and CDN: Cloudflare. Everybody uses Cloudflare. Most common use cases, not in a particular order: 1) Redirect www to non-wwww, 2) Basic DDoS protection. 3) Caching 4) TLS. Specifically for Remoted, I have the CloudFlare issued TLS certificate between the edge and my VPS, and a LetsEncrypt TLS on the
, Founder of Icon for Remoted
Remoted
on April 28, 2019