Cover image for looking for answers !, strapi vs nest js for my next project

looking for answers !, strapi vs nest js for my next project

warriordev profile image warrior.dev Updated on ・1 min read

I have never worked with any of the 2, I come from the world of laravel and typescript.
I want to explore these options for a new project, but I can't decide.
If you have to compare them, how would they compare?


markdown guide

Strapi is a general purpose CMS with lots of plugins, which can make it good for backend data server, content server, media server, and so on (many kinds of APIs). Officially advertised as: "Open source Node.js Headless CMS to easily build customisable APIs".

NestJS is an MVC framework which handles the lowest levels of serving content/data in something like a CMS, or a custom application. Officially advertised as: "A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript & JavaScript (ES6, ES7, ES8)".

Strapi is written in JavaScript and is venture capital funded.

NestJS is written in TypeScript and is very robust and very flexible and has a few very well written plugins, microframeworks and solutions, or "extensions", like for example nestjxs/crud which instantly gives you a well designed OpenAPI REST server. These provide scaffolds to build custom solutions on. In the end you can achieve something like Strapi but be a lot more flexible and robust, albeit at the cost of more development time.

Also with Strapi you can build your API graphically (or not), with NestJS you need to do it programmatically (with code).

If you're building a general purpose app, or you're a very small shop, or a small company looking to replace WordPress, choose Strapi, it's faster to get going. (this doesn't mean Strapi is not good for large companies, but very much depends on what you're building)

If you're very serious about your applications, you prefer code to a graphical UI, and you're building some very custom solution that needs to be extended over time, needs to be very robust, and follow a strong and well understood application architecture (MVC, NestJS looks a lot like Angular), can't have (many) runtime errors, needs to stay performant always, think large enterprise stuff, then you're probably better off choosing NestJS.

That's based on my personal experience and I've only just written my first backend with NestJS but previously I tried Strapi. Have to say that I prefer NestJS even if this is a personal project. It's a lot more flexible and robust (for example I can better enforce referential integrity, which is something you can't do with Strapi. This can lead to less headaches down the road.).


Thank you very much! Very good answer! It helps me to clarify the picture a lot!


Thank you. Glad I could help. I hope I didn't paint Strapi in a bad light. Maybe I should have said that what took me a few days to write in NestJS, only took me a few minutes to bootstrap in Strapi using the GUI. But like I said, with NestJS I have more control at the finger tips and more power (which I cared for a lot more, like writing my database schema such that referential integrity gets built into the database schema, and not left over to the client or backend service to enforce with application logic which adds the need to write more unit tests).


Would be there any moderators on a dev.to soon? This project would become a garbage soon, with a posts like this.


1) It's NEST on your screenshot, but you're asking about NEXT, i guess you meant a Nest framework;
2) Strapi is a headless CMS;

You can't compare them, they're for different purposes go RTFM...


it was an autocomplete error. it's nestjs vs strapi (updated title)! thanks for it!.

Well the idea of nestjs vs strapi, was because I need to know if someone has already worked with strapi to model their backend and if they have been flexible enough to add more functionality over the time, or if it has been a bad experience. I know that nestjs is much more flexible and robust, but I also know that strapi is much faster to model a backend.

Maybe the question should have been strapi or nestjs as backend.

Best regards and thanks for your time!



Nextjs has good documentation and structure (folder, pattern design, etc.), maybe if you want good community support and more details on "How to implement it?", It is a good option.

Good luck!


Thanks for you response, i got an autocomplete error, but what do you think in nestjs vs strapi to model a backend, in terms of add more functionabilities over the time


Nest.js is a "lightweight development framework" and Strapi is a "Headless Content Management System". The first has all tools to make your Back-end server, but Strapi has plugins for extending its functionalities and It's a CMS (big difference).

What do you want? That is the response. You want to make your CMS? or you want to make a "simple" app?


I want to use strapi to automatically create a database and a basic api (e.g. authorization), and nest js to implement interesting functionality using a database of users from strapi. What do you think about that?


That's is the same approach i have.
I'm using in my current project strapi for simple things and nestjs for the business logic 💪🚀


How is it going for you guys, strapi+nestjs? I'm also thinking about same approach.