|
2 | 2 |
|
3 | 3 | Inspired by [XKCD #2347](https://xkcd.com/2347/), StackTower renders dependency graphs as **physical towers** where blocks rest on what they depend on. Your application sits at the top, supported by libraries below—all the way down to that one critical package maintained by *some dude in Nebraska*. |
4 | 4 |
|
5 | | -Traditional node-link diagrams are technically correct but don't *feel* like anything. Tower visualizations tap into intuition: width shows importance, depth reveals foundation, and the structure makes hidden dependencies visible at a glance. |
6 | 5 |
|
7 | 6 | 📖 **[Read the full story at stacktower.io](https://www.stacktower.io)** |
8 | 7 |
|
@@ -63,7 +62,7 @@ The repository ships with pre-parsed graphs so you can experiment immediately: |
63 | 62 | # Real packages with full metadata |
64 | 63 | stacktower render examples/real/flask.json -t tower --style handdrawn --merge -o flask.svg |
65 | 64 | stacktower render examples/real/serde.json -t tower --popups -o serde.svg |
66 | | -stacktower render examples/real/express.json -t tower --ordering barycenter -o express.svg |
| 65 | +stacktower render examples/real/express.json -t tower --ordering barycentric -o express.svg |
67 | 66 |
|
68 | 67 | # Synthetic test cases |
69 | 68 | stacktower render examples/test/diamond.json -t tower -o diamond.svg |
@@ -121,6 +120,22 @@ The ordering step is where the magic happens. StackTower uses an optimal search |
121 | 120 |
|
122 | 121 | HTTP responses are cached in `~/.cache/stacktower/` with a 24-hour TTL. Use `--refresh` to bypass. |
123 | 122 |
|
| 123 | +## Adding New Languages |
| 124 | + |
| 125 | +To add support for a new package manager (e.g., Ruby/RubyGems): |
| 126 | + |
| 127 | +1. **Create a registry client** in `pkg/integrations/rubygems/client.go` — parse the registry API, extract dependencies, use `integrations.BaseClient` for HTTP + caching |
| 128 | + |
| 129 | +2. **Create a source parser** in `pkg/source/ruby/ruby.go` — implement the `source.PackageInfo` interface (`GetName`, `GetVersion`, `GetDependencies`, `ToMetadata`, `ToRepoInfo`) |
| 130 | + |
| 131 | +3. **Wire into CLI** in `internal/cli/parse.go`: |
| 132 | + ```go |
| 133 | + cmd.AddCommand(newParserCmd("ruby <gem>", "Parse Ruby dependencies", |
| 134 | + func() (source.Parser, error) { return ruby.NewParser(source.DefaultCacheTTL) }, &opts)) |
| 135 | + ``` |
| 136 | + |
| 137 | +The generic `source.Parse()` handles concurrent fetching, depth limits, and graph construction automatically. |
| 138 | + |
124 | 139 | ## Learn More |
125 | 140 |
|
126 | 141 | - 📖 **[stacktower.io](https://www.stacktower.io)** — Interactive examples and the full story behind tower visualizations |
|
0 commit comments