NestJS

NestJS

Application and Data / Languages & Frameworks / Frameworks (Full Stack)
Backend Developer ·
Needs advice
on
MongoDBMongoDBNestJSNestJS
and
PostgreSQLPostgreSQL

Hello everyone! I'm interested in building a Tinder-like application using NestJS with TypeScript. I'm currently exploring database options that can best support my application's needs. Can you recommend a suitable database and ORM for this type of project?

Thank you in advance for your help!

READ MORE
3 upvotes·300.8K views
Replies (1)
Lead Software Developer at Blaqueyard·

Personally I would have used Neo4j but am not sure if there's a library for nestjs. Another option I would have used mongodb.

READ MORE
2 upvotes·803 views
Needs advice
on
LoopBackLoopBackNestJSNestJS
and
Sails.jsSails.js

We have an existing (Apis only) Rails backend, that by default follows the MVC pattern, (at peaks of 700 requests a second). I am tasked with making the same (read-heavy) application in any JavaScript framework. I was advised to follow the MVC structure. So I am considering these 3 ( Sails.js, LoopBack, NestJS). I get that sails is closest to rails, but that's not particularly a priority.

READ MORE
6 upvotes·360.3K views
Replies (1)
Senior Software Engineer at Mews·
Recommends
on
NestJS

Out of these three frameworks, I'd recommend NestJS – it's by far the most popular and actively developed. However it's mostly inspired by Angular 2 so its take on MVC is a bit different from what you may be used to with Rails, with heavy reliance on decorators and dependency injection (and generally being more “ceremonial”). Nest is also intended to be used with TypeScript which I personally consider a plus. While you can use it with vanilla JavaScript the developer experience is more basic.

READ MORE
4 upvotes·18.5K views
Senior Software Engineer at Incube8 Pte. Ltd·
Needs advice
on
NestJSNestJS
and
Next.jsNext.js

I would choose Next.js / Nuxt.js or SvelteKit as they're implemented to support the backend that manages cookies/sessions/API/reactive components and props.

The good thing about them is that if ever your app grows with a ton of traffic, you can easily migrate your SSR app and use other programming languages such as Golang or Rust to serve the API.

NestJS is only used for the backend side, however, the backend side of this is already offered from these big 3 (Next/Nuxt/SvelteKit), as these 3 major SSR Frameworks were able to connect from RDB / MongoDB / GraphQL / 3rd Party APIs, you name it!

Regarding websocket / service-worker (PWA) / wasm, those big 3 can do it too

TL;DR: NodeJS is so big, don't complicate your life, make a single route to handle the frontend and backend, migrating to performant environment such as Go/Rust can be done over an api call inside those big 3 Next/Nuxt/SvelteKit.

READ MORE
4 upvotes·327.1K views
back end developer at elixir softlab solutions pvt ltd·
Needs advice
on
LoopBackLoopBack
and
NestJSNestJS

which one is best for enterprise applications LoopBack or NestJS?

READ MORE
4 upvotes·317.1K views
Replies (1)
Lead Software Developer at Blaqueyard·
Recommends
on
NestJS

Both are great frameworks but I prefer NestJS

READ MORE
1 upvote·202 views
Owner at Mingchen Information And Technology·
Needs advice
on
ExpressJSExpressJSNestJSNestJS
and
Spring BootSpring Boot

Hi, I am a new developer using Ionic to develop a mobile app. I have recently tried to build a social mobile app which will have video calling, payment transaction, chatting, sharing, etc. I am now confused as to which framework I should use for the backend: Spring Boot or ExpressJS or NestJS? Any detailed advice will be better for my development. Looking forward to your valuable reply.

READ MORE
4 upvotes·401.3K views
Replies (2)

Any tools that achieve your software functionalities is good. you should check if with these frameworks you can do video-call, chat etc. how the scalability is achieved and the complexity of using it with them. since you are starting from scratch you can do this kind of feasibility before starting

READ MORE
5 upvotes·1 comment·306.2K views
Rafsanjanee Rizvi
Rafsanjanee Rizvi
·
January 3rd 2021 at 12:26AM

