| Fullstack Next.js in Action

submited by
Style Pass
2021-06-13 17:00:01

I built some SaaS side projects in my spare time with Next.js. In my opinion, Next.js is a great framework for building fullstack web application. Because you don’t need to care about the build config when you bootstrap a project, just write your React pages and the API routes, everything works fine. You can write frontend and backend code in a single place and they can even share a common TypeScript’s type definition.

But the in first few times I use Next.js to build a web application, I’m not so happy. Because I’m lack of something like ‘best practice’. Should I use react-query or swr? What is the best way to handle error in API route? How do I response a 403 error in my service(model) layer without touching the res object? How do I implement a login system in Next.js (Next.js even doesn’t have a built-in helper for sending cookie)?

For me, I wish I could just focus on the main features when I start building a SaaS project, instead of considering these many ‘how to’.

Leave a Comment