Hosting my SaaS app with minimal headaches

The low down

Back-end: Vultr (Laravel/NodeJS)
Front-end: Firebase hosting [Free]
Landing page: Vultr
Backups: S3
Database: MySQL and Firebase [Free]
Background jobs: Amazon SQS [Free]
Email: Postmarkapp [Free]
Logging: Papertrail [Free]
Analytics: MixPanel [Free]
Uptime: Uptimerobot [Free]
SSL: LetsEncrypt [Free]

Total: under $6 a month with a few pennies for S3 and SQS

I needed to develop a SaaS app recently and quickly. There were a number of things I had to figure out, quickly - particularly hosting/database/stability. Instead of getting bogged down figuring out databases and scalability I choose a route one approach to settle on choosing whatever tech is fastest to launch with.

I needed to use NodeJS for rendering, have a background job, run daemons and store important customer data. Storing users and saving forms could all be done in any language.

Here's a few rules I always stick by:
1. Use providers that many people are using
2. Don't code anything that's already been coded
3. Launch, get users. If profitable - rewrite system.

This way we could test 10 different ideas instead of launching 1 idea that fails perfectly. Higher chances of success? I think so.

Picking a framework

Frameworks are relatively easy to use and pickup. I had a look at the most popular ones. With NodeJS I had the option of something like KeystoneJS for PHP I had the option of Laravel. They both come with authentication which is essential. Saves plenty of time.

Databases:

  1. Most modern frameworks already use a database adapter for generic things like authentication. It's been tested. It works. Keystone uses MongoDB, Laravel uses MySQL/PostgreSQL. Both are stable. I didn't want to use MongoDB (expensive to host) so I went with Laravel.

  2. In my case, for everything else I used Firebase. It works with Angular/React and VueJs without having to write backend code. I can host my JS/CSS on Firebase without worrying about downtime. The only problem was that querying options are very limited. But when structured correctly it's fine.

Using one firebase database, each user now has his own storage - like a database each.

I saved data that needed to be queried in a MySQL database, with pointers to the firebase objects. Overall superfast development.

Hosting

The cheapest, most popular and reliable option is to use DigitalOcean. A 1GB RAM server costs $10/month.

However, Cloudways provides a managed 1GB RAM server for $11/month. They use Vultr as their provider. This was a no brainer.

Upon checking Vultr I found out they have a 1GB server for only $5. For now, this was perfect. Once the SaaS grows, if it grows we'll move to CloudWays.

Conclusion

A VPS with self-hosted database and FireBase = room for experimenting fast. Oh and also, I also backed up to Amazon S3 just incase things went down.

In the end, I didn't have to worry adding new features to the database since I'm using Firebase. MongoDB would also have been awesome if I had a bigger budget. A rather simple set-up for a SaaS app.