No video

Node.js Project Structure and Architecture Best Practices

  Рет қаралды 28,672

Software Developer Diaries

Software Developer Diaries

Күн бұрын

What are the best practices when setting up a Node.js app in terms of its folder structure and architecture? Let's take a look at that and other things such as monitoring, testing, logging, and so on.
======⚡⚡⚡======
Consider becoming a member of the channel ❤️
🙌 Become my Patreon and get exclusive perks: / softdevdiaries
💼 Follow me on LinkedIn and drop me a message if you'd like: / gusgadirov
💻 Also, let's connect on GitHub: github.com/gusgad
📚 Resources:
Contract Testing: • How does eBay utilize ...
🕒 Timestamps:
(00:00) 3-Layer approach
(03:17) Folder structure
(04:14) Monorepos and libs
(04:57) Pub/Sub
(05:34) Tests
(06:16) Logging and monitoring
(06:55) Coding practices
And don't forget to subscribe for more videos like this 😊

Пікірлер: 58
@gosnooky
@gosnooky 6 ай бұрын
NestJS provides a seamless implementation of the 3-layer architecture. I recommend using it for anyone not wanting to re-invent the wheel.
@rjwhite4424
@rjwhite4424 6 ай бұрын
Video was super helpful! I'd love to see a tutorial where you make a simple api from start to finish showing how to correctly use the 3-layer approach
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 6 ай бұрын
Thanks! I’ll try to follow that pattern in future videos 😉
@aurobindobhuyan2107
@aurobindobhuyan2107 3 ай бұрын
For Logging and Debugging, I use Morgan and Winston. The best part is you can combine it together to have the best o/p.
@stillmattwest
@stillmattwest 2 ай бұрын
This video should really be a playlist. It would be great if you slowed down and gave some specific examples for each of the major points. It seems like your target audience is new Node developers, but you move way too fast for them to keep up with you.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Ай бұрын
Great suggestion, will keep it in mind!
@SayfSentinel
@SayfSentinel 11 ай бұрын
i use almost an identical approach, it would be great to have this folder structure and a bit of code to understand the logic behind it in a github repo! very nice analyze, you got a subscriber with a ringbell activated :)
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
I couldn’t really go into code due to time constraints but thank you for the feedback 😉 And happy to have you here!
@Matter743
@Matter743 2 ай бұрын
Can you attach the github repo?
@nicolasmayorga8288
@nicolasmayorga8288 Ай бұрын
Amazing explanation, I'm here trying to learn more about architectures in backend due to I'm a Frontend trying to understand more about backend logic.
@yunyang6267
@yunyang6267 11 ай бұрын
Could you show us how to properly deploy a microservices architecture like this with several services and monitoring service to AWS or some other cloud proviiders? I think it'd be a great video
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Great suggestion!
@code_react
@code_react 11 ай бұрын
For this reason i really love to use Nestjs. Which is using 3 layer approach. And also you can have modules for each different tasks.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Good point!
@alandmcleod5988
@alandmcleod5988 Ай бұрын
Excellent! Nice layout and simple to read code. Unusual on KZfaq vids 🙂
@Jarjarniks
@Jarjarniks 2 ай бұрын
Would have loved to be able to see this repository and investigate the routes, services, controllers etc in more detail. Thank you for the great video nonetheless!
@isuckatthisgame
@isuckatthisgame 11 ай бұрын
I typically implement a DAL (Data Access Layer) to mediate between a service and a database in my architecture. Within the model layer, I maintain class definitions that represent database entities, which I refer to as entity models. My approach can be seen as a sort of 3.5-layer architecture, as the model layer doesn't have direct communication with the database. 🙂 Anyhow, thanks for explanation.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Interesting, thanks for sharing :)
@BarakAlmog
@BarakAlmog 6 ай бұрын
Great video. Thanks so much! Second or third time that I'm watching it. Appreciate it!
@madhavanand756
@madhavanand756 7 ай бұрын
Make a video upon how to do testing, unit testing etc. And also best practice to implement logs. Superbbbb content dude. I was looking for this from sooo long. Up for any support if needed.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 6 ай бұрын
Will do, buddy. Thanks for the nice words! 😊
@aurobindobhuyan2107
@aurobindobhuyan2107 3 ай бұрын
Glad I'm following the same folder structure. 3layer structure 😅😅
@dailypromos6477
@dailypromos6477 8 ай бұрын
Thank you for sharing!!
@prajwalmandlik3517
@prajwalmandlik3517 Ай бұрын
If anyone has a good source for learning this, please share it in the comments.
@maximus4510
@maximus4510 11 ай бұрын
That was informative for sure
@agony4181
@agony4181 25 күн бұрын
Did you mean that the best structure is a nest? I agree :)
@codewithyaji
@codewithyaji 11 ай бұрын
Very helpful vidoe of node developers.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Glad to hear that!
@paperC_CSGO
@paperC_CSGO 3 ай бұрын
Please do a video on monorepos!
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 3 ай бұрын
Already have one! 🙂
@yutsacarm8021
@yutsacarm8021 5 ай бұрын
really good content
@onstn4129
@onstn4129 5 ай бұрын
Thank u ❤
@achrefnabil2463
@achrefnabil2463 11 ай бұрын
Can you share microservices/serverless/SOA/monolith folder structure
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
I’ll consider those in future videos 🙂
@MoaathAlattas
@MoaathAlattas 11 ай бұрын
it would be great to complete this with `Analytics`, `Continuous Integration (CI)` and `Deployments (staging/production)`
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Good point!
@niju7489
@niju7489 5 ай бұрын
I have class based routers and controllers and models are seperate...I generated them using sequelize cli
@bautistavicens7870
@bautistavicens7870 4 ай бұрын
Could you apply Design Patterns, like Strategy, in node projects like the one in the video, with router, controllers and services? I´ve seen it and applied it in Java projects, but with POO paradigm. So, i´m in doubt if it is a good practice or not, to use it in node projects with this kind of paradigm.
@ramdoni3935
@ramdoni3935 11 ай бұрын
good explaine next content please Go-lang :)
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Ohh I'd first need to learn Go :D
@samueltheophilus1779
@samueltheophilus1779 8 ай бұрын
Love your videos man. What tool do you use to make these boards
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 6 ай бұрын
It’s Excalidraw :)
@ajmaln73
@ajmaln73 4 ай бұрын
can u share the codebase link in the description?
@maksymshyshkov2787
@maksymshyshkov2787 3 ай бұрын
good video. sorry for changing 666 thumbs up to +1 )) but I can't just pass by
@shreshthverma1535
@shreshthverma1535 6 ай бұрын
can you share the repo of this project
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 6 ай бұрын
Unfortunately there's no code for this one :/
@shreshthverma1535
@shreshthverma1535 5 ай бұрын
any example repo??@@SoftwareDeveloperDiaries
@lnard0
@lnard0 4 ай бұрын
Hello, Do you still got the repo for this?
@khaledsanny4817
@khaledsanny4817 8 ай бұрын
We want to read your code 😊
@ericsiddiq7634
@ericsiddiq7634 5 ай бұрын
is it possible to get this project source code?
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 4 ай бұрын
Unfortunately not for this one, sorry 🥲
@whysohypocritical
@whysohypocritical 9 ай бұрын
I wish you could share the code for your videos
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 9 ай бұрын
I will do my best to do that in the future videos!
@lardosian
@lardosian 11 ай бұрын
FYI...sounds like you might have some kind of automated video or audio editing, seems to cut off some words in parts of your videos
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Exactly, it’s a feature in Filmora that removes silent parts of the video :)
@lardosian
@lardosian 11 ай бұрын
@@SoftwareDeveloperDiaries Sounds like it needs tweaking because its removing parts of words, possibly a gate setting.
@korkut31
@korkut31 5 ай бұрын
huseyin baskan r harflarini cok vurgulu soyluyorsun dinlemek yorucu oluyor. haberin olsun. basarilarinin devamini dilerim
@frankr919
@frankr919 10 ай бұрын
😒 'promosm'
How to handle Node.js errors like a Pro?
12:44
Software Developer Diaries
Рет қаралды 27 М.
Here's why you need Nginx as a Reverse Proxy for your Node.js app
10:17
Software Developer Diaries
Рет қаралды 22 М.
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 35 МЛН
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 15 МЛН
Smart Sigma Kid #funny #sigma #memes
00:26
CRAZY GREAPA
Рет қаралды 19 МЛН
Challenge matching picture with Alfredo Larin family! 😁
00:21
BigSchool
Рет қаралды 37 МЛН
This Is The BEST Way To Structure Your GO Projects
11:08
Melkey
Рет қаралды 70 М.
Node.js Security Best Practices: JWT blacklisting, rate limiting, schema validation
12:02
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 438 М.
Junior vs Senior React Folder Structure - How To Organize React Projects
16:16
Why use a monorepo?
6:32
Vercel
Рет қаралды 104 М.
All you need to know about "child_process" in Node.js
12:38
Software Developer Diaries
Рет қаралды 5 М.
How I Did The SELF BENDING Spoon 😱🥄 #shorts
00:19
Wian
Рет қаралды 35 МЛН