mbc-generate

Generate MBC CQRS Serverless boilerplate code for new entity modules.

29|5|Updated Dec 21, 2023
One-click install
npx skills add https://github.com/mbc-net/mbc-cqrs-serverless --skill mbc-generate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mbc-generate
Source: https://github.com/mbc-net/mbc-cqrs-serverless/tree/main/packages/mcp-server/skills/mbc-generate
Command: npx skills add https://github.com/mbc-net/mbc-cqrs-serverless --skill mbc-generate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes the repetitive setup work required to scaffold consistent modules, controllers, services, DTOs, and data sync handlers in the MBC CQRS Serverless framework.

Core Features & Use Cases

  • Boilerplate module scaffolding: Creates NestJS module templates wired to CommandModule with DataSyncHandler registration for your entity.
  • REST controller + service generation: Produces CRUD-style endpoints and service methods that publish commands and read data using the framework’s patterns and tenant-aware context.
  • DTO and handler templates: Generates create/update/search DTOs plus RDS data synchronization handlers (and optional templates for events, notifications, ES sync, GraphQL, advanced queries).

Use case: When starting a new SaaS domain (e.g., Orders), you can scaffold the entire CRUD surface and the RDS synchronization handler so you can focus on business logic instead of wiring.

Quick Start

Ask the AI: “Generate an Order module with RDS synchronization and REST CRUD endpoints using the MBC CQRS Serverless framework.”

Frequently Asked Questions about mbc-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a NestJS CQRS module with DynamoDB to RDS synchronization?

To scaffold a NestJS CQRS module with DynamoDB to RDS synchronization, generate an entity boilerplate that includes a DataSyncHandler registered in the CommandModule. This produces CRUD endpoints, services, DTOs, and RDS data synchronization handlers for DynamoDB-RDS consistency.

What is the best way to generate boilerplate code for a multitenant serverless entity?

Generating boilerplate for a multitenant serverless entity involves creating NestJS module templates wired to use tenant-aware context. The generated code applies framework utilities like getUserContext and publishAsync to ensure correct command publishing and event-sourced behavior across tenant domains.

How does DynamoDB Streams to RDS data synchronization work in a serverless CQRS setup?

DynamoDB Streams to RDS data synchronization in a serverless CQRS setup works by registering a DataSyncHandler in the CommandModule. This handler processes stream events and applies RDS synchronization to maintain data consistency between DynamoDB and your relational database.

Can I generate CRUD endpoints and command publishing logic for a new SaaS domain automatically?

Yes, you can generate CRUD endpoints and command publishing logic for a new SaaS domain automatically. The scaffolding process produces REST controllers and service methods that publish commands using framework utilities like publishAsync and generateId for correct event-sourced behavior.

Do I need to manually wire DataSyncHandler and DTOs when scaffolding a CQRS module?

No, you do not need to manually wire DataSyncHandler and DTOs when scaffolding a CQRS module. The generation process automatically creates create, update, and search DTOs, and registers the DataSyncHandler in the CommandModule following required file and class naming conventions.

What are the limitations of generating serverless boilerplate for advanced queries and GraphQL?

For advanced queries and GraphQL, serverless boilerplate generation provides optional templates rather than fully implemented solutions. The core scaffolding focuses on standard CRUD surfaces, command publishing, and RDS synchronization, meaning complex query logic requires manual implementation after generation.