hashgraph / hashgraph/guardian
UML activity diagram generation
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 186
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 116
Description
### Problem description
At present, Guardian does not provide a way to automatically generate a UML activity diagram representing the workflow of a configured policy. Users must manually diagram policy logic, which is error‑prone and time‑consuming.
Slack communication link: https://envision-blockchain.slack.com/archives/C02HR6ML1AA/p1751471428203639
### Requirements
**Diagram Extraction**
- Parse the configured policy definition and its decision nodes, actions, transitions, and guard conditions.
**UML Activity Diagram Generation**
- Use a standard UML notation (Activity, Decision, Merge, Fork, Join, End) to represent policy flow.
- Generate a .svg or .png file that can be downloaded or embedded.
**Integration Point**
- Trigger generation automatically once a policy is saved or via an explicit “Generate Diagram” button in the policy UI.
**Performance & Scaling**
- Ensure diagram generation completes within acceptable time (<5 sec) for large policies.
**Error Handling**
- Provide clear feedback if the policy contains unsupported constructs or if generation fails.
-
### Definition of done
Users can click “Generate Diagram” (or it runs automatically on save) and receive a valid UML activity diagram file.
Diagrams accurately reflect the policy’s nodes, branching, and workflow.
Generated diagrams render correctly in all major browsers.
CI pipeline includes a smoke test for diagram generation on a sample policy.
Documentation is updated to describe the new feature and any configuration flags.
### Acceptance criteria
Policy UI displays a “Generate UML Diagram” action once a policy is configured.
Contributor guide
Research direction
Start by locating the policy UI and the configured policy definition, then trace how decision nodes, actions, transitions, and guards are represented and saved. Review the existing CI tests and sample policy before choosing an approach for UML generation. Done means the UI action produces a valid downloadable or embeddable diagram, handles unsupported constructs clearly, and has a smoke test and documentation updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100