My MVP Template
25 Jan 2019I often find myself building out quick one off web app MVP's/prototpes and wanted a template to help decrease implementation time. For the simplest projects I have been using nodejs on the backend, angular on the frontend, postgres as the database, and hosting on Heroku.
I like Heroku because it’s a fully managed cloud platform, and for a small MVP type project I don’t want to spend any effort managing infrastructure. I just want to get the MVP built as quickly as possible, and deal with scale if needed. Also, this stack works just fine in the Heroku free tier for a small number of users.
Heroku supports Node, Ruby, Java, PHP, Python, Go, Scala, or Clojure. I went with Node for a few reasons.
- Node is the preferred stack for Heroku, and most of their documentation, examples, and community leans towards Node.
- Node is written in Javascript, which is a language I am quite familiar with. This was also one of the reasons for going with Angular on the front end.
- Node is very easy to setup and configure.
- There are a ton of libraries for Node, specifically a mature ORM for Postgres (sequelize) and a mature GraphQL library (Apollo).
- HTTP is a first-class citizen in Node.js, designed with streaming and low latency in mind. This makes Node.js well suited for the foundation of a web library or framework.
I chose angular on the front end beacuse it has great support for NativeScript. If the project grows to include a mobile application, a lot of the source code from the Angualr app can be reused or modularized and shared among the desktop and mobile applications.