recommended backend for nextjs13? or use all in one backend and frontend with nextjs13?
Unanswered
Northeast Congo Lion posted this in #help-forum
Northeast Congo LionOP
Hi im struggling if with nextjs13 i still need a backend like nestjs separated or can use all in one with nextjs13? my main use is for auth module, for user to login to a dashboard, add new users, list invoices, create invoices, etc. i got all my info on mysql db right now
13 Replies
Polar bear
Hi, I suggest to start with everything in next and if your project takes off and you need to scale, then you can start thinking of adding extra complexity with a separate backend.
I do recommend T3-stack, you get a lot for free, like authentication.
I do recommend T3-stack, you get a lot for free, like authentication.
Northeast Congo LionOP
for auth you recommend next auth or prisma? i have all in mysql
planetscale uses ssl
@Northeast Congo Lion for auth you recommend next auth or prisma? i have all in mysql
Sussex Spaniel
Prisma doesn't deal with authentication, just as an ORM for your database
As @Polar bear mentioned, at the very begening of your fullstack journey, using api folder and serverless functions will help you to start your project.
For authentication you can use next-auth ( it changed to Auth.js ) and for a custom authentication guide you may want to follow my post here : https://dev.to/ekimcem/nextauthjs-authjs-credential-authentication-with-methods-you-need--21al
At the next level of your journey, I suggest you to take a look at Node.JS ( and my favorite backend framework is Express.) The reason is try to understand how backend works instead of get familiar with a new language. ( Also Node.JS is very powerful.)
And as @Sussex Spaniel said, Prisma is an ORM that you can manipulate (CRUD) your database.
I hope it helps @Northeast Congo Lion !
For authentication you can use next-auth ( it changed to Auth.js ) and for a custom authentication guide you may want to follow my post here : https://dev.to/ekimcem/nextauthjs-authjs-credential-authentication-with-methods-you-need--21al
At the next level of your journey, I suggest you to take a look at Node.JS ( and my favorite backend framework is Express.) The reason is try to understand how backend works instead of get familiar with a new language. ( Also Node.JS is very powerful.)
And as @Sussex Spaniel said, Prisma is an ORM that you can manipulate (CRUD) your database.
I hope it helps @Northeast Congo Lion !
@ekimcem As <@497086721666711563> mentioned, at the very begening of your fullstack journey, using api folder and serverless functions will help you to start your project.
For authentication you can use next-auth ( it changed to Auth.js ) and for a custom authentication guide you may want to follow my post here : https://dev.to/ekimcem/nextauthjs-authjs-credential-authentication-with-methods-you-need--21al
At the next level of your journey, I suggest you to take a look at Node.JS ( and my favorite backend framework is Express.) The reason is try to understand how backend works instead of get familiar with a new language. ( Also Node.JS is very powerful.)
And as <@482654642527010826> said, Prisma is an ORM that you can manipulate (CRUD) your database.
I hope it helps <@717105283012231300> !
Northeast Congo LionOP
oh so you recommend me use another thing as backend for example express or nestjs. But in that case then i should have auth in backend side right? without using nextauth
Actually thats not the first stap, In the api folder of Next project, you can create a backend, but after a while you may need a larger backend then you may continue with the frameworks that you mentioned.
And, you are right and wrong 😅 , You can also connect next-auth to your custom authentication backend, but you can also check the password maching in nextauth too ( becuase it is also works on server side not client side) it is up to you
And, you are right and wrong 😅 , You can also connect next-auth to your custom authentication backend, but you can also check the password maching in nextauth too ( becuase it is also works on server side not client side) it is up to you
Northeast Congo LionOP
i know im like running first i need to be slower but not use, they are so many tutorial and diff way to do things. i will need a big api i think? let my tell you main functions of my software: generate invoice, list user, create user, create admin user, have roles acl, manage inventory (products), manage isp routers using another api
got already my frontend using nextjs13 just need to figure which backend solution is best for my use case
Northeast Congo LionOP
and why expressjs instead of nestjs?
@Northeast Congo Lion i know im like running first i need to be slower but not use, they are so many tutorial and diff way to do things. i will need a big api i think? let my tell you main functions of my software: generate invoice, list user, create user, create admin user, have roles acl, manage inventory (products), manage isp routers using another api
well actually, if a response returns in under 10 seconds, next api will be enough. But if you do some long-term jobs in backend ( like scraping) you should have another microservcie.
@Northeast Congo Lion and why expressjs instead of nestjs?
Well, i do not have an exact answer to this, express seems more useful to me thats the only case 😄
Northeast Congo LionOP
got it, thank you so much for the tips both @Polar bear @ekimcem