Two projects, two back-ends: when it pays to separate the API
I have two personal projects that solve a similar problem — class, student, and activity management — but with very different architectures. ProfessorOS is a Next.js project only, with everything inside the same process: front-end, API routes, and database access coexisting in the same application. On the other hand, leanpulse has a separate back-end, built in NestJS, communicating with a separate Next.js front-end.
The author has two personal projects, ProfessorOS and leanpulse, which solve similar problems but have different architectures. ProfessorOS is a Next.js project with a monolithic architecture, where the front-end, API routes, and database access are all part of the same application. In contrast, leanpulse has a separate back-end built with NestJS, which communicates with a separate Next.js front-end.
The author reflects on the advantages and disadvantages of each approach, concluding that a monolithic architecture is suitable for small, personal projects, while a separate back-end is preferable for larger projects or those that may require multiple front-ends. The author's experience with both projects informed their decision-making process.
Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.