Apprecaite your suggestion.

·
Reply

If I want to write server api, I will use NestJS as primary framework. It base on express | fastify so I can use anything of expressJs. SpringBoot is a java framework. I will think to write as payment transaction service. If you are Ionic developer. you will know Js / ES6. You can try NestJS / ExpressJS. - video calling: You can not create video calling feature. Some keywords: ffmpeg / coturn / webrtc - chatting: realtime (socket.io / websocket) - you can try some opensource as rocketchat. It also have video calling feature.

READ MORE
2 upvotes·1 comment·306.3K views
Rafsanjanee Rizvi
Rafsanjanee Rizvi
·
January 3rd 2021 at 12:44AM

Thnks for reply. I have a Chinese friend who gave me an App has 5 different kind of version as : for Android , For IOS , Admin panel, Web version, Destop Version. And that app is a giant as i have ever seen . Backend is fully developed by Spring boot and Mobile Front End developed by Native and desktop by C++ . The Features : Calling, Video Calling, Group Chatting, Group Calling in video, Bank Card adding Sdk, Payment throug qr code and adding freind throug qr code, User can transfer balance to another, timeline, notification, Live meeting, Live vedio sharing, Ticktock short video funtion, Public Account for Social Commerce... and etc. Admin panel has every control of that app with lots of tools. Same as like as WeChat which is Chinese biggest Social App.

I was shocked. It was a small team behind this app and they are continuing to update it but they cant rise because of the monopoly market . So is it possible by React Native and Express Without the Spring Boot

·
Reply
Needs advice
on
MongoDBMongoDB
and
PostgreSQLPostgreSQL

I need urgent advice from you all! I am making a web-based food ordering platform which includes 3 different ordering methods (Dine-in using QR code scanning + Take away + Home Delivery) and a table reservation system. We are using React for the front-end, and I need your advice if I should use NestJS or ExpressJS for the backend. And regarding the database, which database should I use, MongoDB or PostgreSQL? Which combination will be better? PS. We want to follow the microservice architecture as scalability, reliability, and usability are the most important Non Functional requirements. Expert advice is needed, please. A load of thanks in advance. Kind Regards, Miqdad

READ MORE
7 upvotes·367.1K views
Replies (3)
Senior DevOps Engineer at Vital Beats·

I can't speak for the NestJS vs ExpressJS discussion, but I can given a viewpoint on databases.

The main thing to consider around database choice, is what "shape" the data will be in, and the kind of read/write patterns you expect of that data. The blog example shows up so much for DBMS like MongoDB, because it showcases what NoSQL / document storage is very scalable and performant in: mostly isolated documents with a few views / ways to order them and filter them. In your case, I can imagine a number of "relations" already, which suggest a more traditional SQL solution would work well: You have restaurants, they have maybe a few menus (regular, gluten-free etc), with menu items in, which have different prices over time (25% discount on christmas food just after christmas, 50% off pizzas on wednesdays). Then there's a whole different set of "relations" for people ordering, like showing them past orders, which need to refer to the restaurant etc, and credit card transaction information for refunds etc. That to me suggests PostgreSQL, which will scale quite well if you database design is okay.

PostgreSQL also offers you some extensions, which are just amazing for your use-case. https://postgis.net/ for example will let you query for restaurants based on location, without the big cost that comes from constantly using something like Google Maps API to work out which restaurants are near to someone ordering. Partitioning and window functions will be great for your own use internally too, like answering questions of "What types of takeways perform the best for us, Italian, Mexican?" or in combination with PostGIS, answering questions like "What kind of takeways do we need to market to, to improve our selection?".

While these things can all be implemented in MongoDB, you tend to lose some of the convenience of ACID or have to deal with things like eventual consistency, which requires more thinking on the part of your engineers. PostgreSQL offers decent (if more complex) scalablity and redundancy solutions, and is honestly very well proven and plenty of documentation exists on optimising queries.

