Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Tech stack for small SaaS side projects as a solo developer?
27 points by poushkar 6 months ago | hide | past | favorite | 33 comments
What tech stack would you choose for building SaaS side projects as a single developer if these were your priorities:

- build it once, deploy and forget for months or years;

- adding new features is easy (once it's needed once a year or even less frequently). "Easy" here means little time spent reminding yourself how the app works and where to add new features;

- deploying is simple and can be done with little to no setup;

- language/platform/dependencies updates are infrequent, easy to do, unlikely to break the app;

- open source and developed by a community, no dependency on an enterprise.




I've been using boring tech for that:

* Python/Django framework (Django itself has 17+ years "on the road" - that's forever enough for me) * Postgres as my main database * Bootstrap as main UI (customized via Sass - not too fancy though) * Unpoly (https://unpoly.com) for frontend and the SPA "feeling" of the app - absolutely no JS frameworks (React, Vue, etc.) - my SaaS product will be mainly CRUD operations, no fancy/dynamic stuff.

Change Django for Rails (or any other "magic" framework) and you're good to go.


I answered this before on a pretty similar question a few days ago, but my go to stack for my small SaaS "startup" has been the HAG (HTMX, AlpineJs, Go) stack.

With this you stack you have a dead simple web application that can be completely self contained in the executable with `go:embed`. That makes deployment an absolute breeze. Since I also attempt to use as few third party packages as possible and the ones I do use are pure Go, I can containerize my app and deploy it with Google's distroless base image. That helps in reducing my attack surface.

And while my app is a monolith using an embedded LibSQL database (SQlite), I can easily change my app configurations via environment variables to use a remote LibSQL server and then scale my app behind a load balancer with more servers.

It's honestly such a simple yet effective stack for development. My one web app handles both the api and web requests, I can easily scale, and building my app is fast.

Edit: I should also preface, that all the HTML/CSS/JS used by my website are (mostly) vanilla and developed by myself. So no use of a CSS library like Bootstrap, Bulma, or Tailwind. And also no use of JS libraries like JQuery. I do use HTMX and Alpine, but they are both being embedded into the executable like I stated above.


What I would use: Python-based Django/flask depending on the complexity, SQL database (postgresql, even SQLite for minimal projects), Apache/WSGI, Ubuntu-based VPS (e.g. AWS EC2) with semi automatic deployment, automated backups on e.g. AWS S3, HTML5/CSS3 with a minimal CSS framework such as Skeleton, Vanilla JS. Mature tech stack, minimal dependencies, slow upgrade pace, and most importantly, a stack I'm quite familiar with. No surprises. Never failed me.


Ruby on Rails is still the best at what you're describing if it's a web app.


At the risk of sounding like a broken record, but "use what you already know" is almost always the right answer for these types of questions (especially since I didn't see "learn new tech" on the list of priorities). This is why every answer has a totally different stack and probably won't help you all that much.


If the question would be phrased as, I want to get proficient and get to learn how to build a full SaaS app from scratch knowing JS/HTML/CSS, what would be the answer then?


imho.

1. the tech-stack you already know well.

if you are familiar with something: build on your existing experience.

2. php + some mature & well documented framework like laravel

php is often disliked by the "we know it better" crowd here on HN.

but: it offers a high rate of productivity, is easier to deploy on a wide range of hosting-possibilities than anything using python or other script-languages

preface: i would recommend the following only if you already have experience with it!!

3. python + some mature & well documented framework like django

in my experience: deploying / maintaining python-based webapps is more effort than php-based ones

just my 0.02 €


It's telling that almost all these comments recommend things that aren't JavaScript web frameworks. This has been my experience too, you want to avoid that ecosystem. For this reason in particular:

> language/platform/dependencies updates are infrequent, easy to do, unlikely to break the app;

I'll second the Django, Rails, Laravel, but also add something statically typed like Java with Spring if this is purely an API backend. Static types will give you peace of mind during runtime for years.

Stick to relational databases. Don't buy into hype stuff on Medium blogs. You can go a long way on a VPS with an LTS distro on auto-update (very few SaaS businesses actually have scale that exceeds what a modern VPS can do).


TALL stack (tailwind, alpine js, Laravel, Livewire)

(You could also use Larave + Inertia js + React/Vue)

I think Livewire is way faster to develop in and has less bloat/complexity.

Laravel Jetstream gives you scaffold and auth + 2FA out of the box.

TailwindUI is cut and paste LEGO like components (you'll have to Alpine js some of them but it's quick and easy)

Tons of Laravel packages available to do what you need to do.

Laravel Spark if you want a fast SaaS in a box for connecting to Stripe

Laravel Forge (EC2) or Vapor (Serverless) makes spinning up servers and deployment super easy.

Some of these are paid but you can definitley do it without them but all the paid items have crazy ROI.


As a solo dev for https://cubetrek.com my tech stack is as follows:

Front-end: Bootstrap, vanilla JS, for visualizations: D3.js and Babylon.js

Backend: Java Spring Boot, PostgreSQL

Deployement: semi-manual, script rsyncing the Jar onto the dedicated Hetzner Server

Regarding ease of adding new features: I guess that depends mainly on your code base and less on your stack


Is there a good user registration/auth solution for spring boot?


Here is my latest

Frontend: bun, solid.js, tailwind, astro -> cloudflare pages

tbh I had a smoother setup with solid-start but astro is better if you have static pages and everything I do is static pages: either pre generated static content or an app which calls an API. I don't want a server busy rendering HTML and we have free hosting anyway thanks to all the JAMstack marketing money.

Backend: rust, axum, sqlx, sqlite, redid, systemd -> hetzner

Single static binary is great for deploying whenever. Rust means my code won't likely break because of typos or brain farts. You likely don't need a database running in another process until much later on. If I do need it, I pick postgres.

I do have a separate, centralised auth / permissions / license services I use for a bunch of different services. Custom coded. Services get notified and update a local cache in redis with the data If I were starting from scratch I'd just chuck it in the main service (and what I did for years).


It kind of depends on what the SaaS does. But I’ve had a lot of success with B2C apps on WordPress. It handles user management, routing, and dashboard out of the box with a few free or cheap plugins. Then depending on what the app is meant to do, I write code or manipulate plugins to do what I need.


I used Ruby on Rails, deployed on DigitalOcean for my SaaSes , after a few years they gotten mostly stable and I seldom add new feature, mostly just fixes or integration with third party APIs.

Ansible for setting up infra, reusable across multiple apps, you can use PaaS like DigitalOcean app platform to save even more time

Managed Database by DigitalOcean

Ruby on Rails, served via Nginx

AlpineJS (with <script> tag), no build process needed TailwindCSS (use CLI locally to generate the needed CSS)

Been using this stack since 2020, couldn't be happier, no bullshit of NodeJS / NPM randomly breaks when I come back after few months


Whatever you pick for the backend, on the frontend, I'd recommend sticking mainly to pure web technologies. You can get a decent phone version through capacitor or other webview-based solutions. Many eCommerce and such sites do just fine with webview based apps. It is so much easier when you can have just a single code base with some responsive CSS mixed-in to manage, rather than 2-3 codebases, with constantly diverging feature set.


> - build it once, deploy and forget for months or years;

With the containers thing any stack can do this.

But I get what you mean. Avoid anything to do with JS. It's the worst of the worst for stability. Avoid Ruby on rails. Avoid python. These ecosystems will evolve out from under you.

Avoid anything from Microsoft. Did you make a website in 2014? tough luck, you are stuck on old .NET world now. Unless you port things over to the new world. Did you use silverlight? whoopsie!

If you really need your SaaS to work forever write it in Go.


Java!


php


Rails, rails or rails. Everything has its own place so it fast to develop and easy to maintain.

As for the frontend, I suck at it so I don't have any opinion


Golang, Htmx, Sqlite if you want to deploy fast with minimal setup. For CSS, whatever works for you, but Tailwind / Bulma / Bootstrap are ok.


what do you use for html templates?


Pure go?


Pure Golang can take you a long way. There is no need to add unknown libraries / frameworks, until you have a clear requirement for those.


I've had good success with:

Clojure (Polylith, Reitit, Clojure Spec and Spec Tools), XTDB (Postgres as the datastore), HTMX and Tailwind

Other combinations work just as well Clojure (same Clojure stack), InteriaJS, Postgres (no XTDB), Datomic, Tailwind

I would also recommend AWS Copilot to deploy containers to the AWS cloud with a Postgres RDS backend.


For me:

  - front-end: either Vue or server rendered html from templates
  - back-end: Kotlin/Java, Go, (if I'm adventurous Phoenix/Elixir or F#)
              framework: something lightweight like Javalin + JDBI (or homegrown)
  - db: MySQL (because I can multi-writer, backup/restore from *my* memory) or a cloud service offering


Django or Ruby on Rails.


Golang for fast critical services. Web stuff can be rails or laravel. Or you can do everything in Go if you want a single language. Also stop thinking of tech stacks. The word stack should make you feel icky. Also consider pocketbase which is written in go.


If you can avoid it. Don't use a JS framework.

I would go with PHP + Symfony + twig with bootstrap for the front


The unicorn framework ;) but seriously maybe using using something like Wordpress or drupal with plugins would work or maybe something like the elixir based phoenix framework deployed on fly.io


PHP, SQLite, vanilla javascript, and maybe an older CSS framework like Bootstrap would fill the bill.


React server component all the day.


python + flask, mysql/mariadb, bootstrap, jquery


Some thoughts... 1. There is no tech stack in the world you can safely deploy and forget about for months or years. Security updates are needed, OS updates cause changes, browser technology changes, and your users change. Even setting aside security, let's say you build something that becomes popular, you've no IC lock-in, and you don't add features / adapt. Sooner or later someone is going to create a clone that does add features / adapt and you will start to lose business.

2. Adding new features is rarely 'easy', because you have to test it with the other features, do deployment, support older versions of the app (if possible), etc. Still, some stacks make it easier than others.

3. Simple deployment once you've configured your automation is an area where there has been lots of progress. You can look at Puppet, Chef, Docker containerization.

4. Dependencies change. Typically you should view changing dependencies like you would adding a new feature: have a justification for it, do full testing, and only then deploy.

5. Open Source is easy to find, and there are a lot of good quality candidates.

6. One commenter recommended to use what you know. Within reason, that's good advice. However, the old adage of 'when all you have is a hammer, everything looks like a nail' applies. Use the right tool for the job.

7. For the front-end, I recommend client side JavaScript, either Lit or React using Vite. Svelte shows promise, but is not fully mature enough yet to be acceptable when you're solo and using it in production.

8. For the back-end, I recommend Rust. It's reliable, it's performant, and there is a good ecosystem for it. If you go that route, I recommend Axum or Tide for your Web server, fronted by Nginx. You could also go NodeJS (or Deno) and Express or Next. A JS back-end though means you're at the mercy of the NPM ecosystem, which is rife with abandoned packages. Rust could get like that, but seems to be more well pruned. If you go with Rust and want easy new features, a REST based API using a plugin architecture can work well.

9. I recommend 3 repos: front-end, back-end, devops. Your deployment scripts and other things go in devops. Your front-end, if you follow 8, will be Javascript. Your back-end, if you follow 8, will be Rust.

Btw, Rust comes with some caveats. If you don't know it already it has a steep learning curve, however the benefits of learning it are high. You also can use an existing hardened version of Rust made by Ferrous Systems, called Ferrocene (I've no relation with them, other than maybe wanting to work there someday).

https://ferrous-systems.com/ferrocene/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: