Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,19 @@ jobs:
## What's new in v${{ steps.version.outputs.tag }}

### threescale-visualize
- **`--canvas`** — generate an interactive Cursor IDE topology canvas (`.canvas.tsx`) from any export: charts, product→backend graph, sortable product table with policy chains.
- Improved auth inference from toolbox YAML and legacy proxy fields.
- Parses `backend_usages.json` in both wrapped and top-level array formats.
- **`--html`** — self-contained browser topology dashboard (`topology.html`): stats, Chart.js charts, product→backend graph, sortable product table with policy chains. No Cursor required.
- **`products-catalog.md`** — consolidated Markdown table (auth, backends, apps, policies) linked from `index.md`.
- Shared **`BuildTopologyData`** payload for canvas, catalog, and HTML (replaces internal canvas-only builder).
- Demo HTML: [docs/examples/topology-demo.html](https://github.com/${{ github.repository }}/blob/main/docs/examples/topology-demo.html).

### threescale-export
- **Extended `--redact-secrets`** — redacts `provider_verification_key`, `client_id`, `app_id`; strips embedded credentials from OIDC issuer URLs; fails export if cleartext remains after redaction.
- **`--strict`** — fail when product sidecars cannot be fetched.
- Export manifest warnings for skipped sidecars.
### threescale-export / threescale-seed
- No changes in this release (same binaries as v0.2.0).

See [docs/VISUALIZE.md](https://github.com/${{ github.repository }}/blob/main/docs/VISUALIZE.md) and the [README Redaction section](https://github.com/${{ github.repository }}/blob/main/README.md#redaction).
See [docs/VISUALIZE.md](https://github.com/${{ github.repository }}/blob/main/docs/VISUALIZE.md).

---

## Download (clients)
## Download

### 1. Export a tenant

Expand All @@ -106,20 +105,24 @@ jobs:
tar xzf threescale-visualize-v${{ steps.version.outputs.tag }}-linux-amd64.tar.gz
chmod +x threescale-visualize

# Markdown report
# Markdown report + product catalog
./threescale-visualize ./export -o ./report

# Report + HTML topology dashboard (open topology.html in a browser)
./threescale-visualize ./export -o ./report --html

# Report + Cursor topology canvas
./threescale-visualize ./export -o ./report --canvas ./topology.canvas.tsx
```

Copy `topology.canvas.tsx` to `~/.cursor/projects/<workspace>/canvases/` and open it in Cursor. Full guide: [docs/VISUALIZE.md](https://github.com/${{ github.repository }}/blob/main/docs/VISUALIZE.md).
Full guide: [docs/VISUALIZE.md](https://github.com/${{ github.repository }}/blob/main/docs/VISUALIZE.md).

## Lab / demo (optional)

- `threescale-seed-v${{ steps.version.outputs.tag }}-linux-amd64.tar.gz` — [docs/SEED.md](https://github.com/${{ github.repository }}/blob/main/docs/SEED.md)
- `export-minimal-1.0.tar.gz` — offline fixture; [testdata/README.md](https://github.com/${{ github.repository }}/blob/main/testdata/README.md)
- Demo canvas: [docs/examples/topology-demo.canvas.tsx](https://github.com/${{ github.repository }}/blob/main/docs/examples/topology-demo.canvas.tsx)
- Demo HTML: [docs/examples/topology-demo.html](https://github.com/${{ github.repository }}/blob/main/docs/examples/topology-demo.html)

## Verification

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ chmod +x threescale-visualize
./threescale-visualize ./export -o ./report
```

See **[docs/VISUALIZE.md](docs/VISUALIZE.md)** for report layout and optional Cursor topology canvas.
See **[docs/VISUALIZE.md](docs/VISUALIZE.md)** for report layout, product catalog, optional HTML dashboard, and Cursor topology canvas.

---

Expand All @@ -148,7 +148,7 @@ go build -o bin/threescale-visualize ./cmd/threescale-visualize

```bash
bin/threescale-export --output ./export --include-applications --redact-secrets
bin/threescale-visualize ./export -o ./report --canvas ./topology.canvas.tsx
bin/threescale-visualize ./export -o ./report --html --canvas ./topology.canvas.tsx
```

### Tests
Expand Down Expand Up @@ -233,7 +233,7 @@ GitHub Actions runs tests, builds `threescale-export`, `threescale-seed`, and `t
| Tool | Description |
|------|-------------|
| **[docs/SEED.md](docs/SEED.md)** | Load fixtures into a lab tenant to validate export |
| **[docs/VISUALIZE.md](docs/VISUALIZE.md)** | Generate a Markdown report from an export |
| **[docs/VISUALIZE.md](docs/VISUALIZE.md)** | Markdown report, product catalog, HTML dashboard, and Cursor canvas from an export |
| **[testdata/README.md](testdata/README.md)** | Offline export fixture tarball (`export-minimal-1.0.tar.gz`) for tests and GateForge import |

## License
Expand Down
29 changes: 28 additions & 1 deletion docs/TEST_CASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Automation references are verified against the repository at the time of writing

**Expected results**

- Report directory contains `index.md`, `backends.md`, `products/{system_name}.md`
- Report directory contains `index.md`, `products-catalog.md`, `backends.md`, `products/{system_name}.md`
- `applications.md` when export included applications
- Mermaid graph and auth matrix in index

Expand Down Expand Up @@ -471,6 +471,33 @@ Automation references are verified against the repository at the time of writing

---

### TC-VIZ-005 — Generate HTML topology dashboard from export

| Field | Value |
|-------|-------|
| Priority | P2 |
| CLI | `threescale-visualize --html` |
| Automation | **covered** (`TestVisualizeHTMLFlag`, `TestWriteTopologyHTML`, `TestWriteProductsCatalog`) |

**Preconditions**

- Built `threescale-visualize` binary
- Valid export directory (fixture or lab export)

**Steps**

1. Run `threescale-visualize ./export -o ./report --html`
2. Open `report/topology.html` in a browser

**Expected results**

- Exit code 0
- `topology.html` is self-contained with embedded JSON and Chart.js CDN
- `index.md` links to `topology.html` and `products-catalog.md`
- Demo artifact `docs/examples/topology-demo.html` uses fixture names only (`seed_alpha`, `seed_multi_backend`)

---

## Lab pipeline

### TC-PIPE-001 — Seed → export → visualize
Expand Down
38 changes: 34 additions & 4 deletions docs/VISUALIZE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Optional** tool that generates a Markdown report from a directory exported by `threescale-export`. Useful for migration reviews without opening JSON/YAML manually.

It can also generate a **Cursor IDE topology canvas** (`.canvas.tsx`) for interactive exploration of products, backends, applications, and policies.
It can also generate a **self-contained HTML topology dashboard** (`topology.html`) for workshops in any browser, or a **Cursor IDE topology canvas** (`.canvas.tsx`) for interactive exploration of products, backends, applications, and policies.

To export a tenant, use the [main README](../README.md).

Expand All @@ -27,13 +27,17 @@ Or download `threescale-visualize-v*.*.*-linux-amd64.tar.gz` from [Releases](htt
# Markdown report (default ./report)
bin/threescale-visualize ./export -o ./report

# Report + HTML topology dashboard (open topology.html in a browser)
bin/threescale-visualize ./export -o ./report --html

# Report + Cursor topology canvas
bin/threescale-visualize ./export -o ./report --canvas ./topology.canvas.tsx
```

| Flag | Description |
|------|-------------|
| `-o`, `--output` | Report directory (default `./report`) |
| `--html` | Write self-contained topology dashboard (`topology.html` in output dir) |
| `--canvas` | Write a Cursor IDE topology canvas (`.canvas.tsx`) |
| `--version` | Binary version |

Expand All @@ -42,6 +46,8 @@ bin/threescale-visualize ./export -o ./report --canvas ./topology.canvas.tsx
```
report/
├── index.md # overview, auth matrix, Mermaid graph
├── products-catalog.md # sortable table: auth, backends, apps, policies
├── topology.html # only with --html
├── backends.md # backend catalog
├── applications.md # only if export included applications
└── products/
Expand All @@ -50,6 +56,30 @@ report/

Open `index.md` in GitHub, VS Code, or Cursor to navigate via relative links. Mermaid diagrams render on GitHub and in compatible editors.

## HTML topology dashboard

The HTML dashboard replicates the canvas UX (stats, charts, product→backend graph, sortable product table with policy names) without requiring Cursor. Generate it from the same export directory:

```bash
bin/threescale-visualize ./export -o ./report --html
```

Open `report/topology.html` in any modern browser. Chart.js is loaded from a CDN; the file embeds export data inline (no server required).

### Demo HTML (lab fixture)

The repository includes a demo generated from the offline fixture (`seed_alpha`, `seed_multi_backend`):

- [`docs/examples/topology-demo.html`](examples/topology-demo.html)

Regenerate it after template changes:

```bash
bin/threescale-visualize internal/visualize/testdata/export-minimal \
-o docs/examples --html
mv docs/examples/topology.html docs/examples/topology-demo.html
```

## Cursor topology canvas

The canvas is an optional interactive view (charts, product→backend graph, sortable product table with policy names). Generate it from the same export directory:
Expand Down Expand Up @@ -88,8 +118,8 @@ bin/threescale-seed
# 2. Export lab tenant
bin/threescale-export --output ./export --include-applications --redact-secrets

# 3. Generate report and optional canvas
bin/threescale-visualize ./export -o ./report --canvas ./topology.canvas.tsx
# 3. Generate report, optional HTML dashboard, and optional canvas
bin/threescale-visualize ./export -o ./report --html --canvas ./topology.canvas.tsx
```

Use `--include-applications` on export when you want subscribed applications in the canvas graph.
Expand All @@ -100,4 +130,4 @@ Use `--include-applications` on export when you want subscribed applications in
- Does not include `policies/catalog.json` content (global reference, not tenant config)
- Policy chains are read from `policies.json` when present, otherwise from `proxy.json` (`policies_config`)
- Redacted secrets (`***REDACTED***`) are shown as-is — not de-redacted
- Canvas requires Cursor IDE; the Markdown report works everywhere
- Canvas requires Cursor IDE; the Markdown report and HTML dashboard work everywhere
Loading
Loading