illustration of The joy of traditional SSR website development

The joy of traditional SSR website development

How I got my sanity back after years of JavaScript madness. Building websites finally is fun again - plus hosting and maintenance is much better!


I have been building web projects for roughly 2 decades now, and boy was I amazed when javascript became the rockstar tool of choice. NodeJS version 0.4 and early coffeescript or even angular (v1) was so cool compared to RubyOnRails or PHP! But after some years, the issues started to pile up. Dependency hell with npm, build tools and frameworks churn every year (or month), and single page applications + APIs became a default choice ... for no good technical reason.

Enter the "modern" clusterfuck of applications consisting of tons of microservices, complex deployment orchestrations, cloud provider lock-in situations where costs creep up, and microfrontends glued on top of that, wondering how to return HTML from the server to the browser (or bot) somehow. This is just insane, and despite lots of progress over the decades, building a web project end-to-end didn't actually get much faster. Its a drag, and even if getting started with some initial prototype is quick, a few weeks into the project you end up either with hard vendor lock-ins and/or complexity hell again.

But the old way still works, right?

Look at the indie hackers bootstrapping projects with simple PHP stacks. I did. And in fact, they are right. These frameworks like Laravel, Rails or Django have been there for ages now, matured a lot, and basically solve all problems developers will run into straight away.

When you need some interactivity, sprinkle some JavaScript on top of the page for old school progressive enhancements - you don't even need libraries like jQuery anymore, browsers have standardized DOM APIs nowadays that work just fine.

There is even a leader of the pack now: Elixir & Phoenix. It allows for SPA-like interactive frontends thanks to LiveView, has a top-notch data mapper library with Ecto, and the underlying BEAM runtime is pure awesomeness for building nontrivial backend systems. Building rich web apps has never been faster and more scalable. Also: maintainable for years! That is a crucial benefit compared to the JavaScript world (NextJS, ...).

If I build my next SaaS app, I'll definitely pick Phoenix again.

Scaling is costly

One thing though. Phoenix (or Elixir in general) is not really great for anything that is not a complex web app. It can not build SPAs that can be deployed as static files on the edge. It can not (really) run on serverless functions (Lambda, ...). Deployment itself is more complicated (the price to pay for the runtime awesomeness). And while IO performance is exceptionally good, when there is significant CPU work to do, you have to delegate (either to native tools or more/other servers).

This is a drawback for me as an aspiring solopreneur: I need to launch dozens of projects quickly and cheaply to see what gets some traction. While I could ship them with Phoenix the fastest, to operational costs would skyrocket for me! Lets assume I need to run 50 projects in parallel to get to 1 idea that takes off after months. Assuming sensible infrastructure setups that cost like $20 per app per month, I would be at $1000 per month. Too much for my taste when I don't have any MRR yet. And it doesn't matter much that these projects are very small in scope to validate initial ideas, I still need to run them sensibly and be prepared for the situation it gains traction.

Having said that, once I have found a project where a typical SaaS attempt works, this kind of problem is gone. Elixir/Phoenix scales extremely well, and adding hardware is fine when you have customers paying every month.

Going even Leaner

To my suprise, there is another option for everything else that is not a direct SaaS-style web app. And its Rust. Luckily I already learned it and shipped some production projects years ago, but just now I realized the operational advantages:

  • compilation to a single statically linked binary (just like Go): deployment can't get simpler. No docker, no nothing.
  • raw performance/efficiency: get way more mileage out of given server hardware, the cheapest option is enough.
  • compile to WASM: I can build SPAs with Rust just fine now, DX feels like a better react.
  • tools like Tauri enable building "native" mobile/desktop apps easily.

This means I can deploy projects either to a very cheap DO droplet ($4/mo) or build static artifacts for CloudFlare pages (SPAs, SSG, ...) for free, or even ship offline-first apps to desktop/mobile users for free. Roughly estimated, I can ship software with much better quality, in more distribution channels, for a fraction of the costs.

