Nestjs Clean Architecture Example

screenshot of Nestjs Clean Architecture Example
nestjs
solid
prisma

Example of a node microservice with NestJS + Prisma + Clean Architecture (notifications API)

Overview

The NestJS Clean Architecture Example is an innovative microservice designed for notifications, created using NestJS and Prisma with a MySQL database for testing. This project stands out due to its adherence to Clean Architecture principles, making it especially appealing for developers transitioning from Java. The structure promotes scalability, maintainability, and robust design patterns in the codebase.

Setting up the application is straightforward, leveraging tools like Docker for Kafka integration and Upstash for a Kafka instance. This example is an invaluable resource for anyone looking to strengthen their understanding of microservices and Clean Architecture in a practical implementation.

Features

  • Clean Architecture Approach: Organized code structure that separates concerns, facilitating easy maintenance and scalability.
  • NestJS and Prisma Integration: Combines the powerful NestJS framework with Prisma ORM for efficient database interaction.
  • MySQL Database: Utilizes MySQL for testing purposes, ensuring developers can deploy familiar technologies.
  • Docker Support: Simplifies the setup and management of dependencies, particularly for Kafka integration.
  • Upstash Kafka Instance: Offers an accessible Kafka alternative to Docker, streamlining the process of message brokering.
  • Open API (Swagger): Provides an interactive API documentation interface for easier testing and understanding of API endpoints.
  • CI Workflow: Ensures continuous integration for robust application development and deployment practices.
nestjs
Nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.

solid
Solid

SolidJS is a declarative JavaScript library for building user interfaces, offering a reactive programming model for efficient updates. It stands out for its reactivity system that minimizes unnecessary re-renders and its small bundle size, making it a performant choice for developing lightweight and reactive web applications.

prisma
Prisma

Prisma is a server-side library that helps developers read and write data to the database in an intuitive, efficient and safe way.

fullstack
Fullstack

A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.