![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
js-cqrs-es-domain-module
Advanced tools
Readme
This is an example domain module to help describe implementation guidelines when leveraging the js-cqrs-es library. This is developed in parallel to prove the Hive Pattern theory. It is the structure that the Hive Stack Components are built upon.
The structure of the domain module is defined below. This is the general structure that the Producer, Consumer, and Stream Processor services follow by default. Again, this is a suggested structure to keep domain logic separate from application/infrastructure logic because it makes the code far more portable than it would have otherwise been. This is fine for smaller domain models. To manage complex domain models, see the advanced use cases below.
module
|- projection
| |- denormalizer
| | `- Denormalizers
| `- store
| `- Mongoose Schemas
`- domain
|- schema
| `- Schemas
|- model
| |- Entities
| `- Value Objects
`- aggregate
`- Aggregate namespaces { class, commands, events, handlers }
For larger domain models, an even greater degree of separation with multiple domain modules is strongly recommended. Teams will maintain their own domain modules in their area of responsibility for the overall domain model.
Another strong recommendation is to separate the domain module into multiple modules to manage dependencies and portability better. Commands should be put in their own module so that they can be reused in the UI layer. Projections should also be split out into their own module as well because of the extra DB dependencies. Here is an example of how these multiple modules could be defined:
commands-module
|- Commands
|
`- dependencies
`- js-cqrs-es
domain-module
|- Schemas
|- Entities
|- Value Objects
|- Aggregate namespaces { class, events, handlers }
|
|- dependencies
`- commands-module
projections-module
|- Denormalizers
|- Projections
|
`- dependencies
|- domain-module
`- odm-framework
The example provided here is an attempt to showcase as much of the features of the js-cqrs-es framework as possible. It is a contrived representation of a Twitter Tweet Content aggregate and an analytics View value object to track views over time. The data is denormalized on the Consumer side to represent the complete Post and tracks the number of Views each Post has received. This is also the default domain module applied to the Hive Stack for testing implementation details. I've provided a diagram for the domain model below.
FAQs
An example domain module to help describe implementation guidelines when leveraging js-cqrs-es.
The npm package js-cqrs-es-domain-module receives a total of 0 weekly downloads. As such, js-cqrs-es-domain-module popularity was classified as not popular.
We found that js-cqrs-es-domain-module demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.