Live data from Hacker News

Ask HN: What would be your stack if you are building an MVP today?

news.ycombinator.com

601–610 of 736 posts

Re: Ask HN: What would be your stack if you are building an MVP today?

#601
post #298
post #67

SvelteKit + Supabase. It’s the opposite of what a lot of people recommend. It’s not battle tested. Both of these technologies are still maturing BUT: I can write everything in JS/TS, I don’t have to get good at Ruby PHP or Python Postgres is a great skill to learn. Supabase is portable and can be self hosted, and its JS client is easy to use for DB manipulation and stuff like object storage. For me, building a true f…

So I’m fairly new to the world of full stack web development. I’ve been trying to make an MVP using SvelteKit and Firebase, but what I’m running into is that they both kind of try and avoid a separate backend in different ways that seem to sometimes conflict with each other. For instance, Firebase is meant to connect on the client so you don’t need the backend database connection, but then you can’t use SvelteKit’s S…

The DB connection to Supabase can be made where ever you want it to be. It’s just JavaScript.

In Node, a “module” is generally scoped to a file. So you make a db.ts file and export the instance you create and it functions basically as a singleton. One DB connection per user per session. SvelteKit let’s you choose where to put that. The first place you import it is when it instantiates.

Auth in SvelteKit is trickier than it should be, but there’s a really good technique that I recommend you follow: https://www.captaincodeman.com/re-creating-the-sveltekit-ses...

I believe he uses firebase in his example. But don’t just copy paste, try to understand what is actually happening and why he had to do this workaround. Once you understand how SSR actually works, things get a lot easier.

Stores are a way of storing state on the client side, but to do SSR Svelte has to use stores on its “backend”. The key thing to understand is that stores that are used for SSR are server wide and persistent so you can’t store user specific data in them. There’s a special spot for that kind of state called events.locals.

It’s probably the trickiest area of SvelteKit IMO. I hope they make it better.

Re: Ask HN: What would be your stack if you are building an MVP today?

#602

After working with the PETAL (Phoenix, Elixir, TailwindCSS, Alpine.Js, Liveview) stack at $JOB for a while now, I have to say I've never been more productive. Early on I would still have to lean on Alpine heavily for various JS interactions but with all the features Liveview has been adding and improving on (Hello JS module!) I find myself needing it less and less. Liveview really has been a game changer for me. Tail…

We use Nomad at $JOB and it's been great. We're a small startup with one senior site reliability engineer doing pretty much all the infra work and I (~CTO) chip in when I can be useful, though when we adopted Nomad it was just me working on infra.

