We have Jira/TAPD for Project Management, we have Github/Gitlab/BitBucket for Code Hosting, that is, we have multiple Platforms for a certain type of problem. So, how can we calculate metrics across different Platforms?
For example, some users may use Jira as their Project Management platform, the others might opt for TAPD, if we were to implement a Requirement Count metrics for all users, should we implement 2 charts for Jira and TAPD independently? It's too impractical to begin with.
Domain Layer is designed to solve the problem by offering a set of Platform Independent Entities, Devlake divides all platforms into three categories: Project Management / Code Hosting / Devops, by abstracting common properties from different platforms, we can define a set of Domain Entities for each category.
The following rules make sure Domain Layer Entities serve its purpose
Id with type string describe its origin record in format <Plugin>:<Entity>:<PK0>:<PK1>, because:AutoIncremental Integer or uuidcomposite primary keysAutoIncremental Integer or uuid)Id accordinglySample code:
type Issue struct { Id string `gorm:"primaryKey"` BoardId string `gorm:"index"` ... } issue := Issue { Id: "jira:JiraIssues:1:10", BoardId: "jira:JiraBoard:1:10" ... }