Ask HN: What would be your stack if you are building an MVP today?
459 pointsSpecifically the backend. I'd love to hear your reasons. Do you keep one eye on what the stack would be post MVP?
1. Old schoolish (VPS - Maybe DO, Django/Flask/Rails/Remix/Next with postgres)
2. Supabase etc with JS/TS on either side of the network
3. Lambda/Cloud functions with Firebase/Dyanamo DB/Cosmos DB etc
4..n. What else and why?
Comments (723) 347 threads
Earlier comments1. Laravel
2. An Ubuntu VPS in either Digital Ocean or Linode
3. A managed database in one of those services, likely Postgres
That would get me to market the quickest. I have no issues with the application being in Laravel/PHP and after getting to market, I'd work on making the infrastructure scalable. I wouldn't expect overnight success, so a single VPS and managed database would let me keep costs low while I pick up a few customers and then work to handle the scalability in the background (likely AWS with a combination of EC2/ECS/Fargate, RDS, SQS, SES, CodeDeploy, ElastiCache, etc.)
That is absolutely the takeaway here. Use the technology you are familiar with and/or can be fastest with. MVPs are risky enough, don't add in "oh, gosh, I have to learn the tech (libraries, deployments, monitoring, database access, etc)" as well.
The only case where I'd pick a new tech for an MVP is when there is an existing open source or free project that I could use that would obviously get the project shipped faster by providing extensive pre-built functionality.
For example, I once used Sharetribe https://github.com/sharetribe/sharetribe even though I was only an intermediate ruby programmer because, after time spent evaluating it and other solutions, it had functionality that could get us shipped faster.
From "git init" to our first beta customer was 1 month of time. Then to our first paying customer was 1 more month. One developer (me). To be fair, my co-founder had done a ton of market development before I started coding, so the initial market/feature discovery was done; that's a huge part of any MVP.
It also makes it easier to scale within Linode/Digital Ocean if you find yourself needing to do that before the more complicated AWS infrastructure is ready.
The thing that bugs me the most with Next.JS and the whole JAMStack movement is that, yeah, you get from "git clone" to deployed on Vercel in two minutes, but if you need to create real app features like a sturdy admin, accounts, authorization, proper asset management, CI/CD, it takes a whole lotta time. I'm not even touching the most common app features. I'm speaking from experience, from building a Next.JS app for about a year.
Most Next apps out there are incomplete with the worst freaking user experience. Insert any other JS framework or hosting provider in the place of Next.JS and Vercel.
Of course, this is a generalisation, not all Next apps are that bad.
Using Rails is like a cheat-code in dev term.
I know JS very well, so writing HTTP handlers is quite fast.
Node runs on V8, which is probably the fastest runtime for dynamic code.
SQLite makes development easier as it’s just a file, gives you ACID.
- Frontend: React/Mobx/Tailwind SPA hosted on firebase hosting.
I think the concept of JSX (write your HTML with JS) is good as it gives you a real language instead of a restricted templating DSL.
Tailwind for the fast iteration speed.
Firebase hosting for the simple CLI and fast CDN.
- OS and hosting: Docker running on Google Container Linux
Docker so that the OS level dependencies of my server are defined somewhere.
Container Linux as it auto updates and has all the GCP logging and monitoring built in.
GCP for the incremental disk snapshots for simple backup of the SQLite state.
If I had to scale the service I would add more CPU cores and faster disk. I would also move the parts that need scaling to Go/Rust, and design the code to make use of the cores.
A few principles I use when choosing tech:
- Avoid distributed state (network boundaries) when possible (SQLite instead of SQL server, function calls instead of micro services).
- Use tools for their primary purpose. No shoehorning. Issues arise when you try to use something for what it was not designed exactly for. If you have >3 tools in your stack that you are shoehorning, things are more likely to break in the future.
- Things should still work in 10 years with minimal updates. Lindy effect. Bet on older tools if possible as they are more likely to be around and maintained.
- Good enough vs optimal: stop trying to find the perfect tech. Web tech is sometimes messy and imperfect. Opinion over what is right changes.
I never got this reasoning. In Vue the idea is:
* Write html templates in HTML
* Call javascript from the template to do javascript things (i.e. computed properties and methods)
This has always made the most sense to me, conceptually.
Sure Vue gives you a DSL for looping template elements (v-for) or showing template elements (v-if), but almost all the typical javascript action happens inside typical javascript calls.
It eliminates entire classes of human errors.
Continue this thread — 1 reply
Can you share any Dockerfiles / scripts you use to get going with this?
There are two template repos I use: `web-ui` and `server`
The both have a `sh` dir with common commands in .sh files (watch tailwind, watch esbuild, browsersync to serve and live reload during dev).
You config Google Container Linux with a `cloud-config.yaml`, which can take a bit of time to tailor at first, but after that every project uses the same config with small changes. I use Caddy to terminate HTTPS (it will auto generate and renew certs).
If you have a contact I can message you when I put them on Github.
Many years ago a CIO told me he didn't really care what technologies I picked for an upcoming MVP backend, as long as I was already comfortable with them and would therefore be productive quickly.
He also told me we would almost certainly need to rewrite everything at least once, so not to dwell too long on the initial stuff.
Build the MVP, build it quickly, get it in front of users. It just needs to work, you're not going to get marks, or customers, for backend coding style.
Stakeholders and managers want you to keep adding incremental features. Never had a situation where they were like "okay, cool MVP, see you in a few months after you tear it down and rebuild it 'for real'."
That "build a fast crappy MVP" mentality takes serious buy in from stakeholders from day one. That mentality might be common in SV and other startup communities but boy is it tough to find elsewhere.
My only somewhat clear path out of it is to make sure you built it so it will be easy to rewrite. Either do the least that you can, or keep an eye for improvements, but don't necessarily act on them.
> The lesson to be learned from this is that it is often undesirable to go for the right thing first. It is better to get half of the right thing available so that it spreads.
https://www.dreamsongs.com/RiseOfWorseIsBetter.html
All comments shown.
Couldn't load more comments. Check your connection and try again.