READ MORE
9 upvotes·278.3K views
Founder at Odix·
Recommends
on
MongoDB

Hello, i build microservice systems using Angular And Spring (Java) so i can't help with with ur back end choice, BUT, i definitely advice you to use a Nosql database, thus MongoDB of course or even Cassandra if your looking for extreme scalability with zero point of failure. Anyway, Nosql if much more faster then Sql (in your case Postresql DB). All you wanna do with sql can also be done by nosql (not the opposite of course).I also advice you to use docker containers + kubernetes to orchestrate them, if you need scalability and replication, that way your app can support auto scalability (in case ur users number goes high). Best of luck

READ MORE
3 upvotes·270.6K views
View all (3)
Needs advice
on
LoopBackLoopBack
and
NestJSNestJS

We inherited this project and the backend is using LoopBack v3. I haven't taken a look at Loopback.io v4, but I'm planning to replace it. The reason being is that Loopback v3 documentation is a bit confusing and we are having trouble packaging the build using Webpack. Not to mention, integrating unit tests (latest Jest).

I still think Loopback is a great tool, but their documentation is really "messy" and hard to navigate through. There's also a constraint of time from our side. So what's the best option out there?

Should I try upgrading to Loopback v4, or trying other stuff? (i.e. NestJS)

Thanks!

READ MORE
6 upvotes·229.3K views
Replies (5)
Senior Software Engineer at Autodesk·
Recommends
on
NestJS

As part of a new service we planned, we decided to choose Loopback v3 and v4 as POC and it was a nightmare.

After 2 weeks of fighting with the loopback framework and try to understand the documentation, we decided to search for other frameworks, we tried Adonis, Hapi, and many more.

After about a month of multiple POCs (I guess we had too much free time and we wanted something for the long run), we came across Nestjs when it was version 4 or 5 I think and it was great, we started to promote this framework within the company and we are using this framework in multiple new services in high scale and it works great! Super flexible and full express or fastify support.

It has monorepo support and I'm personally using it with NX for monorepo (Nx, terraform and nestjs with typeorm)

It's not yet perfect but has a great community and its expanding pretty nice :)

READ MORE
6 upvotes·1.8K views
Founder CEO / CTO at Unlimited Design and Technology·
Recommends
on
LoopBack

Loopback 4 allows you to modify every detail in the source code. Not like v3, you have to follow the hook and I admit that v3 has messy documentation. I think because they are developing too fast to care about the document. However, when I move to v4, actually if you are familiar with v3, it will be easy for you to use v4. And final points, you have to have knowledge about IoC to understand its concept.

READ MORE
3 upvotes·308 views
View all (5)
Needs advice
on
NestJSNestJS
and
Spring BootSpring Boot
in

I am currently planning to build a project from scratch. I will be using Angular as front-end framework, but for the back-end I am not sure which framework to use between Spring Boot and NestJS. I have worked with Spring Boot before, but my new project contains a lot of I/O operations, in fact it will show a daily report. I thought about the new Spring Web Reactive Framework but given the idea that Node.js is the most popular on handling non blocking I/O I am planning to start learning NestJS since it is based on Angular philosophy and TypeScript which I am familiar with. Looking forward to hear from you dear Community.

READ MORE
7 upvotes·902.5K views
Replies (2)
Recommends
on
NestJS

NestJS is an excellent framework (they both are). I would say the fact that you're working with Angular makes NestJS a great match, unless you're splitting front and back end between developers. But even in that case I would still go with NestJS for a new project.

Regarding the single threading point, take a look at PM2 which helps to run Node in multiple processes (we use it with NestJS) https://pm2.keymetrics.io/docs/usage/cluster-mode/

