Skip to content

Build invoice payment flow visualizer #139

@Kingsman-99

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

Complex invoices with multiple recipients and partial payments are hard to understand without a visual representation. This issue adds generateFlowDiagram(invoiceId) that returns a Mermaid diagram string representing the payment flow.

Technical Context

Involves a new src/flowVisualizer.ts. Fetch invoice and payments. Build a Mermaid flowchart LR diagram with nodes for creator, invoice, and each recipient. Edges show payment amounts. Completed flows shown in green, pending in yellow. generateFlowDiagram(invoiceId): Promise<string> returns the Mermaid string.

Acceptance Criteria

  • generateFlowDiagram(invoiceId: string): Promise<string> exported
  • Returns valid Mermaid flowchart LR syntax
  • Each recipient shown as a separate node
  • Payment amounts shown on edges
  • Test verifies output contains expected node and edge definitions
  • All existing tests pass
  • TypeScript strict mode — zero any types

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions