How to easily send mails in NestJS?

Sending emails is a critical functionality in many applications, whether for user notifications, transactional updates, or marketing purposes. However, implementing email solutions can sometimes be cumbersome, as you have to integrate mailer with template language, check for dependencies… But! With the @nestixis/nestjs-mailer package, you can simplify this process while ensuring flexibility and reliability. This package leverages the power of React and Nodemailer, making it a modern and developer-friendly tool for building dynamic email templates and sending emails effortlessly. ...

January 5, 2025 · 3 min

Advantages of search databases

In the past, I often noticed a common approach where developers (including myself of course) used the same API for both reads and writes on every case. Even more so, we frequently relied on the same data source, such as MySQL/PostgreSQL, to handle both operations. This means writing to the same columns and reading from them, often leading to struggles with optimizing indexes on fields that were heavily queried. ...

January 4, 2025 · 4 min

How to solve dual write problem in NestJS?

There are only two hard things in Computer Science: cache invalidation and naming things. – Phil Karlton Well, let’s add another one to the list: consistency. In distributed systems or modular monoliths, maintaining data consistency across multiple services or modules can be quite a challenge. Let’s imagine we have an e-commerce application with two services: OrderService and PaymentService. The OrderService is responsible for confirming orders, while the PaymentService handles the payment processing. Here’s a simplified example in NestJS: ...

September 15, 2024 · 9 min