u/Ok_Train_9768

▲ 11 r/nextjs

how do you decide between server components vs api routes for data tables in next.js?

If you are building a data table, with pagination and sorting, do you use server components, with page reloads per sort/pagination click, or do you make the table client side, with API calls for the data loads?

I can see pros and cons of both.

Curious what people doing?

Would be great to hear the reasons for your choice also.

reddit.com
u/Ok_Train_9768 — 3 days ago
▲ 3 r/B2BSaaS+1 crossposts

B2B Saas Foundation Template for Web Apps

Hi All,

I've been working on a template to help bootstrap a B2B saas products.

Does that sound useful?

I always have a bunch of requests from friends, family and other people for ideas and requests for some B2B app, but there is always a basic feature set that takes ages to put together before you can start working on the actual "app" features.

Things like login, authentication, invitations, installing initial frameworks and packages.

So I'm setting up a template using my favorite current stack (typescript/prisma/postgres/nextjs/shadcn/better-auth) to give you all that out the box, with a nice design pattern setup for scaling the app nicely over time (good separation of concerns e.t.c)

It will come with a basic Admin Dashboard for backoffice type tasks, and the Customer Dashboard as the main app interface. Both super minimal with just the basic auth and adding user and organization flows.

Am setting up it to scale nicely for multi-tenancy also, so imagine not just supporting your typical B2B saas setup, with the Admin and Customer portals, but making it easy to support multiple tenant types also. E.g for an Uber app, you need to support Drivers, Users, Backoffice staff, i.e multiple tenant types.

Does this sounds like it would be useful?

Its still in progress and planning to open source it once am done.

reddit.com
u/Ok_Train_9768 — 6 days ago