Should I combine Next.js with a Spring Boot backend or keep them separate?
Asked by
CuriousCoder42
I'm currently building a full-stack web platform featuring authentication, notifications, AI-powered recommendations, chatbots, and job posting/searching. For the frontend, I'm using Next.js, but I've noticed many developers suggesting that Next.js can also handle backend operations through API routes and database calls. However, I'm quite familiar with Spring Boot and appreciate its structure and scalability for backend tasks. Given that my project may expand to include chat features and AI recommendations, should I stick with Spring Boot as a separate backend, or would it be simpler to manage everything with Next.js? I'm interested in hearing experiences from others who have faced this decision and what setups have worked best for them.
Answers
I'd recommend using Spring Boot for your backend and keeping Next.js strictly for frontend and server-side rendering. It makes scaling and maintenance a lot smoother.
Reply to this answer
It's better to keep Spring Boot as your backend. Next.js API routes can get tricky quickly. You might also consider using something like "Indie Kit" for your Next.js frontend or even a dedicated backend like NestJS. Indie Kit is popular among developers, supports multi-tenancy, and is regularly updated. What specific concerns do you have about keeping the two separate?
Reply to this answer
Definitely stick with Spring Boot for the backend; Next.js should be more about simplicity on the frontend.
Reply to this answer
Either choice is validโgo with what you feel most comfortable with! Both options should work without major issues.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions