Logo
NeoArc Studio

Groups and Subdomains

Organise entities into logical groups representing subdomains, bounded contexts, or categories, with convex hull rendering and group-aware physics.

Groups organise entities into logical clusters that represent subdomains, bounded contexts, or architectural categories. They provide both visual organisation (coloured hull backgrounds on the canvas) and physical organisation (group-aware force simulation that keeps related entities together). Groups are stored in the model's groups array and propagate to derived views.

Group Structure

Each group in the model is a GraphGroup with the following fields.

FieldTypeDescription
idstringUnique identifier (UUID) for the group
namestringDisplay name for the group (e.g., "Order Management", "Identity")
nodeIdsstring[]Array of entity node IDs belonging to this group
colorstringDisplay colour as a CSS colour value (e.g., "#3b82f6")
descriptionstringOptional description of the group's purpose or scope

Group Features

Convex Hull Rendering
Groups are rendered as coloured convex hull backgrounds behind their member nodes. The hull shape adapts as nodes move, always enclosing all group members.
Zoom-aware Opacity
Hull backgrounds adjust their opacity based on the current zoom level. At wider zoom levels the hulls are more prominent, at closer zoom they fade to avoid obscuring detail.
Counter-scaled Labels
Group name labels maintain a consistent screen-space size regardless of zoom. The label text is counter-scaled against the current transform so it remains readable at any zoom level.
Group Clustering Force
The force simulation applies a custom forceGroupClustering function that pulls members of the same group together and pushes different groups apart, creating natural spatial separation.
Focus on Group
Click a group in the groups panel to focus the camera on that group's entities. The viewport animates to fit all member nodes, providing a quick way to navigate large models.
Batch Operations
Assign or remove multiple entities from a group in a single operation. Multi-select entities on the canvas, then use the groups panel to batch-assign them to the target group.

Working with Groups

Group-aware Physics

The force simulation uses a custom forceGroupClustering function that modifies node velocities each tick. For every node that belongs to a group, the function calculates the group centroid (the average position of all member nodes) and applies a gentle pull toward it. Nodes in different groups experience a repulsive force, encouraging spatial separation between domains.

// Simplified view of group clustering force registration
if (groups && groups.length > 0) {
  simulation.force('groupCluster', forceGroupClustering(groups));
}

// Per-node centre strength is reduced for grouped nodes,
// since the group clustering force handles their positioning.

Groups in Derived Views

Groups propagate from the model to derived views. Each view type handles groups differently.

Modelling Patterns

Groups map naturally to several architectural patterns.

PatternGroup UsageExample
Domain-driven designOne group per bounded contextOrder Management, Customer Identity, Inventory
Microservice boundariesOne group per servicePayment Service, Notification Service, Catalogue Service
Data domainsOne group per data domainTransactional Data, Reference Data, Analytical Data
Security zonesOne group per trust boundaryPublic API, Internal Services, Data Lake
Deployment regionsOne group per deployment unitEU Region, US Region, APAC Region