I looked into Kubernetes (I haven't worked with it at all before) and there just seemed so much complexity to handle things I didn't need that it was too much to learn for the benefit. Once I found Nomad it was a lot simpler, but it has everything we need and that's stayed true as we've grown.

I'd definitely strongly recommend it if you're wanting an orchestration system and don't need the complexity Kubernetes brings.

Re: Ask HN: What would be your stack if you are building an MVP today?

#603
post #474
post #368

HTML, css, js, (maybe jquery and font-awesome if I want to get fancy) and all static files dumped in an S3 bucket for as long as I can get away with it, then django if I need anything more. Not that I think python/django is the "best", but it is what I know and it's got all the batteries included out of the box. I've never made a sufficiently advanced UI that required react/vue/etc. So I still just stick with html/cs…

Instead of an S3 bucket you can use GitHub Pages. You push stuff to the upstream git repo and it gets deployed. It’s free (you have to pay for GitHub Pro if you don’t want to make the source code publicly available) and comes with Fastly CDN if I recall correctly. You just have to configure your custom domain.

Use GH to push to S3 on commit. Done.

Re: Ask HN: What would be your stack if you are building an MVP today?

#605
post #368

HTML, css, js, (maybe jquery and font-awesome if I want to get fancy) and all static files dumped in an S3 bucket for as long as I can get away with it, then django if I need anything more. Not that I think python/django is the "best", but it is what I know and it's got all the batteries included out of the box. I've never made a sufficiently advanced UI that required react/vue/etc. So I still just stick with html/cs…

I wonder why people like s3 buckets. if your website becomes viral it might become expensive

There is an AWS CDN available that can be placed in front of the s3 bucket. Also allows for custom domain names, TLS, globally distributed for low latency ec. https://aws.amazon.com/cloudfront/

Re: Ask HN: What would be your stack if you are building an MVP today?

#606

Earlier quoted context omitted.

Fellow EE here and love what you do! Loved your post on scraping.Btw, I thought you used Flask. Looks like I was wrong.

Thanks for the kind words. It’s probably time for me to revise that a bit, or write another one. I’ve learned a lot more yet since I wrote that. I used to use Flask, but I changed over to Django at the end of 2022. Super happy I did. It wasn’t painless, but the benefits have been totally worth it.

What were the benefits switching over to Django from Flask?

Re: Ask HN: What would be your stack if you are building an MVP today?

#607
post #550

Earlier quoted context omitted.

I was a Rails, Sinatra, Ruby dev for years and I’ve been work with Go for years too. I’m struggling to understand your perspective because I’m no less happy coding in Go.

I've only done a bit of Go. I liked some of the ideas that were present, but ultimately (and I believe explicitly) Go has computer-sciencey-correctness goals (hence all the kerfluffle over generics) that, now and again, trip things up. Sometimes that's really nice - we had a handful of tiny utilities written in Go, like a format converter for use in a datastream - other times it gets in the way. I don't think I'd wan…

> Go has computer-sciencey-correctness goals (hence all the kerfluffle over generics)

I really don't understand this. The debate over generics had nothing to do with "computer sciencey correctness" goals, they had to do with ergonomics. Of course, from Ruby, the idea of typing your code is completely foreign, but imagine if a function only allowed one type of parameter, and if you wanted another you had to define it again with a different name.

Basically like allowing flexible parameters makes function definitions more flexible, a lot like all the metaprogramming business in Ruby

Re: Ask HN: What would be your stack if you are building an MVP today?

#608

Elixir, Phoenix, LiveView + Postgres Main reasons are: - Can build entire app (with SPA-type experience on the FE) in a single codebase - No need to build any HTTP APIs - Periodic tasks and managing in-memory state is super easy in Elixir. Eventually you might want to stick state somewhere which survives restarts (eg redis) but for the sake of moving quickly Elixir makes this really easy - Newer versions of Phoenix/L…

I like Phoenix/LiveView so it's a nice option. But I'd probably choose Blazor over it as every one of those bullet points also apply to it, it's C# (with which I'm very familiar), and if it takes off there are masses of devs available in most markets as opposed to handfuls currently for Elixir/Phoenix. Coupled with something like DO droplets and SQLite/Postgres.

I have no experience with either (though I have perused some Elixir docs a while ago). I'd much rather jump into a Phoenix/Elixir project though, just based on what I've heard and know about it.

I wouldn't apply to a C# job, I have no interest in it.

I think the only disadvantage is really that Elixir devs would be newer to Elixir. But I think the applicant pool would skew towards having broader experience.

Re: Ask HN: What would be your stack if you are building an MVP today?

#609

Earlier quoted context omitted.

The one thing that Django is missing is the ability to attach a User object to a session without a full-fledged RDBMS. I wish it was structured like the Session object which you can in your own backends for.

This is unlikely to ever happen though since so much is tied to it like the permissions system and the admin. The ORM itself is central. I wouldn’t use Django unless your project depends on an RDBMS.

Even if not using a database, I will always reach for Django over a Flask or FastAPI. Yes, there is more boilerplate when just offering a few memory views, but there is so much ecosystem built around the tooling that the expense is worth it. Just making a form or sending an email from Flask requires a third party library which will never receive the level of maintenance as first-party Django. As an example, the often recommended (still mentioned on the Flask Mega-Tutorial) Flask-Mail package last had a commit in 2014.

Re: Ask HN: What would be your stack if you are building an MVP today?

#610
I certainly won't do it in the stack that I don't know even if the rest of the world is saying that stack is the greatest thing since sliced bread.

But more importantly, it depends on what I'm doing.

Just to give you an example: if am I making a simple site with some dynamic content? Why would I use React for that or a giant framework for that?

Post reply on HN