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 commentsBut since you asked about backends specifically, this is what I would use. I would use clerk.dev for authentication, Hasura for the CRUD API, neon.tech for the database, S3 for static files (images), and AWS Lambda for any extra functionality you can’t accomplish with Hasura natively (but call them through Hasura).
Personally, I like using GraphQL because I can just focus on my data model and not think about what endpoints I need to make. But there’s definitely a learning curve, so sticking with a REST API is probably better for most people.
As an alternative, I would also consider Supabase like you mentioned. It sounds cool, but I’m already comfortable with Hasura so that’s what I go to first.
Update: For a website, I would actually use Remix with Clerk for auth and Prisma/SQLite for data stuff. That’s one of their premade starter stacks. I made one prototype with Remix and had a lot of fun using it. It’s easy to learn and will give you a high performance full stack app. My original answer is what I would use if you’re making a mobile app.
Elixir for the backend. Reasons for it:
- Elixir is designed for reliability, so since I want to keep the app alive as much as I can by myself, it seems like a great fit.
- It also has excellent integrations with Postgres (my choice of DB) with Ecto.
- I generally skipped Phoenix, as I'm just using Elixir to create my API.
- Absinthe provides amazing support to create GraphQL API from scratch.
Frontend will be React probably with Relay.
- I've been using React at my job for years with GraphQL and I'm pretty fond of it.
- I've been planning on investingating Mobx, as I've never used it but heard good things about performance there. I'm not sure if it's going to be worth using it with GraphQL
- Relay has quite a lot of boilerplate, but I found it good enough for what I'm doing, and I liked the performance. Also it's fairly easy to integrate with Absinthe.
- Generally since this project is not made to be a start up or a business first, I want to experiment on the front-end on how I could reach the best performance with these tools at hand.
- I plan on using TS with the GraphQL queries mostly generated from the schema.
For deployment I plan on using a VPS probably, though I'm way far from having to choose that.
Why specifically? Phoenix is mostly just some convenience on top of plug, but does a lot of things you'll have to reinvent.
And in my opinion, it is already past its best days. I know of several companies in my area that a few years ago chose it for building their services and ended up, or are migrating to other stacks because of their problems hiring.
This is flat out untrue.
Here's why I'd pick it:
1. One language for the whole stack. It's an MVP so the front and back are both changing fast, with changes made by the same person, and you don't want to context switch all the time.
1a. Javascript as that language because it's the most flexible. And with TypeScript you can gradually opt into type constraints where they help you.
2. An opinionated full stack like Ruby on Rails that integrates all the pieces I need to ship. When you assemble yourself, even small version bumps or outdated tutorials can send you down a rabbit hole, stealing time from testing PMF. You want someone to validate a combination in which all the pieces work together smoothly.
2a. Redwood.js closest to be being the Ruby on Rails of JavaScript. I've toyed with it before and got up and running quickly. Its opinions took a lot of unimportant decisions out of my hands and let me focus on what I was trying to produce. I didn't get so far as to confirm this but it also seems to make it easy to gradually drop the scaffolding if the opinions and simplifications ever get in your way.
- Validations
- Translations/localization
- Error and request logging and auditing
- Security (CQRS, CORS, CSRF)
- Permissions and a way to integrate it with your authentication (does supabase handle this? don't know)
- Email sending
- Background jobs
- Caching
- File uploading
- Rate limiting
Several of these very important things are missing for all of these frameworks. While most of them come by default or with community maintained "de facto" solutions.
I'm yet to see a feature wise equivalent framework in the JS world to laravel/django/rails. They're batteries included or full stack just on the surface, as soon as you start using them you start missing a ton of stuff.
All comments shown.
Couldn't load more comments. Check your connection and try again.