Skip to content

docs: add mermaid diagrams#46

Merged
valter-silva-au merged 1 commit into
mainfrom
docs/mermaid-diagrams-20260607
Jun 7, 2026
Merged

docs: add mermaid diagrams#46
valter-silva-au merged 1 commit into
mainfrom
docs/mermaid-diagrams-20260607

Conversation

@valter-silva-au

Copy link
Copy Markdown
Contributor

What

Adds Mermaid diagrams to the TECLI documentation. GitHub renders ```mermaid fenced blocks natively, so these appear inline on the rendered pages.

Diagrams added

  • ARCHITECTURE.md — component/dependency diagram (Components section): shows the one-directional dependency flow cobra/cmd -> cobra/controller -> cobra/aid / cobra/dao / cobra/view -> hashicorp/go-tfe -> Terraform Cloud/Enterprise API, with credentials.yaml (under os.UserConfigDir()) and TFC_* environment variables feeding token/organization resolution.
  • ARCHITECTURE.md — sequence diagram (Data flow section): traces tecli workspace create through cmd -> controller (PreRunE validation, RunE) -> dao (token/org, env-first) -> aid (TFE client, options) -> go-tfe -> the TFC API and back to the printed JSON.
  • README.md — overview flow diagram (Architecture section): high-level request flow from the user/CI pipeline through credential resolution, the go-tfe client, the TFC API, and the JSON response on stdout.

The diagrams reflect the actual code structure (verified against main.go, cobra/cmd, cobra/controller, cobra/aid, cobra/dao, and go.mod); no layers were invented.

Validation

All mermaid diagrams validated locally with mermaid-cli.

Safety

Compliance files not modified.
No branch protections or settings changed.

Add accurate Mermaid diagrams that GitHub renders natively:

- ARCHITECTURE.md: component/dependency diagram (cmd -> controller
  -> aid/dao/view -> go-tfe -> TFC API, with credentials.yaml and
  TFC_* env vars feeding token/org resolution) and a sequence diagram
  for `tecli workspace create`.
- README.md: high-level request-flow overview diagram.

All mermaid diagrams validated locally with mermaid-cli (3 blocks, 0 failures).
@valter-silva-au
valter-silva-au merged commit 2a0faee into main Jun 7, 2026
4 checks passed
@valter-silva-au
valter-silva-au deleted the docs/mermaid-diagrams-20260607 branch June 7, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant