mbc-net/mbc-cqrs-serverless
45.9
Weak · 9 November 2026
30.6k
lines of production code
TypeScript
primary language
7
measurements over time
What this system is
Features
Add CQRS implementation and migration prompts to MCP server
The MCP server now exposes three new prompts to assist developers with the MBC CQRS Serverless framework: 'cqrs\_implementation\_guide' provides step-by-step instructions for generating modules, entities, and services; 'debug\_command\_error' helps troubleshoot command-related issues; and 'migration\_guide' offers advice on moving between framework versions. These prompts are registered via the new \prompts/index.ts\ entry point and implemented in \cqrs-guide.ts\.
packages/mcp-server/src/prompts · high confidence
Add Prisma integration and Cognito local patch to CLI templates
The CLI templates now include a new Prisma module for NestJS applications, providing a configurable PrismaService with support for global registration, async options factories, explicit connection pooling, and built-in query logging middleware. Additionally, a patch for the cognito-local package (v3.23.2) has been added to introduce a UserDisableException, ensuring that disabled users are properly rejected during authentication flows.
packages/cli/templates/infra-local/cognito-local/patches, packages/cli/templates/src/prisma · high confidence
Add Prisma template for DynamoDB and MySQL scaffolding
The CLI now includes a new Prisma template located in packages/cli/templates/prisma. This adds a schema.prisma file defining a MySQL datasource and a Sample model, alongside a ddb.ts script that handles DynamoDB table creation, CQRS table setup, and configuration of Time-to-Live (TTL) and Point-in-Time Recovery (PITR) backups for non-local environments. This enables users to scaffold projects with these specific database configurations.
packages/cli/templates/prisma · high confidence
Add S3 event handling support
The event system now supports processing Amazon S3 events. An S3 event handler has been added to the EventController, and the EventService includes a new method to process these events by transforming them via the DefaultEventFactory. Additionally, the factory now implements transformation logic for SNS, EventBridge, and S3 events, replacing previous 'not implemented' stubs, and filters out specific DynamoDB stream records based on the CommandSyncMode enum.
packages/core/src/events · high confidence
Add helper utilities for order sorting and primary key parsing
New helper functions have been added to the CLI templates to support data handling: \getOrderBy\ and \getOrderBys\ convert string-based sort specifications into Prisma-compatible sort objects, while \parsePk\ splits composite primary keys into their type and tenant code components using the core library's key separator.
packages/cli/templates/src/helpers · high confidence
Add local AppSync simulator template for CLI
The CLI now includes a new template for running a local AppSync simulator, providing a self-contained Docker environment (Node 18 Alpine) to test GraphQL APIs locally. This template bundles a sample schema with Message types, VTL mapping templates for a sendMessage mutation, and resolver configurations, allowing developers to spin up a local GraphQL endpoint without requiring AWS infrastructure.
packages/cli/templates/infra-local/appsync-simulator · high confidence
Add master example application
Introduces a new NestJS-based example application under examples/master that demonstrates the @mbc-cqrs-serverless/core framework. The example includes a MasterModule with a MasterController exposing REST endpoints for publishing commands and querying data (GET/POST on /api/master), entity definitions for commands and data, and a data sync handler for RDS. It is configured with a .env file for local AWS service endpoints (DynamoDB, S3, Cognito, etc.) and uses Prisma with a MySQL database, providing a complete runnable reference for the CQRS serverless pattern.
examples/master · high confidence
Add sample CQRS module with REST API and RDS sync
The CLI template now includes a complete sample module demonstrating a CQRS pattern backed by an RDS database. This adds a NestJS module (\SampleModule\) exposing a REST API (\/api/sample\) for publishing commands, retrieving command and data entities, listing data by partition key, and searching data. The implementation includes DTOs for validation, entities extending core CQRS types, a \SampleService\ for data access via Prisma, and a \SampleDataSyncRdsHandler\ that synchronizes command events to the relational database using upsert operations.
packages/cli/templates/src/sample · high confidence
Add seq example with master module and sequence integration
Introduces a new NestJS-based example application in the \examples/seq\ directory that demonstrates the \@mbc-cqrs-serverless/sequence\ module. The example includes a \MasterModule\ with a \MasterController\ exposing REST endpoints for publishing commands and querying data, which integrates with \SequencesService\ to generate sequence numbers for new master records. It also provides configuration files for local development (\.env\), NestJS CLI setup, and TypeScript compilation, along with a REPL entry point for interactive debugging.
examples/seq · high confidence
Add setting entity models for tenant configuration
Introduced SettingEntity and SettingListEntity classes in the tenant package to model tenant configuration data. SettingEntity defines the structure for individual settings with an ID and value, while SettingListEntity extends this to handle collections of settings, enabling the application to properly serialize and deserialize tenant setting lists.
packages/tenant/src/entities · high confidence
Add tenant and tenant-group DTOs for API validation and documentation
New Data Transfer Objects have been added to the tenant package to define input structures for creating and updating tenants and tenant groups. This includes CommonTenantCreateDto, TenantCreateDto, TenantUpdateDto, TenantGroupAddDto, and TenantGroupUpdateDto, all exported via a new index file. These DTOs enforce validation rules (e.g., required strings, optional objects) and provide Swagger API documentation metadata, enabling the backend to properly validate and document tenant-related API endpoints.
packages/tenant/src/dto · high confidence
Add tenant management REST API controller
Introduces the TenantController in the tenant package, exposing REST endpoints for managing tenants and their settings groups. Users can now retrieve, create, update, and soft-delete tenants via GET, POST, PATCH, and DELETE operations on /api/tenant, as well as add user groups and customize tenant setting groups via POST and PATCH on /api/tenant/group. The controller delegates to TenantService and includes a comprehensive test suite verifying controller-service integration and error handling for all endpoints.
packages/tenant/src/controllers · high confidence
Added AWS CDK infrastructure template for pipeline deployment
The \packages/cli/templates/infra\ directory now contains a complete AWS CDK TypeScript project template. This includes a \PipelineStack\ entry point that provisions CI/CD pipelines for the 'dev' environment, a GraphQL schema defining message operations with support for API Key, IAM, Cognito, and OIDC authentication, and configuration for code generation (cdk-graph) and unit testing (Jest). Users can now use this template to scaffold and deploy infrastructure stacks using the AWS CDK toolkit.
packages/cli/templates/infra · high confidence
Added SettingTypeEnum with lowercase 'common' value
The tenant package now includes a new \SettingTypeEnum\ enum defining four setting types: \TENANT\_COMMON\ (mapped to the lowercase string 'common'), \TENANT\, \TENANT\_GROUP\, and \TENANT\_USER\. The \TENANT\_COMMON\ value is specifically lowercase to ensure correct partition key generation (e.g., 'TENANT\#common') and backward compatibility. Comprehensive tests have been added to validate these enum values and their usage in partition keys.
packages/tenant/src/enums · high confidence
Added pre-commit linting hook
A new pre-commit hook has been added to the .husky directory. When a commit is made, this hook automatically runs \npx lint-staged\ to lint staged files before the commit is finalized, ensuring code quality standards are met at check-in.
.husky · high confidence
Expanded core interfaces for command service, data models, and notifications
The core interfaces package now exposes a richer set of types for building CQRS-based applications. The command service interface defines synchronous and asynchronous publish methods, including partial updates, and the command model now supports task tokens and sync modes for Step Functions workflows. Data models and entities have been updated to include soft-delete flags, sequence numbers, and TTL fields, with all DTOs and entities enhanced with Swagger decorators for improved API documentation. Additionally, the notification interface has been extended to support email attachments, reply-to addresses, and SES inline templates, while the event factory interface now handles S3 events.
packages/core/src/interfaces · high confidence
Initial CLI template scaffolding for serverless NestJS applications
The CLI now provides a new project template that scaffolds a serverless-ready NestJS application. This includes a main entry point configured as a serverless handler, a core module wiring up Prisma with environment-aware logging (verbose in local, errors only in production), a custom event factory, and a sample module. Additionally, the template includes utilities for generating Swagger API documentation and an interactive REPL for development.
packages/cli/templates/src · high confidence
Initial implementation of TenantService for multi-tenant management
The TenantService in the tenant package has been introduced to handle core multi-tenant operations, including creating common and individual tenants, updating and deleting tenants, and managing tenant groups and settings. This service implements the ITenantService interface and integrates with the CQRS core for command publishing and data access, supporting features like soft deletes and partition key management for tenant isolation.
packages/tenant/src/services · high confidence
Initial infrastructure template with CI/CD pipeline and distributed processing support
This change introduces the core infrastructure library for the CLI template, establishing the foundational AWS resources and deployment automation. It adds a comprehensive CDK stack (InfraStack) that provisions Cognito user pools with custom attributes, AppSync and HTTP APIs, SQS queues with dead-letter handling, and SNS topics for event routing. To support large-scale data processing, it includes a custom DistributedMap construct for AWS Step Functions, enabling batched reading from and writing to S3. The template also provides a build utility to optimize Lambda layers and a full CI/CD pipeline definition using AWS CodePipeline, which automates testing, CDK synthesis, and infrastructure deployment.
packages/cli/templates/infra/libs · high confidence
Initial project scaffolding with AI agent configuration and documentation
The repository is initialized with foundational configuration and documentation files. This includes \.aider.conf.yml\ and \.cursorrules\ to define coding conventions, architecture patterns (CQRS, NestJS, AWS), and tooling settings for AI assistants. Standard project files such as \README.md\, \CHANGELOG.md\, \CONTRIBUTING.md\, \FAQ.md\, \SECURITY.md\, and \TROUBLESHOOTING.md\ are added to guide users and contributors on setup, usage, and security practices.
(repo-wide) · high confidence
Introduce AppSync Events transport and unify notification transports
The notification system now supports a new AppSync Events transport alongside the existing AppSync GraphQL and Email transports. A new \AppSyncEventsService\ publishes notifications to an AppSync Events channel using IAM SigV4 authentication, constructing channel paths from the namespace, tenant, action, and notification ID. The existing \AppSyncService\ has been refactored to implement the \INotificationTransport\ interface, allowing both AppSync implementations to be managed uniformly. The \NotificationModule\ now registers and exports these services, enabling the application to route notifications through the configured transport.
packages/core/src/notifications · high confidence
Introduce MCP server for AI tool integration
Adds a new Model Context Protocol (MCP) server package that exposes resources, tools, and prompts to AI assistants. The server provides framework documentation, an error catalog, and project info as resources; code generation, validation, and analysis capabilities as tools; and CQRS implementation guides and debugging help as prompts. It runs via stdio and can be configured in environments like Claude Code by specifying the package command and an optional project path environment variable.
packages/mcp-server/src · high confidence
Introduce MCP server package for AI tool integration
The new \@mbc-cqrs-serverless/mcp-server\ package enables AI coding assistants (such as Claude Code and Cursor) to interact with the MBC CQRS Serverless framework via the Model Context Protocol. It exposes framework documentation as resources, provides tools for generating CQRS modules/controllers/services/entities/DTOs, validating implementations, analyzing project structure, and detecting 27 specific anti-patterns (AP001–AP027), and offers guided prompts for implementation and debugging. The package includes a CLI entry point, TypeScript source utilities for file system operations, and configuration instructions for MCP-compatible clients.
packages/mcp-server · high confidence
Introduce MCP server tools for code analysis, generation, and validation
The MCP server now exposes a suite of tools for interacting with MBC CQRS Serverless projects. Users can analyze project structure and CQRS patterns, check for anti-patterns (such as direct DynamoDB writes or hardcoded secrets), and validate CQRS implementation correctness. Additionally, new tools allow generating modules, controllers, services, entities, and DTOs via the MBC CLI, and provide capabilities to look up error messages in the catalog, perform health checks, and explain specific code sections.
packages/mcp-server/src/tools · high confidence
Introduce RolesGuard for tenant and role-based access control
A new RolesGuard has been added to enforce access control by validating both tenant context and user roles. The guard ensures that a tenant code is present for every request, allowing system administrators to override the tenant via headers while restricting regular users to their assigned tenant (unless accessing a common tenant). It also verifies that users possess the required roles defined by the @Roles() decorator, supporting both direct role matching and group-based role resolution.
packages/core/src/guard · high confidence
Introduce SQS support and refactor SNS client management in the core queue module
The core queue module now supports both Amazon SNS and Amazon SQS for message handling. A new SqsService has been added, providing methods to send single or batch messages, receive messages with configurable polling options (defaulting to MaxNumberOfMessages=10 and WaitTimeSeconds=0), and delete messages (single or batch). To support this, new SqsClientFactory and SnsClientFactory services were introduced to manage AWS SDK client instances via dependency injection, replacing the previous inline client creation in SnsService. The SnsService.publish method has been updated to accept an optional topic ARN, allowing callers to override the default topic configured in the environment, and now throws an error if no topic ARN is available. The QueueModule exports both SnsService and SqsService, making them available globally throughout the application.
packages/core/src/queue · high confidence
Introduce configurable Tenant module with optional controller and data sync integration
The new Tenant module in the tenant package allows applications to optionally enable a TenantController and register custom data synchronization handlers. When configured with \enableController: true\, the module exposes the TenantController; when \dataSyncHandlers\ are provided, they are passed to the core CommandModule to handle data synchronization for the tenant table. Additionally, an update script ensures the tenant table name is registered in the Prisma DynamoDB configuration file upon initialization.
packages/tenant/src · high confidence
Introduce data-setting and setting DTOs and entities in the ui-setting package
The ui-setting package now exposes structured Data Transfer Objects and domain entities for managing settings. The DTOs define validation schemas for creating, updating, searching, and commanding both generic 'setting' and 'data-setting' resources, including nested attribute definitions with field metadata (e.g., physical name, data type, constraints). Corresponding entities model the internal state for these resources, extending core command and data entities to support attributes and list aggregations, thereby providing the data contracts required for the UI setting feature.
packages/ui-setting/src/dto, packages/ui-setting/src/entities · high confidence
Introduce directory package for file system management
The new \packages/directory\ package provides a complete directory and file management system, exposing a NestJS controller at \/api/directory\ with endpoints for creating, updating, moving, copying, renaming, and deleting directories, as well as generating presigned URLs for S3 uploads and views. It includes a configurable \DirectoryStorageModule\ that supports custom DynamoDB table names and Prisma model names, integrates with the core CQRS and S3 services, and exposes services for directory data operations and file storage interactions.
packages/directory/src · high confidence
Introduce notification transport abstraction
The notification module now exposes a transport abstraction layer, allowing notifications to be sent via different underlying mechanisms. This change introduces the \NotificationTransports\ enum with \APPSYNC\_GRAPHQL\ and \APPSYNC\_EVENT\ options, alongside the \INotificationTransport\ interface and a \NotificationTransportMap\ type to manage transport implementations. This enables the system to decouple notification logic from specific delivery protocols, supporting flexible transport selection.
packages/core/src/notifications/enums, packages/core/src/notifications/interfaces · high confidence
Introduce sequence generation service with configurable rotation and formatting
The \packages/sequence\ package now provides a new service for generating formatted sequence numbers. Users can generate sequences that rotate based on time intervals (daily, monthly, yearly, or fiscal yearly) and apply custom formats with optional prefixes and postfixes. The service supports fetching configuration from master data or providing settings directly, handles fiscal year calculations with configurable start months, and exposes endpoints to retrieve current sequences and generate new ones.
packages/sequence/src · high confidence
Introduce survey template and answer management capabilities
This change adds the survey-template module, providing full CRUD operations for survey templates and the ability to create survey answers. It introduces new DTOs for template and answer attributes (including support for additional properties in templates), corresponding data entities, and NestJS controllers and services to handle API requests. The module also includes RDS data-sync handlers to persist survey templates and answers to the database via Prisma, along with comprehensive unit tests for the handlers, controllers, and services.
packages/survey-template/src · high confidence
Introduce synchronous command processing mode
The command service now supports a synchronous execution mode, allowing commands to be applied immediately without waiting for the asynchronous Step Functions pipeline. This is enabled by the new \CommandSyncMode.SYNC\ enum and is used by \publishSync\ to write the command table, update TTL, publish to history, and execute data handlers directly. The \Repository\ layer respects this by skipping the session-merge logic for synchronous writes, ensuring immediate consistency for the caller.
packages/core/src/commands · high confidence
Introduce task management module with Step Functions integration
This change adds a new task management module that supports both standard tasks and long-running Step Function tasks. It introduces entities for tasks and sub-tasks, along with event handlers for processing task queues and Step Function state machine events. The module includes a controller for creating and listing tasks, and integrates with AWS SQS and SNS for event-driven processing. Sub-tasks are managed within Step Function tasks, with status tracking and alarm publishing on failure.
packages/task/src · high confidence
Introduce tenant-specific constant definitions
Added a new constants module in the tenant package that exports standard identifiers for tenant system operations, including the 'TENANT' system prefix, the 'tenant' table name, the 'SETTING' prefix for tenant settings, and the 'MASTER' setting key. These constants provide a centralized source of truth for string literals used across the tenant feature.
packages/tenant/src/constants · high confidence
Introduce ui-setting package with configurable DynamoDB table and event handler aliasing
The new ui-setting package allows users to configure the DynamoDB table name used by the setting module (defaulting to 'master' to share with MasterModule) and controls whether the module registers its own CommandEventHandler alias. This configuration prevents duplicate-alias collisions when combined with MasterModule by softening the guard to a warning and allowing users to defer alias ownership via the registerEventHandlerAlias option, while also ensuring dataSyncHandlers are correctly applied.
packages/ui-setting/src · high confidence
New AppSync Events Client example application
Added a new Next.js-based example application in \examples/appsync-event-client\ that demonstrates real-time notification subscriptions using the AWS AppSync Events API. The app provides a bilingual (English/Japanese) interactive dashboard for connecting, disconnecting, and filtering subscriptions by tenant, action, and ID. It includes a unified subscription abstraction layer (\subscribe-events.ts\) that standardizes the client interface and handles channel path resolution and sanitization to match server-side CQRS conventions.
examples/appsync-event-client · high confidence
New CLI commands for scaffolding, code generation, and skill installation
The CLI now includes several new commands to streamline development workflows. The \new\ command scaffolds a new CQRS application, automatically fetching the latest \@mbc-cqrs-serverless/core\ version from npm, copying the project template, and initializing git and dependencies. The \generate\ command allows developers to create project elements (such as services, controllers, entities, DTOs, and modules) using schematics, with support for dry-run modes and schema options. Additionally, the \install-skills\ command installs Claude Code skills for MBC development, supporting both personal and project-specific installation directories, with version tracking and caching. The \ui\ command installs common UI components from a Git repository, handling authentication and dependency management. These commands are registered in the CLI's command loader and include comprehensive test coverage.
packages/cli/src · high confidence
New CLI schematics for generating NestJS modules, controllers, services, entities, and DTOs
The CLI now includes a new set of Angular DevKit schematics in \packages/cli/schematics\ that allow you to scaffold core NestJS components for the mbc-cqrs-serverless architecture. Running the \module\ schematic generates a complete module structure including an async or sync service, controller, and associated DTOs and entities, while dedicated \controller\, \service\, \entity\, and \dto\ schematics allow for generating individual parts. These generators produce files with standard CQRS patterns, including validation decorators, Prisma service integration (when schema is enabled), and unit test scaffolding.
packages/cli/schematics · high confidence
New ITenantService interface for tenant code management
A new ITenantService interface has been introduced in the tenant package to define the contract for managing tenant codes. This interface exposes methods for creating, retrieving, updating, and deleting tenant codes, as well as specific operations for creating common tenants, adding groups to tenants, and customizing setting groups. It relies on specific DTOs (such as TenantCreateDto, TenantUpdateDto, and TenantGroupAddDto) and CQRS models from the core package to handle data transfer and command execution.
packages/tenant/src/interfaces · high confidence
New authentication, role-based access, and context decorators
The core package introduces a suite of new decorators to enhance security and request handling. The \@Auth\ decorator now combines role requirements with a \RolesGuard\ and Swagger documentation, while the \@Roles\ decorator explicitly sets required roles for route access. A new \@HeaderTenant\ decorator enforces the \x-tenant-code\ header in API documentation. Additionally, the \@INVOKE\_CONTEXT\ param decorator allows controllers to access the current request context, and new class decorators (\@GroupRoleResolver\, \@NotificationTransport\) register specific application components for group-based role resolution and notification transport management.
packages/core/src/decorators · high confidence
New core helper utilities for serialization, object manipulation, and key parsing
This change introduces a suite of new helper functions in the core package to support data transformation and key management. It adds serializer helpers (\serializeToExternal\, \deserializeToInternal\) to convert between internal DynamoDB entity structures and external flat formats, and a \transformCommandToData\ function to map command models to data models while preserving creation metadata. Object utilities include \mergeDeep\ for deep merging, \objectBytes\ for calculating JSON byte size, and \pickKeys\/\omitKeys\ for property selection. Key management is enhanced with \generateId\, \parseTwoSegmentPkSkFromId\, and \getSortKeyVersion\ to handle composite IDs and versioned sort keys, alongside S3 URI parsing helpers. Additionally, a \toISOStringWithTimezone\ helper is added for precise datetime formatting, and the legacy \obj-byte\ helper is removed in favor of the new \objectBytes\ implementation.
packages/core/src/helpers · high confidence
New helper functions for UI setting key generation and parsing
The packages/ui-setting module now includes a new helpers/index.ts file that provides utility functions for generating and parsing partition keys (PK) and sort keys (SK) used in the underlying data storage. Users interacting with UI settings can rely on these standardized key formats, which include constants for master prefixes and functions to construct keys from tenant codes and setting codes, as well as parsers to extract components from existing keys.
packages/ui-setting/src/helpers · high confidence
New import module with CSV and ZIP processing capabilities
Introduces a new import module that supports both CSV and ZIP file imports. CSV imports are processed via AWS Step Functions with SQS-based row batching, while ZIP imports use a distributed map orchestrator. The module includes DTOs for creating imports, entity definitions for tracking import status and row counts, and event handlers for processing import events, status updates, and command notifications.
packages/import/src · high confidence
New infrastructure configuration templates for dev, staging, and prod environments
The CLI now includes a new set of infrastructure configuration templates under \packages/cli/templates/infra/config\. These files define the structure for environment-specific settings (dev, stg, prod) and introduce support for the AppSync Events API, including optional configuration for channel namespaces and API key expiration. The configuration schema also adds fields for notification transport selection (e.g., 'appsync-event' vs 'appsync-graphql') and ECS scaling parameters, allowing users to tailor their deployment environments with these new capabilities.
packages/cli/templates/infra/config · high confidence
New local development infrastructure template with configurable ports and Floci integration
The \infra-local\ template now provides a complete local development environment using Docker Compose, replacing the previous LocalStack-based setup with Floci (v1.6.0) for S3 and ElasticMQ for SQS. This change introduces configurable ports for all local services (Step Functions, Lambda, DynamoDB, SQS, SNS, Cognito, AppSync, etc.) via environment variables (e.g., \LOCAL\_SFN\_PORT\, \LOCAL\_COGNITO\_PORT\), allowing users to avoid port conflicts. The template includes a new \docker-compose.yml\ defining services for Step Functions Local, MySQL (RDS), DynamoDB Local, DynamoDB Admin, ElasticMQ, Floci, App Simulator, and Cognito Local. It also adds a \serverless.yml\ configuration with plugins for offline simulation of Lambda, SQS, SNS, Step Functions, and DynamoDB, along with a JWT authorizer configured to work with the local Cognito instance. A \swagger.json\ file is included to define the API endpoints. This enables developers to run a full local stack with minimal configuration, supporting features like CSV import processing and alarm notifications via SNS/SQS.
packages/cli/templates/infra-local · high confidence
New master data and settings management package
The \packages/master/src\ directory introduces a new package for managing master data and settings. It provides REST controllers for bulk upserts (\MasterBulkController\), individual data operations (\MasterDataController\), and comprehensive setting management (\MasterSettingController\). The package includes DTOs for bulk operations, data copying, and search, along with custom task handling for asynchronous master data copying via Step Functions. Tenant validation is enforced on bulk endpoints to ensure data isolation.
packages/master/src · high confidence
Behavioural changes
Configurable tenant and role constants with environment variable support
The core constants module now allows runtime configuration of tenant and role settings via environment variables. \DEFAULT\_COMMON\_TENANT\_CODES\ and \DEFAULT\_CROSS\_TENANT\_ROLES\ can be customized using \COMMON\_TENANT\_CODES\ and \CROSS\_TENANT\_ROLES\ respectively, supporting comma-separated lists with whitespace trimming and empty value filtering. The legacy \TENANT\_COMMON\ constant is deprecated in favor of the new array-based constants and will be removed in v1.2.0. Additionally, new version constants \VERSION\_LATEST\ (-1) and \VERSION\_FIRST\ (0) are introduced in the key constants file, and the \Role\ enum is replaced with a single \ROLE\_SYSTEM\_ADMIN\ constant.
packages/core/src/constants · high confidence
Core framework enhancements: Node.js 24 compatibility, group-based roles, and notification transport flexibility
The core package now supports Node.js 24 by removing the callback parameter from the Lambda handler signature, ensuring compatibility with modern runtime requirements. Authorization has been enhanced with a new group-based role system, introducing a \GroupRoleResolverRegistry\ and \AuthzBootstrapService\ to manage role resolution dynamically. Notification capabilities are more flexible, allowing users to configure multiple transports (such as AppSync GraphQL and AppSync Events) via the \NOTIFICATION\_TRANSPORTS\ environment variable, with corresponding validation for required endpoints. Additionally, the framework now supports configurable request body size limits via \REQUEST\_BODY\_SIZE\_LIMIT\, adds a global tenant code parameter to Swagger documentation, and migrates the deprecated \COGNITO\_USER\_POLL\_CLIENT\_ID\ environment variable to \COGNITO\_USER\_POOL\_CLIENT\_ID\.
packages/core/src · high confidence
Explorer service deduplicates data sync handlers and adds group role resolver discovery
The ExplorerService now deduplicates DataSyncHandler registrations to prevent duplicate execution when the same handler is registered across multiple modules. It also introduces new capabilities to explore GroupRoleResolvers and NotificationTransports, and includes a helper to count duplicate CommandEventHandler aliases to detect module misconfigurations. Additionally, the RequestLogger service has been updated to use a new context extraction helper and improved Lambda environment detection.
packages/core/src/services · high confidence
Improved Step Functions error handling and execution naming in data sync
The data sync command event handler now generates more descriptive and safe execution names for AWS Step Functions by incorporating DynamoDB partition/sort keys and sanitizing special characters, which improves traceability. Additionally, the handler's error handling for missing state machines has been refined: it now only silently logs a warning and skips execution when running locally (detected via the \IS\_OFFLINE\ environment variable), whereas in production environments, a \StateMachineDoesNotExist\ error is re-thrown to ensure failures are surfaced rather than silently swallowed. The module also exports a new \SET\_TTL\_COMMAND\ state name and adds a method to retrieve full command records from S3 when needed.
packages/core/src/command-events · high confidence
Introduce read-your-writes session tracking and improve DynamoDB/S3 service reliability
The data-store module now includes a new SessionService that tracks async command versions in a dedicated DynamoDB table, enabling read-your-write consistency for users by allowing the system to wait for data propagation. This service is configurable via the RYW\_SESSION\_TTL\_MINUTES environment variable and is automatically registered in the global DataStoreModule. Under the hood, the DynamoDB service has been enhanced with a new deleteItem method, support for consistent reads on getItem, and a corrected listItemsByPk query (fixing a typo in the sort key expression). Additionally, large attributes are now stored in S3 with a structured path (ddb/{table}/{pk}/{sk}/{ulid}.json), and S3 operations now use path-style addressing for better compatibility. Date serialization has been updated to include timezone information, and the S3 service now returns the bucket and key metadata upon upload.
packages/core/src/data-store · high confidence
Notification system now supports multiple configurable transport backends
The notification event handler has been refactored to replace the single AppSync dependency with a pluggable transport architecture. It now discovers and activates multiple notification transports (such as AppSync, SQS, or custom implementations) based on the \NOTIFICATION\_TRANSPORTS\ configuration setting. When a notification event is received, the system broadcasts the message to all currently active transports simultaneously, allowing for flexible multi-channel delivery without hardcoding a single backend.
packages/core/src/notifications/event · high confidence
Refactored user context extraction with case-insensitive tenant normalization and group-based roles
The user context extraction logic in packages/core/src/context has been rewritten to support group-based roles and ensure consistent tenant identification. Tenant codes are now normalized to lowercase for case-insensitive matching, allowing legacy uppercase or mixed-case tenant identifiers to work seamlessly without breaking access. The system now parses 'custom:groups' from JWT claims to determine tenant-specific group memberships alongside direct roles. Additionally, malformed JWT tokens are handled gracefully during context extraction, and the security validation for header-based tenant overrides has been moved to the RolesGuard to allow for more flexible authorization policies.
packages/core/src/context · high confidence
Scaffolded projects now include isolated local development configuration and tooling
Newly generated projects now come with a comprehensive set of configuration files to streamline local development. A new \.env.local\ file provides pre-configured, isolated ports for local services (such as Serverless Offline, DynamoDB Local, Floci, and Cognito) and sets a safe \ATTRIBUTE\_LIMIT\_SIZE\ to prevent Step Functions payload errors. The template also includes a \.dockerignore\ to optimize Docker builds, a \Dockerfile\ for containerized execution, and standard development tooling configurations including ESLint, Prettier, Jest, and TypeScript settings. Additionally, a \gitignore\ file is now included to prevent committing sensitive environment variables and build artifacts.
packages/cli/templates · high confidence
StepFunctionService adds execution name validation and task resume capability
The StepFunctionService now accepts an optional name parameter for startExecution, automatically truncating names longer than 80 characters to undefined to comply with AWS Step Functions limits. A new resumeExecution method has been added to send task success results via SendTaskSuccessCommand, wrapping the output in a Payload array and logging failures at the debug level to avoid noisy error reports for expected race conditions.
packages/core/src/step-func · high confidence
Fixes
7 commits (4 fixes) fixing examples/command-admission
A fix in examples/command-admission — 7 commits (4 fixs), 16 files: “fix(core): classify command admission transaction failures”; “test(core): restore admission test mocks when an assertion fails”; “fix(core): keep every field but attributes in the example migration”; and 4 more.
examples/command-admission · medium confidence · unverified
Configurable port and JWT issuer alignment for local Cognito
The local Cognito template now supports setting the listening port via the LOCAL\_COGNITO\_PORT environment variable. To prevent JWT issuer mismatches when using non-default ports or Docker port mapping, the startup script automatically updates the IssuerDomain in the configuration to match the active port, ensuring the emitted JWT 'iss' claim remains consistent with the serverless authorizer's expected issuer URL.
packages/cli/templates/infra-local/cognito-local · high confidence
Fix local startup scripts for Windows and Step Functions registration
The local infrastructure scripts (resources.ps1/sh and trigger\_ddb\_stream.ps1/sh) now correctly configure S3 CORS rules on Windows by writing the configuration file without a Byte Order Mark (BOM), preventing AWS CLI parsing errors. Additionally, the Step Functions registration logic has been hardened to wait for the local service to be ready before attempting to register state machines, and it now treats 'StateMachineAlreadyExists' as a success to avoid failing the startup flow when the serverless plugin has already registered the machines.
packages/cli/templates/infra-local/scripts · high confidence
Test coverage
1 commit adding/updating tests in packages/core/src/filters; 11 commits adding/updating tests in packages/mcp-server/src/\_\tests\\_; Add unit tests for DataSetting and Setting controllers; Added CLI template files for API testing; Added DynamoDB test infrastructure scripts and configuration; Added end-to-end tests for core publishing, DynamoDB, and S3 workflows; Added integration tests for API snapshots and tenant isolation; Added integration tests for AWS SDK and core library contracts; Added integration tests for MCP SDK and Zod schema validation; Added local AppSync simulator for testing; Added local test infrastructure and testing endpoints; Added local test infrastructure scripts for DynamoDB and Serverless Offline; Added snapshot and IAM scoping tests for the infrastructure template; Added snapshot tests for the CDK infrastructure stack; Added tests for service configuration and environment variable handling; New shared integration test utilities for AWS mocking and error handling.
Dependencies
Add new example projects and update scaffolding templates
Added two new example projects, \appsync-event-client\ (a Next.js app) and \mbc-cqrs-serverless-example-master\, along with a \mbc-cqrs-serverless-example-seq\ example. Updated the CLI scaffolding templates to include these new examples and applied security overrides to lock down vulnerable dependencies like \uuid\, \lodash\, \multer\, and \express\ across the generated projects and local infrastructure simulators.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 43 → 46 (+3.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 55 → 55 (-0.1)
- Architecture 68 → 68 (-0.1)
- Maturity 50 → 80 (+30.2)
- Readiness 29 → 30 (+0.8)
- Security 67 → 66 (-1.6)
- Performance 60 → 60 (+0.0)
Resolved (40)
- ClassTooLong: InfraStack (packages/cli/templates/infra/libs/infra-stack.ts)
- Confusingly similar operations with different signatures and likely different intents. DataService.publish takes a CommandModel. CommandService.publishItem takes a DetailKey. CommandService.publishSync takes a CommandInputModel. It is unclear why there are three different 'publish' entry points with different input types. publishItem returning any is also inconsistent with the typed returns of publishSync.
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Cross-context type RotateByEnum (sequence → master) (packages/master/src/helpers/index.ts)
- Cross-context type RotateByEnum (sequence → master) (packages/master/src/templates/master/helpers/id.ts)
- Disclosure policy has no reporting contact
- FileTooLong: libs/infra-stack.ts (packages/cli/templates/infra/libs/infra-stack.ts)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- High CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- High CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- High CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- High CVE: [GHSA redacted] (package-lock.json)
- InfraStack.constructor (cognitive 21) (packages/cli/templates/infra/libs/infra-stack.ts)
- …and 20 more
New (128)
- ClassTooLong: DynamoDbService (packages/core/src/data-store/dynamodb.service.ts)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/infra-local/appsync-simulator/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/infra-local/cognito-local/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Critical CVE: [GHSA redacted] (packages/cli/templates/package-lock.json)
- Disclosure policy has no reporting contact (SECURITY.md)
- DynamoDbService.validateAdmissionConditions (cognitive 20) (packages/core/src/data-store/dynamodb.service.ts)
- DynamoDbService.validateAdmissionConditions (cyclomatic 22) (packages/core/src/data-store/dynamodb.service.ts)
- Flaky test: the repository rootpackages/master/src/integration/ulid.spec.ts::ulid Integration Tests Performance Characteristics should generate ULIDs quickly
- High CVE: [GHSA redacted] (packages/cli/templates/infra-local/appsync-simulator/package-lock.json)
- High CVE: [GHSA redacted] (packages/cli/templates/infra-local/cognito-local/package-lock.json)
- …and 108 more
Changes since last survey
- 28 commits — 15 feature/other, 13 fixes
By area
- packages/cli — 7 commits
- examples/command-admission — 6 commits
- (root) — 5 commits
- (repo) — 4 commits
- packages/core — 4 commits
- docs/development — 1 commit
- packages/mcp-server — 1 commit
Notable commits
- fix: Merge pull request #512 from baquan1708/fix/node2shell-node22-runtime
- fix: fix(cli): install openssl in the bookworm template image for Prisma
- fix: fix(cli): move scaffold templates and CI to patched Node 22 runtime
- fix: fix(core): align admission E2E with CI DynamoDB endpoint
- fix: fix(core): check every command when the example data row has expired
- fix: fix(core): classify command admission transaction failures
- fix: fix(core): keep every field but attributes in the example migration
- fix: fix(core): keep seq on command admission example updates
- fix: fix(deps): clear high/critical advisories in production dependencies
- fix: fix(release): address v1.6.0 review findings
- fix: fix(release): keep qs on 6.16.x and check the template lockfile
- fix: fix(release): restore the caret qs override and tighten the review checks
- fix: test(cli): run usePackageVersion spec in a temp dir to fix a flaky race
- change: Merge pull request #513 from mbc-net/chore/v160-release-prep
- change: Merge pull request #515 from mbc-net/feature/command-admission-conditions
- change: Merge pull request #516 from mbc-net/chore/v170-release-prep
- change: chore(release): date the v1.7.0 changelog
- change: chore(release): prepare v1.6.0
- change: chore(release): prepare v1.7.0
- change: docs(changelog): date the 1.6.0 release (2026-11-03)
- …and 8 more
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
mbc-net/mbc-cqrs-serverless was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit a7e8d55892358e31dc74ff81f826418ee4357a06 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.