Also regarding web server performance in general this is an interesting post showing how Node with outperform Java in a web situation (be careful though, best to check a few posts to make sure these aren't totally biased benchmarks!): https://www.tandemseven.com/blog/performance-java-vs-node/

READ MORE
8 upvotes·1 comment·695.1K views
Slimane Deb
Slimane Deb
·
July 16th 2020 at 12:59AM

Thank you for passing by. Those are some great resources. I will check them and setup my mind.

·
Reply
Recommends
on
Kotlin

Node.js has only 1 real thread per process; Java JIT will mostly run faster than JS one; So if it happens to be not only I/O... Why do you need most popular, not simply popular? Does Node.js have tech advantages?

READ MORE
4 upvotes·2 comments·695.3K views
Slimane Deb
Slimane Deb
·
July 16th 2020 at 12:58AM

In fact, it will be mostly I/O operations, since I don't have a clear overview of what Spring 5 Reactive Framework, I think I would go for node. Did you happen to work with spring boot + mongodb ?

·
Reply
Sergei Kirjanov
Sergei Kirjanov
·
July 17th 2020 at 9:57PM

1) No, I have not used either spring boot or mongodb.

But I used JVM with dozens cpu cores busy cooperating tightly with each other, and Node will not give me such option.

Say me, if Node ecosystem can give anything, that JVM can not.

2) In MongoDB, a write operation is atomic on the level of a single document, so it's harder to deal with consistency without transactions.

So I'll need a very good reason to start using such system. What is Your reason?

·
Reply
Full Stack Web Developer ·
Needs advice
on
ExpressJSExpressJSNestJSNestJS
and
Node.jsNode.js

I'm planning with a small team to create an application which is a platform for restaurants. I'm on the backend almost alone currently. I'm going to use Node.js for that, and I'm very fond of TypeScript, and I worked before mostly with ExpressJS. The team may get bigger as the application becomes bigger and more successful, so I have the Scalability concern in mind now, and I was considering these options: 1) Use Node+Express+Typescript 2) Use Node+NestJs (which utilizes Typescript by default)

Option 2 is enticing to me because recently I came to love NestJS and it provides more scalability for the project and uses Typescript in the best way and uses Express under the hood. Also I come from an Angular 2 background, which I think is the best frontend framework (my opinion, and I know React quite well), which makes Nest feel familiar to me because of the similarity between Nest and Angular. Option 1 on the other hand uses Express which is a minimalist framework, very popular one, but it doesn't provide the same scalability and brings decision fatigue about what to combine with it and may not utilize Typescript in the best way. Yet, on the other hand, it is flexible and it may be easier to manipulate things in different ways with it. Another very important thing is that it would be easier in my view to hire Node developers with skills in Express than NestJs. The majority of Node developers are much more familiar with JavaScript and Express.

What is your advice and why? I would love to hear especially from developers who worked on both Express and Nest

READ MORE
7 upvotes·541.9K views
Replies (6)
Full Stack Engineer at RG Sistemas·
Recommends
on
NestJS

I highly recommend NestJS because:

  • It's a framework you already like;
  • Typescript is growing fast, being increasingly adopted in the community;
  • All layers are well defined, not needing to think much about the organization;
  • Great documentation;
  • Nest CLI increases the development speed and keep the pattern;

Only using express and knowing that project can grow, you'ill need to define the structure well so that it doesn't get out of control.

READ MORE
9 upvotes·429.2K views
Developer at Magrathea Labs·
Recommends
on
NestJS

Hi Louai,

I am quite sure that you know the answer to your problem. And I am here to help you to follow your arrow. I have worked with the most popular Nodejs frameworks and I can sure you that there's no stack better than NestJS (at all). Typescript is the best thing that happened with Javascript, this is a fact. Ans NestJS make a such wonderful job using all the best Typescript tools. NestJS is the most mature and organized API manager. Its modular dependence injection, the use of DDD, the solid idea of single responsibility, it's unit a and e2e testing support, its documentation is the most incredible work in the world of Nodejs. You won't regret choosing this framework, even if your application grows a lot. If you follow the documentation tips you will be able to create an amazing and organized application.

ps: I am not part of the NestJS team, I am just a guy tired of wasting time with dumb and bad Frameworks and its bad documentations. I find relief in NestJS with all the time it's saved to me, it helped me to improve my job and let me create great things with Nodejs.

READ MORE
5 upvotes·429.2K views
View all (6)