Building Side Projects on a Budget


A few months ago, I got annoyed at work. Our customer team needed to survey our customers, design wanted the form to have our look and feel (and ideally our url), and engineering wasn’t going to make that a priority. We wanted simplicity of Google Forms with the flexibility and control of your own html.

We eventually found a tool to do this, but I felt it was ridiculously expensive (over $700/year) and still required us to glue its webhooks with some Apps Script code.

I figured there must be some open source software to do this. FormSpree was the closet I could find, but they mostly offered data export and not data mirroring. I want to be able to collect data for a form, and after the fact, send all previously sent data as well as any new data to a destination like Google Sheets or webhook endpoint. Ridiculous! I could build this in a few hours!

A few dozen hours and a dose of humility later, FormEndpoint was born. I’m using on this blog for the subscribe form and hopefully, over time, at least one other human being finds it useful. More importantly, it’s taught me a lot about the “How do I get it from my laptop to a dot com” outside the world of PaaS’s.

Screenshot of FormEndpoint

My Requirements

While FormEndpoint might some day make me a few dollars, I doubt I’ll ever make an income from it. I also really enjoyed building small tools and plan on building more, so ease of use mattered too.

  1. $10 or less a month
  2. Custom Domain
  3. SSL (required by 3rd party integrations)
  4. git push deploys
  5. Reasonable headroom (let me share with a dozen friends)

FormEndpoint is open source, so code hosting and CD are free.

With Heroku, this would be $7/month, which is pretty affordable. Unfortunately, Heroku’s Free tier has some pretty hilarious limits: Your Redis is limited to 25 MB RAM and Postgres database is limited to 10,000 rows. Planning for scale when you don’t have a single user is the worst kind of engineering folly, but given something like FormEndpoint, having just 10 users might kick me over the free postgres/redis tier, at which point, I’m paying $7 + $9 + $15 = $31/month.

I dislike the “first taste is free” lockin model, so at this point, I decided to at least explore other options.

Linode

I took a look at AWS, GCP, DigitalOcean, and Linode. I even tinkered with GCE…what a waste of a weekend that was. I ended up with Linode.

Linode starts at $5/month, by far the best “bang for your buck” of the reputable VPS providers. The downside is just that: they provide a VPS but it’s your job to figure out the rest. I’d used the before, but the complexity of deployment killed my enthusiasm and eventually, the project. Ease and speed of deployment mattered.

Enter Dokku.

Dokku

Dokku literally is an open source Heroku clone, mimicking the basics of their developer experience using Docker. It let me deploy by git push’ing and its minimum requirements fit into Linode’s $5 tier. I ended up provisioning a $10 box (wasn’t paying attention), but after the fact, I’m glad I did. I prefer a bit of headroom and FormEndpoint currently uses about 6.5 GB of disk (out of 19 GB) and even when inactive, memory usage hovers around 1 GB (out of 2GB).

Setup was a breeze (so long as you have a modicum of terminal experience) and maintainence has been surprisingly easy. The hardest part was actually the networking: trying to understand how to map DNS records so web requests went to my box but I could still get email to *@formendpoint.com forwarded to me.

Product Services

Mailgun is the only email sender that still has a free tier, and a very generous one at that 10,000 emails/month. I use passwordless login, so I needed a mail sender very early.

I also setup reCaptcha because I was getting a lot of junk in my forms. I especially enjoyed their invisible captcha, which only challenges users they suspect as being spam. Surprisingly easy and very, very effective.

Finally, I’ve been toying around with MaxMind’s GeoLite2 database for mapping IP addresses to country/region. The free version pretty inaccurate (they place me in a few hundred miles from SF in the town of Loomis), but I mostly want country/state, so it’s fine.

And of course, Google. I am not fond of their developer console, but you don’t have much choice.

Monitoring Services

For now, I don’t much care about analytics or performance or even logs. I just care: are things broken? For me, that splits into two main categories: Is hardware broken or is the software broken?

Linode Longview: “Activity Monitor” for the VPS. Free for 12 hours of data and up to 10 hosts. Datadog would have been fine too, but I didn’t see much difference at my current size.

Sentry: “Flask Debug Page” for production. 10,000 events/month. In the last month, I used about 1% of free quota of this. Plenty of headroom.

Conclusion

I definitely spent an inordinate amount of time assessing PaaS and IaaS options, but once I landed on Linode/Dokku, I’ve been pretty happy.

I’m going to mostly focus on buildling one or two more features (I think I might do validators next) and…maybe making the UI less “complete shit” and more “somewhat useable” is priority before trying to get my first user.

I also want to revisit my develoment flow to do a few more things:

  • Writing tests and setting up CI/CD.
  • Good-enough analytics: I’ll follow up with another post here. I have infintesimal amounts of data, but I want SQL access. Why does that always seem to cost $100+/month?
  • Setup Pingdom (They have a free tier that would be enough for my use case)
  • Figure out log managinement. Linode has an article that looks reasonable.

I’ll follow up when I get a chance.