Right now I am building my first websites with it, like the family recipe book for my wife, and its amazing. Some bootstrap CSS, some SQLite, and it takes a mere day to ship something from scratch. For the foreseeable future I probably will default in doing everything in Rust, and only when I encounter something that really is a SaaS that could work, I'll switch to Elixir and go all-in on UX. And since everything else I do is Rust already, I can boost Phoenix with native code extensions for heavy lifting or delegate to some Rust microservices when really needed.

Guess thats my new main stack now: Rust, SQLite, BootstrapCSS.

  • Number of words: 877
  • Reading time: 5 minutes
  • Posted: 5 months ago

Linked Categories

Click around and find out ↓

illustration of Technology
Technology

Stay ahead of the tech curve! Discover cutting-edge tools, trends, and insights tailored for solopreneurs and indie hackers driving innovation.

illustration of LEAN
LEAN

Explore LEAN strategies to streamline your startup. Essential tips on efficiency and growth for indie hackers and solopreneurs. Simplify to amplify!

illustration of Indie Hacking
Indie Hacking

Dive into the world of solo entrepreneurship. Get insights and strategies for building successful, self-reliant tech businesses.

illustration of Software Architecture
Software Architecture

Dive into the world of Software Architecture where design meets functionality. Explore frameworks, patterns, and best practices that define the structure of software systems, making them robust, scalable, and maintainable.

illustration of Rust
Rust

A language empowering everyone to build reliable and efficient software. Futuristic swiss army knife and probably the most powerful mainstream technology today

Portfolio Links

See the stuff I made ↓

illustration of fresh bites
fresh bites

Personal cooking recipe collection for my wife (in german). Enhanced with customized relations between recipes, ingredients and units.

illustration of Website
Website

A basic web 1.0 website that is solely server-rendered HTML and optionally a small database, without any multi-user capabilities except for a single admin area.


Related Posts →

illustration of AI Alignment Problem: a fresh perspective

Exploring a fresh approach to solving the AI alignment problem by focusing on intrinsic motivation and long-term thinking to ensure harmonious development between AI systems and humanity.

illustration of AI Alignment Proposal: v0.1

My personal shot at approaching the AI alignment problem. Allows for iterative refinement as well as immediate experimentation with current LLMs today.

illustration of The AI Wrapper Revolution: What It Is and Why It Matters

In the rapidly evolving landscape of artificial intelligence, a new paradigm is emerging that promises to democratize AI application development: AI wrappers. But what exactly are AI wrappers, and why should developers and entrepreneurs pay attention? Let's dive in.

illustration of Custom GPTs vs OpenAPI path parameters

Seems that the AI can't do idiomatic API calls for a RESTful interface after all - or their HTTP client has some bug.

illustration of GPT4o Just Landed And Will Be Free For All!

The latest OpenAI ChatGPT model just got reveiled and it will be free for everyone - but more importantly: the GPT Store will be, too!

illustration of Rewrite it in Rust: Fun Weekend & Happy Wife

How I rewrote a pet project in Rust, shipped it within 2 days start-to-finish, and gained social credit along the way.


Latest Posts →

illustration of AI Alignment Problem: a fresh perspective

Exploring a fresh approach to solving the AI alignment problem by focusing on intrinsic motivation and long-term thinking to ensure harmonious development between AI systems and humanity.

illustration of AI Alignment Proposal: v0.1

My personal shot at approaching the AI alignment problem. Allows for iterative refinement as well as immediate experimentation with current LLMs today.

illustration of The AI Wrapper Revolution: What It Is and Why It Matters

In the rapidly evolving landscape of artificial intelligence, a new paradigm is emerging that promises to democratize AI application development: AI wrappers. But what exactly are AI wrappers, and why should developers and entrepreneurs pay attention? Let's dive in.

illustration of Custom GPTs vs OpenAPI path parameters

Seems that the AI can't do idiomatic API calls for a RESTful interface after all - or their HTTP client has some bug.

illustration of GPT4o Just Landed And Will Be Free For All!

The latest OpenAI ChatGPT model just got reveiled and it will be free for everyone - but more importantly: the GPT Store will be, too!

illustration of Rewrite it in Rust: Fun Weekend & Happy Wife

How I rewrote a pet project in Rust, shipped it within 2 days start-to-finish, and gained social credit along the way.