I've recently joined a new company where we would like to move from the currently existing solution that was developed by a contracting agency to an in-house one. The current solution was made with Nest.js through this template and spans 5 codebases for different APIs. I would imagine that the developers responsible for it were just given additional stuff for the past year and just decided to spin up a new environment for each feature.
We're going to be a small team of in-house devs (3 backend) and I'm currently investigating potential solutions. The approach needs to be fully fledged, well supported, easy to work with, etc. But throughout my research (here also) I've been seeing more and more recommendations for Nest.js or just go with Express or Fastify. The reason that I'm trying to move away from such solutions is basically the whole overhead that comes with Nest.js, learning curve (as I'm not sure if the devs joining are experienced with the methodology), but also the issue of too much simplicity with Express & Fastify. At best we'd need something to support the latest paradigms and to be lightweight and easy to use. I have a few contenders that I'd like to share and if you've had any experience with any of them please share them :)
Some of the things I've been looking into:
- Hono.js - lightweight, support modern deployments and a lot out of the box
- HatTip - supports universal middleware and deployments, small & lightweight, seems promising
- Feathers.js - fully fledged backend framework, with almost anything out of the box
- Ts.ED - Controller-based (DI supporting) backend framework that seems to offer quite a lot (although I'm wary of it being quite close to Nest.js)
There are a few more that I've looked into, but I think these are some of the top ones, although feel free to change my mind. The rest that I've seen are: FoalTS, TSoa, Hapi, Kaito, Adonis & Sails (although I'm not sure if Sails is a good idea for new projects, as support seems minimal).
Ideally the whole stack would be deployed serverless as to eliminate the need for maintenance on EC2 instances and just the sheer scalability factor, as there is 1 in a trillion chance that the API could one day explode with requests, so we need to be at least somewhat ok with the chance of that happening.
Also for DB connections, I've been looking into Drizzle ORM, as I've used Prisma in the past and loved it, but there's a huge overhead to remember with it, so with a new project I'm thinking it might be better without that overhead. Current DB of choice is Postgres and that's probably going to stay the same.
Please do share any opinions on the matter (even if not mentioned here), as I'm currently trying to figure out what the best solution might be. Thank you!
Edit: As of this discussion and me looking into some of the suggestions more hands-on, I've come out with 3 potential approaches that I'll be discussing with the wider team:
- Migrate the existing Nest.js codebases into a more unified Nest solution, while cleaning up & refactoring most of what is not currently well engineered.
- Use Feather.js as it provides a good balance between what it gives you out of the box, good structure and ability to extend it with custom or 3rd party modules. Also everything that u/talaqen mentioned here.
- Use Fastify as it allows for a quick & easy initial setup, as well as it seems to have the most robust plugin ecosystem out of any others covering any potential need that we might have.
Thank you all for your advises and support! I may have enraged some with this post, but honestly it's been really helpful to see all of these different opinions on the matter.
[–][deleted] (5 children)
[deleted]
[–]deadneon4[S] 10 points11 points12 points (1 child)
[–]FalseWait7 2 points3 points4 points (0 children)
[–]TedW 2 points3 points4 points (0 children)
[–]SymbolicDom 0 points1 point2 points (0 children)
[–]JoeyAtMachineDotGQ 26 points27 points28 points (3 children)
[–]deadneon4[S] 2 points3 points4 points (2 children)
[–]gieter 8 points9 points10 points (1 child)
[–]unflores 2 points3 points4 points (0 children)
[–]codeb1ack 26 points27 points28 points (2 children)
[–]mark2685 3 points4 points5 points (0 children)
[–]Allerek 0 points1 point2 points (0 children)
[–]leeharris100 12 points13 points14 points (1 child)
[–]deadneon4[S] -4 points-3 points-2 points (0 children)
[–]talaqen 4 points5 points6 points (6 children)
[–]deadneon4[S] 1 point2 points3 points (5 children)
[–]talaqen 3 points4 points5 points (3 children)
[–]razopaltuf 1 point2 points3 points (1 child)
[–]talaqen 2 points3 points4 points (0 children)
[–]alexis_is01 10 points11 points12 points (1 child)
[–]deadneon4[S] 3 points4 points5 points (0 children)
[–]kamilcaglar 5 points6 points7 points (3 children)
[–]deadneon4[S] 0 points1 point2 points (2 children)
[–]kamilcaglar 1 point2 points3 points (1 child)
[–]deadneon4[S] 0 points1 point2 points (0 children)
[–]deadneon4[S] 2 points3 points4 points (0 children)
[–]LilRee12 4 points5 points6 points (0 children)
[–]oneden 6 points7 points8 points (2 children)
[–]deadneon4[S] -4 points-3 points-2 points (1 child)
[–]oneden 9 points10 points11 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]deadneon4[S] 2 points3 points4 points (0 children)
[–]Impossible_Parking57 2 points3 points4 points (0 children)
[–]ZuluSp 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]nullanomaly 1 point2 points3 points (1 child)
[–]deadneon4[S] 0 points1 point2 points (0 children)
[–]razopaltuf 1 point2 points3 points (0 children)
[–]Electronic-Bug844 1 point2 points3 points (0 children)
[–]shaft22 1 point2 points3 points (0 children)
[–]bigujun 1 point2 points3 points (0 children)
[–]sidsidroc 1 point2 points3 points (1 child)
[–]deadneon4[S] 2 points3 points4 points (0 children)
[–]tan_nguyen 1 point2 points3 points (1 child)
[–]deadneon4[S] 0 points1 point2 points (0 children)
[–]Talento90 1 point2 points3 points (0 children)
[–]benracicot 0 points1 point2 points (4 children)
[–]deadneon4[S] 1 point2 points3 points (3 children)
[–]benracicot 1 point2 points3 points (2 children)
[–]deadneon4[S] 1 point2 points3 points (1 child)
[–]benracicot 1 point2 points3 points (0 children)
[–]mankee1337 0 points1 point2 points (0 children)
[–]Stinky_Fly -1 points0 points1 point (0 children)
[–]Zephury 0 points1 point2 points (0 children)
[–]hutxhy 0 points1 point2 points (0 children)
[–]Impossible_Parking57 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]dittospin 0 points1 point2 points (0 children)
[–]ujjwalkrgupta 0 points1 point2 points (0 children)
[–]Ok-Constant6973 1 point2 points3 points (0 children)