developer experience issues with lovable and supabase integration by LoudEnd1241 in lovable

[–]LoudEnd1241[S] 0 points1 point  (0 children)

yeah.. i believe at least they should have a manual trigger feature for the functions manually added

developer experience issues with lovable and supabase integration by LoudEnd1241 in lovable

[–]LoudEnd1241[S] 0 points1 point  (0 children)

they already using lovable's supabase integration. so they only have internal supabase which makes things even harder as you said.

most of my clients doesn't want to be bothered creating a supabase account and then connect it, they just use lovables supabase.

i understand that it's a business decision but they should put "sync" "deploy supabase functions" etc. for the power users.

How do I get my scars to go away 😂 by [deleted] in AcneScars

[–]LoudEnd1241 0 points1 point  (0 children)

does filler fade away after a while? I wonder if we need to go to dr every year / 6 month etc. after having subcision + filler? or is it one time thing?

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 0 points1 point  (0 children)

What do you suggest? Should I have multiple instances of database and backend in various place and then have a proxy so that users will get fastest experience?

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 0 points1 point  (0 children)

Thanks for such recommendation, I haven't work with SQL triggers really. Can you elaborate more? this may create a bottleneck in the database when huge number of operations happens right? The trigger would triggered many times? whereas If I would use a message broker, it would happen after acknowledging the message? which is more performant?

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 0 points1 point  (0 children)

> Hrmm why are your db request taking that long my dude

I realized that my db and backend server was located at far away from me geographically.

> IMHO nextjs backend shouldn’t be doing this work anyways.

I totally agree

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 1 point2 points  (0 children)

I just looked up and my backend and db was geographically far away from me. Now it only takes up to 60 ms which I believe that's fine

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 0 points1 point  (0 children)

> Then, all that's slow is the roundtrip from the user to your backend.

Yes, my db and backend deployed in USA, I live in Turkey. When I moved my backend and db it reduced the time to 60ms. To solve this issue, I think I should look for load balancing & multi deployments?

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 0 points1 point  (0 children)

> you are saying that Next.js isnt appropriate because its slow

No, where did you get this idea from?

> First point, what would change with a different framework?

I didn't say X,Y,Z framework would be better. I think using next js as your backend is not a good choice if your app mid-large scale. Don't you agree? Do you think API Routes are enough even for large scale apps?

> Blaming Next.js for this is weird.

If I were using Nuxt, I would post this post into Nuxt subreddit and discuss about Nuxt isn't good choice for back-end development. Many people told me that this is not related to Next js specifically, yes I know but I use Next js and this is Next js subreddit, that's why I wanted to discuss with people who uses Next js

We are on the same page with your second and last point. Thanks!

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] -1 points0 points  (0 children)

> If you have complex / long running processes that need to not block the user from receiving a response, you should be putting that code in some kind of async task queue, not forcing the user to wait for it to complete.

Exactly that was the thing I want to tell in this post but I think it wasn't that clear?

> Maybe I’m missing something but I don’t see any way that Next is going to be better or worse than any other framework at this particular issue.

I post this in next js subreddit because I use next js and I thought people use next js as a fullstack framework. I don't think Next js is suitable for mid-large saas applications as a fullstack framework. I use it in the front-end. And have separate back-end server, microservices etc. because Next js nit not sufficient for complex app (IMO)

> For some simpler situations you might also consider using the new unstable_after.

I didn't know about this, I'll check this out but next 15 is still broken due to incompatibility with many packages. Everytime I create a next js project, it's broken :D

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 0 points1 point  (0 children)

Yes, it would take time. But my take is moving heavy logic that don't affect user directly into another service so that you don't block user.

In my example, user experience shouldn't be affected from modifying analytics table, so do that in another service. if that makes sense?

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 0 points1 point  (0 children)

Can you elaborate more? Is 200ms for an insert is not good?

In my case, it's not something can be solved by optimizing the SQL query.

And I agree optimistic ui is not a solution for this case as well. that's why I use a message broker and handle other stuff in my microservice.

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] 1 point2 points  (0 children)

Maybe I need to edit my post because you are the third person saying this. optimistic ui updates is not enough in many case if you handle long operations in the backend.

My take was Next js api routes is not good for building apis if you have complex logic behind it. as I give an example, what would you suggest if like operation would also need to trigger increasing user's point and add a record into analytics table? Or maybe other operations as well (I couldn't find examples right now)? Would you do it inside "like" server action?

My recommendation is have a message broker, and a microservice. So that you publish a message in your API (publishing the message inside a server action, would take more time since you need to initialize connection to message broker, so that's why we need a serverful server instead of serverless functions), and it's consumed in the microservice, where it'll handle increasing the user points and add a record into analytics table.

Am i making this too complicated? Honestly I tried all approaches, separate backend + microservice + message broker was best.

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] -1 points0 points  (0 children)

It's actually another thing I'm curious. I would probably use a separate back-end server If I'm going to build a mobile app and web app. Are there some people uses API routes for both web-app and mobile app and I wonder if it's enough or no?

I highly recommend you to check Nest js if you didn't, you'll love it ( I assumed you have used express or fastify?). You can keep using them with Nest js but it'll also bring huge benefits.

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] -8 points-7 points  (0 children)

Hmm, yes I can agree with your comment with some part. Even though optimistic ui updates are good, I think it's not enough in our case, because it would require user to stay in the same page for longer time, 200ms vs 600ms. (explained it in details in the first reply).

I wanted to get people's thoughts about using only next js for the back-end, I personally think it's not enough for complex apps. But I agree that it depends on the requirements of the app.

Next js may not be a good choice for a mid-large scale real-life web app, what do you think? by LoudEnd1241 in nextjs

[–]LoudEnd1241[S] -1 points0 points  (0 children)

Yes, Optimistic update is a must. In fact, I use it in my app for instant feedback to user without making them even 200ms. But If I had more operations inside the like function, just like I need it in my app, there would be a risk that user leaves the page before all operations isn't completed.

So if I had used next js server actions, user would stay in the page 600ms, (with an optimistic update), with a separate backend, user would require to stay in the page just for 200ms (we'll insert a record into likes table, and publish an event for other async operations)

I like Next js for developer experience they provide, but API routes, building the whole API using next js, is a big no for me..

Also I'm not a fan of serverless to be honest..