Ask HN: Best/Simplest Stack for Side Projects
Ask: Looking for thoughts and opinions on good tech stack options for side projects. Looking to build a web app for a small niche - very small user base (<100 initially), no expectation that it would ever scale into something big. Data-driven app with User authentication. The app would have a few pages of different data views, but nothing too fancy. This is more or less a hobby project to scratch my own itch. I expect it to never make money, so want to be cognizant of hosting costs as well. I'm also using this as an opportunity to learn some new tech rather than sticking with what I know (Azure, .NET, Sql Server, Angular, C#).
Some initial ideas below.
Code Stack: In no particular order, was starting to look into Ruby/Rails, Python/Django, Elixir/Phoenix. Some of the new Rails 7 stuff and hotwire seem interesting. Have past python experience, but never worked in Django. Elixir seems like cool new tech.
Data: Postgres vs MySql - both seem feasible for the job.
Hosting: I've never worked with a VPS before, but maybe a something like Digital Ocean or Heroku would be good value.
Thoughts and opinions are welcome and appreciated! Thanks! When you say you want to build something simple with a few pages, you might be able to get by with something minimalist like Flask and maybe DataTables: https://datatables.net/ If you don’t expect to have scalability or real-time needs, I would not really recommend Elixir/Phoenix. The core language, dev tools, docs, and OTP are best-in-class, but there’s a learning curve, and the ecosystem has less mindshare than Python and Ruby. I personally prefer Python/Django with htmx for client-side interactivity (if you need it), but if you want something better-integrated out of the box, you can’t go wrong with Ruby/Rails/Hotwire either. Using a VPS is cheap and initially simple, but keep in mind you have to do more setup and maintenance on the OS, Web server, database, etc. yourself. I’ve had a great experience with DigitalOcean VPSs in the past, but for the app I’m building now, I am leaning toward using their managed app platform to minimize sysadmin/infra work on my part. Thanks for the thoughts, I'll check out DataTables. HTMX - looks cool, but I was reading that HTMX is susceptible to XSS. Probably avoidable with proper sanitization, but just a consideration I saw. Which managed platform are you using? Hard to pass up a $4/mo VPS, but I am sure at some point down the line, there will be a headache in my future. Of course! With any solution, you’ll need to have some awareness around SQL injection, CSRF, XSS, etc. Some frameworks have sensible defaults to help you avoid common mistakes, but there’s no 100% fool-proof solution. Right now I’m in dev mode and haven’t deployed anything yet. DigitalOcean does have a managed app platform: https://www.digitalocean.com/products/app-platform Have you tried the MERN stack (MongoDB, Express, React, Node)? If you expect traffic to be relatively low and the app is simple, I'd even forgo MongoDB in favour of a dead-simple JSON file. I'd put it all on an AWS Lightsail instance to save as much money as possible. You could also look into self-hosting if you live close to your user base. Great thoughts. Actually I could host this on an RPi as I’m close in proximity to the user base. Lightsail is very interesting, I’ll take a look. Is MERN stack still in demand? >Is MERN stack still in demand? For getting a job? Express is probably less common in enterprise, but since the whole stack is JS/TS you'll have no problem porting your knowledge from that to any of the newer server-side frameworks. React is to my knowledge still the most widely used framework in modern front-end development. Regarding self-hosting, make sure you look into isolating the RPi you use to serve your app from the rest of your home network as much as possible, and change the default password. Yep, fully agree about React being the most widely used framework. And yes, good point on the Pi. Astro SSR web app, Tailwind, and Drizzle ORM. Use Postgres. Both hosted on a single Hetzner instance for about $6/month. I've tried Django, C#/Blazor, React/Go+Gin, Next.js, none came close. Never heard of Astro but looks nice. When you say none came close, in terms of what? Performance? Simplicity? Value? Dev experience? All the above? Performance and dev experience yes. Simplicity-wise I guess one could argue that Django takes the crown as long as you're okay with the compromises you have to make. I not sure what you mean by value, if it's cost of hosting the service then I'd say yes again because it requires less resources than all the other alternatives. I've been going thru Astro tutorials and playing around with it. Haven't done anything with Drizzle yet, but I like it a lot, thanks again for the suggestion.