Lurker News
Specifically 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 comments
apocalyptic0n32 replies#
For an MVP, I'd choose what I'm most familiar with and can be fastest with. That would mean:

1. 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.)

mooreds#
> For an MVP, I'd choose what I'm most familiar with and can be fastest with.

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.

sanjayio1 reply#
Why opt for managed db?
apocalyptic0n3#
In my experience, I'm far more likely to run into database bottlenecks early on than web server bottlenecks (largely through hastily and poorly written queries or unchecked Eloquent N+1 problems). I'd opt for the managed DB so that there's limited chance that the database will affect other processes on the webserver (including serving requests, handling background and scheduled jobs, etc.)

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.

adrianthedev2 replies#
Nothing really beats Rails. Use something like Jumpstart (jumpstartrails.com) and Avo (https://avohq.io) and you scaffold a full consumer-ready app in literally a few hours.

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.

lcnPylGDnU4H9OF1 reply#
Thanks for making Avo! I'd been building something similar in the application I'm currently working on and it was nice to have something that already figured out much of the hard stuff to replace my shitty implementation.
adrianthedev#
Great to hear! Let me know if you run into issues.
quickthrower2#
If you are going to pay for a starter pack, you could get the same sort of thing for NextJS, right?
justsomeuser3 replies#
- Server: Node.js + SQLite

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.

unsupp0rted1 reply#
> 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.

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.

nojvek#
JSX shines if you use TS. Mostly because tsx has excellent code completion, type checking and refactoring tools.

It eliminates entire classes of human errors.

jcuenod1 reply#
What do you use for auth?
justsomeuser1 reply#
Just a normal create-user/login form. Or Firebase Auth if Google and other sign in's need to be supported.
jcuenod1 reply#
In the former case, are you managing signups, password resets...?

Continue this thread — 1 reply

ccorcos1 reply#
I’m keen on this approach for my next project.

Can you share any Dockerfiles / scripts you use to get going with this?

justsomeuser1 reply#
Sorry I do not, although I have been meaning to publish the "skeleton" template repo's I have locally.

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.

ccorcos#
Interesting. Thanks for the tips. I’m ccorcos@gmail — would appreciate the notification when/if you put on GitHub. Thanks!
logifail3 replies#
> What would be your stack if you are building an MVP today?

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.

throw1234651234#
That CIO is brilliant. That's the kind of wisdom you get with experience. Always good when stakeholders ask for additional features because the MVP isn't completely throw-away and then my team doesn't know the language. Then they learn the language, but we need to hire new devs and grow, and no one in the market knows the language. I always tell the new hires that we have a lot of learning opportunities - Go, Ruby, Python, Elixir - you name it. All the fresh college grads can't wait to jump in and contribute within 2 hours of getting hired. My grand-grand father always said "If you can't pick up a new language in a day, you aren't a good programmer and don't belong on Hacker News." He also said using C#/Java/Python is "sus booomer ** fr".
JohnBooty1 reply#

    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.
1000% agree. Overengineering things is the death of MVPs. But man this is hard to do in many real world situations.

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.

taeric#
Agreed, but it is also easy to see the tension in your second paragraph. You can plan to rewrite everything at least once, but you will never get that actually in the plan.

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.

noveltyaccount#
This is excellent advice. The "worse is better" manifesto says similarly:

> 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

Load more comments