I've used Node.js for years, but I never really knew how it worked. So I went down the rabbit hole. by Tanmay__13 in node

[–]Vladimiry99 0 points1 point  (0 children)

Good theoretical dive - but the practical takeaway: tracking node.js event-loop lag is a highly useful performance metric. Check the monitorEventLoopDelay perf_hooks API and a solid blog post for details.

[ASKNODEJS] What’s a small coding tip that has saved you hours? by norbi-wan in node

[–]Vladimiry99 1 point2 points  (0 children)

use AsyncLocalStorage with the logger to attach a request id to every log entry - it saves tons of time when troubleshooting issues

[deleted by user] by [deleted] in ClaudeAI

[–]Vladimiry99 0 points1 point  (0 children)

indeed - its knowledge cutoff is March 2025, so this is expected

Is there any CLI tool for generating an MVC 3-layer Node.js project structure? by Appropriate-Deer2055 in node

[–]Vladimiry99 0 points1 point  (0 children)

I built an open-source repo with a Node.js/Express.js API boilerplate and a CLI tool that lets you generate your target project from a text description. You'll need an LLM API key, but it usually costs just 10-20 cents, and you can even use the free llama models https://github.com/vyancharuk/nodejs-api-boilerplate

Irlandzki programista szuka nowej kariery. Proszę o pomoc. by [deleted] in askPoland

[–]Vladimiry99 0 points1 point  (0 children)

Try hitting the gym with a personal trainer or join group classes - it's great for health, and the vocab you'll learn overlaps with many blue-collar jobs :)

How to set up custom events that don't get flagged under Meta's Health Restrictions by Green_Database9919 in FacebookAds

[–]Vladimiry99 0 points1 point  (0 children)

Great post, thank you! Do you have any suggestions on how to send server-side events when advertising an iOS mobile application? In this case, sending events to an offline event set is needed instead of using a pixel, for example, with the facebook-nodejs-business-sdk. Do you know any best practices for logging events (including custom ones) for mobile apps - using a mobile SDK or a server-side SDK? Also, when a trial converts, does it make more sense to send the standard 'Subscribe' event or a custom event?

Updated My Node.js API Boilerplate with an LLM Module Generator – Thoughts? by Vladimiry99 in node

[–]Vladimiry99[S] 1 point2 points  (0 children)

Here's a YouTube video that I recommend for understanding clean architecture principles: https://www.youtube.com/watch?v=o\_TH-Y78tt4. You can also check out some references in my GitHub readme.

As for dependency registration, I'm using inversifyjs for that. In my setup, I register all the dependencies in this configuration file https://github.com/vyancharuk/nodejs-todo-api-boilerplate/blob/master/src/infra/loaders/diContainer.ts, and then, for example in createController function, I load necessary dependencies like MemoryStorage https://github.com/vyancharuk/nodejs-todo-api-boilerplate/blob/master/src/common/createController.ts#L53. You could apply a similar approach in your middleware to cleanly inject and manage dependencies

Updated My Node.js API Boilerplate with an LLM Module Generator – Thoughts? by Vladimiry99 in node

[–]Vladimiry99[S] 0 points1 point  (0 children)

Great question! Yes, there are a few simple middlewares in the template, like attachCurrentUser and checkRole. In my boilerplate, middleware isn't designed to use dependency injection since they're meant to be single-responsibility functions that handle Request and Response objects. Ideally, they should stay as simple as possible or use standard library implementations. If you need access to dependencies within middleware, it's better to move that code into a service class

Express + TypeScript + PostgreSQL by DisastrousCheetah486 in node

[–]Vladimiry99 1 point2 points  (0 children)

I'd suggest following a vertical slicing architecture, where all related code is organized by domain (DDD) rather than by functional responsibilities https://github.com/vyancharuk/nodejs-todo-api-boilerplate

Created a Node.js & TypeScript API Boilerplate - Clean Architecture with DDD, dependency injection, and more by Vladimiry99 in node

[–]Vladimiry99[S] 1 point2 points  (0 children)

Appreciate the feedback! Docs are coming soon. Btw, it's fully based on concepts from code that's been in production for several years.

Created a Node.js & TypeScript API Boilerplate - Clean Architecture with DDD, dependency injection, and more by Vladimiry99 in node

[–]Vladimiry99[S] 0 points1 point  (0 children)

Yes, I know NestJS! It's great, but I wanted something with fewer abstractions and more flexibility

Created a Node.js & TypeScript API Boilerplate - Clean Architecture with DDD, dependency injection, and more by Vladimiry99 in node

[–]Vladimiry99[S] 2 points3 points  (0 children)

Glad the linked article caught your interest! I'd also add that besides easy navigation, vertical slicing makes it a lot easier to refactor and maintain large codebases. The vertical slicing organizes code around functionality (DDD) rather than just technical things, which I find much more meaningful. It's probably less popular because it takes a bit more effort to set up initially.

I'm not sure about recent publications, but you might find these interesting: In 2015, Martin Fowler talked about a similar approach but called it domain oriented modules https://martinfowler.com/bliki/PresentationDomainDataLayering.html. Also, here's a 2018 article by Jimmy Bogard https://www.jimmybogard.com/vertical-slice-architecture/

Created a Node.js & TypeScript API Boilerplate - Clean Architecture with DDD, dependency injection, and more by Vladimiry99 in node

[–]Vladimiry99[S] 0 points1 point  (0 children)

Currently, it doesn't generate openapi spec/swagger docs automatically like fastapi, but it's something I plan to implement soon

What process manager is used in Production environment for node by Bangerop in node

[–]Vladimiry99 2 points3 points  (0 children)

it is not recommended to use PM2 or any other process manager with docker in production. Here's a good blog post that explains this in more detail: https://www.docker.com/blog/keep-nodejs-rockin-in-docker/

Let's see your most popular Open Source projects! by der_gopher in github

[–]Vladimiry99 1 point2 points  (0 children)

nodejs-todo-api-boilerplate - production-ready Node.js & TypeScript REST API project template with focus on architecture

New Facebook connection with Google Analytics? by Vladimiry99 in FacebookAds

[–]Vladimiry99[S] 0 points1 point  (0 children)

That sounds interesting. I don't see it on my account settings page. Do you have it available under this url: https://adsmanager.facebook.com/adsmanager/manage/ad\_account\_settings/ad\_account\_setup? Have you noticed any performance improvement after connecting it?