Back to Trending
RepositoryTypeScriptIDIndonesia
andrechristikan

andrechristikan/ack-nestjs-boilerplate-kafka

Hybrid NestJs v9.x Boilerplate. Repository Design Pattern. Kafka Microservice. MongoDB(mongoose). Support Containerization.

114stars
22forks
0issues
0views

🚀 NestJS Boilerplate với Kafka Microservice và MongoDB

Một bộ khung NestJS hybrid kết hợp cả HTTP và Kafka microservice, thiết kế theo mẫu Repository Design Pattern, tích hợp MongoDB (mongoose) và hỗ trợ container hóa đầy đủ.

Đây là một dự án boilerplate dựa trên NestJS v9.x, được fork từ ack-nestjs-boilerplate, tích hợp Kafka microservice để xây dựng hệ thống hybrid HTTP + message queue. Dự án hỗ trợ containerization và tuân thủ các best practices của NestJS.

✨ Điểm nổi bặt

  • Producer & Consumer dùng nestjs/microservice: Tích hợp Kafka thông qua module microservice của NestJS.
  • Producer là global module: Được import toàn cục để dễ dàng sử dụng ở mọi nơi.
  • Không commit offset khi lỗi: Đảm bảo xử lý lại thông điệp thất bại.
  • Tùy chọn commit offset lần đầu: Hỗ trợ cấu hình linh hoạt.
  • Tạo topic mặc định 3 partition & 3 replication factor: Cấu hình mặc định an toàn cho kafka.
  • Hỗ trợ sequential processing: Dùng 1 partition, 1 replication factor và maxInFlightRequests=1.
  • Valid DTO bằng class-validation: Tất cả request kafka đều được kiểm tra hợp lệ.
  • Bật/tắt consumer qua env: Dùng KAFKA_CONSUMER_ENABLE để kiểm soát consumer.

💡 Vì sao đáng chú ý

Dự án cung cấp một cấu trúc rõ ràng, tuân thủ best practices NestJS, kết hợp Kafka microservice một cách chuẩn xác. Phù hợp cho các ứng dụng cần xử lý bất đồng bộ qua Kafka đồng thời vẫn giữ giao diện HTTP truyền thống. Đặc biệt hữu ích cho nhóm phát triển NestJS muốn nhanh chóng thiết lập môi trường microservice có Kafka.


#NestJS #Kafka #MongoDB #Microservice #Boilerplate #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
squareboat/nestjs-boilerplate

A production-ready 🏭 NestJS boilerplate with batteries 🔋 included. No Kidding! Now Supports NestJS V10!!

789
May 19, 2025
RepositoryTypeScript
josephgoksu/prime-nestjs

Production-ready NestJS boilerplate featuring JWT authentication, TypeORM, RBAC, Swagger, and Docker support. Built for enterprise-grade Node.js applications

493
May 25, 2026
RepositoryTypeScript
buqiyuan/nest-admin

NestJS CRUD for RESTful API 使用 NestJS + Mysql + Typeorm + Redis + JWT + Swagger 企业中后台管理系统项目RBAC权限管理(细粒度到按钮)、实现单点登录等...

2.3k
Oct 26, 2026
RepositoryTypeScript
microsoft/vscode

Visual Studio Code

194.3k
Oct 25, 2026
RepositoryTypeScript
n8n-io/n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

208.6k
Oct 25, 2026
RepositoryTypeScript
twentyhq/twenty

The open alternative to Salesforce, designed for AI.

59.7k
Oct 25, 2026
RepositoryTypeScript
brocoders/nestjs-boilerplate

NestJS boilerplate. Auth, TypeORM, Mongoose, Postgres, MongoDB, Mailing, I18N, Docker.

4.4k
Oct 20, 2026
RepositoryTypeScript
Denrox/nestjs-microservices-example

A working example of microservice architecture implementation using nestjs framework.

996
Oct 22, 2026
RepositoryTypeScript
andrechristikan/ack-nestjs-boilerplate

NestJS 12 boilerplate with JWT, OAuth (Google & Apple), TOTP/2FA, RBAC, and multi-workspace tenancy. Prisma on MongoDB, modular repository layer, native ESM. Production-ready.

701
Oct 16, 2026