Conversation
|
This is just an example how UML documentation with Mermaid could look like. |
|
Without warranty. |
|
Thanks @Morpheus1w3 for sharing these diagrams. Looks okay (but I did check now all properties and relations). I am not sure though about adding another artifact to the repository that needs additional maintenance. I think new users will just use tools like Claude Code or Codex and ask questions about the code base. That allows new users to ask questions about the code. (and the tools quickly understand all the dirty hacks of the past 10 years and can reason on them as well). For example, I just asked Claude code to generate one with the most important classes. First it created a diagram for the PDF importer (it still was in my context) and then for the "model" classes. Isn't that more convenient for new users? |
|
Somehow in the commit diff, I can't make it work. But in the comment sections it seems to work: classDiagram
direction TB
class InvestmentVehicle {
<<interface>>
}
class TransactionOwner~T~ {
<<interface>>
}
class Annotated {
<<interface>>
}
class Adaptable {
<<interface>>
}
class Attributable {
<<interface>>
}
class Security {
uuid : String
name : String
currencyCode : String
}
class Account {
uuid : String
name : String
currencyCode : String
}
class Portfolio {
uuid : String
name : String
referenceAccount : Account
}
class Transaction {
<<abstract>>
uuid : String
date : LocalDateTime
currencyCode : String
amount : long
shares : long
note : String
source : String
updatedAt : Instant
}
class AccountTransaction {
type : Type
exDate : LocalDateTime
}
class PortfolioTransaction {
type : Type
}
class CrossEntry {
<<interface>>
}
class BuySellEntry
class AccountTransferEntry
class PortfolioTransferEntry
class Unit {
type : Type
amount : Money
forex : Money
exchangeRate : BigDecimal
}
class Money {
currencyCode : String
amount : long
}
Account ..|> TransactionOwner~AccountTransaction~
Portfolio ..|> TransactionOwner~PortfolioTransaction~
Security ..|> InvestmentVehicle
Account ..|> InvestmentVehicle
Account ..|> Attributable
Portfolio ..|> Attributable
Transaction ..|> Annotated
Transaction ..|> Adaptable
Transaction <|-- AccountTransaction
Transaction <|-- PortfolioTransaction
Account "1" o-- "*" AccountTransaction : transactions
Portfolio "1" o-- "*" PortfolioTransaction : transactions
Transaction "*" --> "0..1" Security : security
Transaction "*" --> "0..1" CrossEntry : crossEntry
Transaction "1" o-- "*" Unit : units
Unit --> "1" Money : amount
Unit --> "0..1" Money : forex
CrossEntry <|.. BuySellEntry
CrossEntry <|.. AccountTransferEntry
CrossEntry <|.. PortfolioTransferEntry
BuySellEntry "1" --> "1" Portfolio : portfolio
BuySellEntry "1" --> "1" PortfolioTransaction : portfolioTransaction
BuySellEntry "1" --> "1" Account : account
BuySellEntry "1" --> "1" AccountTransaction : accountTransaction
AccountTransferEntry "1" --> "1" Account : accountFrom
AccountTransferEntry "1" --> "1" AccountTransaction : transactionFrom
AccountTransferEntry "1" --> "1" Account : accountTo
AccountTransferEntry "1" --> "1" AccountTransaction : transactionTo
PortfolioTransferEntry "1" --> "1" Portfolio : portfolioFrom
PortfolioTransferEntry "1" --> "1" PortfolioTransaction : transactionFrom
PortfolioTransferEntry "1" --> "1" Portfolio : portfolioTo
PortfolioTransferEntry "1" --> "1" PortfolioTransaction : transactionTo
|
|
(I am warming up the idea - just saying) |
|
Inside Eclipse I use Previewer from the Eclipse Marketplace. During coding the diagram in text it shows immediatly the drawing. |
|
I think it should be sufficient the document just the main packages with the main classes. Also not all the attributes and all the methods must be covered. To sketch the main classes with their associations should be okay. |
I use the rich diff, and this shows then the diagram. |
|
https://deepwiki.com/portfolio-performance/portfolio Deep Wiki has also generated class diagrams |


Closes #5603