A lot of the avenues we're exploring to make some money and speed our way to the glories of financial independence come down to websites. Blogs; SAAS services; content sites; social networks or forums; or anthing in between. In fact, if you think about it, even books and apps will need some form of web presence if we want to take them seriously and market them to maximise any revenue.
We're probably looking at upwards of 30 sites of different shapes, sizes and requirements, which are unlikely to be super profitable from day 1, so we need to mamage that cost, while still putting something out there that's compelling; fast; and reliable. WHen pondering on this once I'd decided to setup 199days.com, I came to the eternal realisation that the cheapest, simplest, most reliable thing (as it is in a number of industries) is the one with the fewest moving parts. What am I talking about? static sites
If we can deliver all of these soon-to-be unicorns as static sites, we minimise our costs dramatically - no server hosting; opportunity to offload most content to CDNs; minimal softwre/plugin requirements - and also have a real shot at very fast, very reliable delivery to the end-users.
So, that's what we did! You're currently reading an entirely static blog, generated by a simple yet effective custom script that allows for some simple templeting and custom combination of sections; all delivered through free or low cost providers. Let's break it down a little to the parts which make up the site build and delivery:
The bootstrap framework, combined with free templates from bootswatch, and a reasonable knowledge of HTML and Javascript mean that there's zero direct costs incurred in the setup and creation of the pages for the static site. Bootstrap is realtively staightforward to learn and user; offers good support for responsive design; and out of the box looks OK (albeit a little samey if you go with the basic templates). Combine that with a good (free) editor (I'd recommend VS Code but Aptana; Sublime; or countless others are just as good).
Now you could do all of this manually, but it gets a bit cumbersome to think about all the templating; categories; and the like without something to help you. We could have gone off the shelf here - Jekyll, Hugo, etc - but we decided a) we can keep this super simple, and b) our inner geek won out and decided it was an opportunity to build something. SO we threw together a very simple python script (we'll publish it later once we've done a couple more sites to iron out the kinks) that builds pages from simple json config files; combines files in a simple templating system; supports categories, breadcrumbs and the like; and generally makes it relatively simple to publish a static site built on basic HTML and Javascript.
A great static site, full of good textual content is a great start, but we need something a bit more engaging than just words. So, where do we source good quality imagery without breaking the bank and paying for stock photos. Again, there are good options here for the aspiring (and frugal - well, sometimes) blogger. Sites such as Unsplash or Stocksnap offer good collections of free stock photography that are perfect for what we need. Tick.
So, we have a site and it looks great, with some cheap, but high quality imagery, but we still have to pay to host it right? Well yes, but because it's a static site, we don't need a traditional applications server - no Wordpress, Drupal or Joomla - just something that can spit out HTML and Javascript to the browser. Fortunately some of the bigger cloud providers offer simple static hosting for sites, meaning we can use something like Amazon S3 to host and serve our content very cost effectively. In fact, Amazon offer a free tier which gives you 5 GB of standard storage; 20,000 Get requests; and 2,000 Put requests per month entirely gratis. Starting to look very cost effective now.
We have our site, we're able to serve it out of S3, it's quick (after all, it's just HTML and javascript with a few stock images), but what if ot gets really popular and we go above the free-tier on AWS, or what if we go multinational and need to mke sure it's super performant for people all around the globe? Fortunately, there's a great option here in the form of a CDN (content delivery network) which helps us to get the content closer to the end users and deliver it faster and more efficiently. This also offers us the possibility to offload some costs. If the content does become popular, we don;t want to be serving every page and every image from S3, or the costs will start to climb - how about if there was a global CDN, that offered free theoretically unlimited bandwidth to personal sites? Funny you should say that, but Cloudflare do just that. They're a great company (I've used them in an enterprise setting too), and have some great tools as your sites grow. Super simple to setup, we now have CDN protecting our site (literally too, they include DDOS protection on the free plan)
Meh, OK, so the basic stuff is covered, but what if you want to do something with the site that's not entirely static - comments for example. With wordpress, that would be as simple as a installign and enabling a plugin. Fortunately, in the brave new world of skinflint web development, we have services that offer commenting plugins that are both simple (drop in some javascript); don't require any kind of infrastructure; and above all are low to ero cost.
The biggest and most well-known of these is Disqus and their free plan is relatively painless and offers all we need. Comments. Tick.
No brainer here - Google Analytics is sophisticated enough, and costs nothing at the scales we;re talking about. Yes, there are other options; no, it's not worth the time or effort to investigate them. Succumb to the monopoly and move on.
This ones a bit more tricky - without a server, we need to be pretty creative on what we do for search. We could plugin some SAAS offering (unlikely to be cost effective); or a client side solution.
A bit of investigation led us to lunr which fits nicely with our static site generation (we can generate the search content at the same time as the HTML pages). It's super lightweight and really easy to setup and get working (and pretty powerful too, if you get into it). We figured it was a great place to start and see how we got on. We may revisit search for some of the more sophisticated web properties (faceted e-commerce search may be a stretch for example), but for now, it serves our needs well.
So we have all the bits to deliver a fast, reliable (there are no moving parts), and cost-effective site. We've bored you to tears with the high-level technical details, but what we're really here for is to understand whether it helps us. Does it make the act of setting up and delivering this (and 30+ other) sites cost-effective. Well, our rough calculations bring total cost for the site out at £0 - no tooling costs; free tier storage with Amazon; fronted by free CDN services from cloudflare; no costs for imagery; no costs for services like search and commenting. Yes, if it goes nuts and we reach Facebook traffic proportions we may start to get to a point where some of the parts of this equation need a little money to keep them tootling along, but that's a 1st world problem that we'd be only to willing to solve if we get there. For now, were in clover - all the goodness of a reliable, fast, website, none of the costs. It's like Coke Zero for web development.
“Every school-age kid should be taught about compounding as soon as they can understand it”