<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dmitry Kostyuk</title>
    <description>The latest articles on DEV Community by Dmitry Kostyuk (@fosfor15).</description>
    <link>https://dev.to/fosfor15</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4275013%2F030d0c52-7355-4a2c-8cb5-541dc42b3b63.jpg</url>
      <title>DEV Community: Dmitry Kostyuk</title>
      <link>https://dev.to/fosfor15</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fosfor15"/>
    <language>en</language>
    <item>
      <title>Visualizing Web Architecture: Why I Spent 2 Years Building an Interactive Graph Tool for Angular</title>
      <dc:creator>Dmitry Kostyuk</dc:creator>
      <pubDate>Tue, 01 Dec 2026 23:30:57 +0000</pubDate>
      <link>https://dev.to/fosfor15/visualizing-web-architecture-why-i-spent-2-years-building-an-interactive-graph-tool-for-angular-2fm0</link>
      <guid>https://dev.to/fosfor15/visualizing-web-architecture-why-i-spent-2-years-building-an-interactive-graph-tool-for-angular-2fm0</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This is the first part of a series on visualizing Web architecture and building **GraphLens&lt;/em&gt;* – a local static analysis tool for Angular. In the upcoming parts, I will cover the source code exploration algorithm, the custom parser design, working with the TypeScript Language Server, and the concept of &lt;strong&gt;Code Liquidity&lt;/strong&gt;.*&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Six Steps Just to Find Where the Data Comes From
&lt;/h2&gt;

&lt;p&gt;Imagine a routine task in a large Angular application consisting of hundreds of files: you need to determine which parent component passes data into a specific &lt;code&gt;@Input&lt;/code&gt; / &lt;code&gt;input()&lt;/code&gt; property and trace it a couple of levels up the tree. Previously, my workflow looked like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy the current component's selector&lt;/li&gt;
&lt;li&gt;Run a global search for that selector across the entire workspace&lt;/li&gt;
&lt;li&gt;Filter the results to find the parent component templates relevant to the current task&lt;/li&gt;
&lt;li&gt;Open the matched component's template&lt;/li&gt;
&lt;li&gt;Locate its corresponding component class in the file explorer&lt;/li&gt;
&lt;li&gt;Find the bound property and match it back to the original &lt;code&gt;@Input&lt;/code&gt; / &lt;code&gt;input()&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A single pass does not take long, yet it drains your cognitive resources. Add a few more hops up the tree, verify component availability across imported modules, and layer &lt;code&gt;Injectable&lt;/code&gt; services on top – and a developer's "working memory" quickly overflows. The details you were just holding in your head start to lose clarity.&lt;/p&gt;

&lt;p&gt;The first practical need for a tool that could show how a project is structured – not as a wall of source code or even a text explanation (as AI tools provide today), but as a clear visual graph – arose even earlier, while I was learning the Angular Router. Back then, I simply wanted to observe how my changes in wiring and configuring root and lazy-loaded modules affected the resulting route map.&lt;/p&gt;

&lt;p&gt;Later, this need solidified through systematic work across different business domains within the same application. Each time, I had to reconstruct a mental map of component relationships and module visibility almost from scratch, and hold that picture clearly for the duration of a task – assuming an ideal world with no context switching. At the time, &lt;code&gt;NgModule&lt;/code&gt; was used everywhere, which added its own layer of complexity. Although I remain a fan of Angular modules for their strict separation of a project into business domains and feature boundaries, the framework is actively moving toward the Standalone API today – and the fundamental challenge of understanding a project's real structure remains just as relevant.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Simulink to Clean Architecture
&lt;/h2&gt;

&lt;p&gt;Shortly before that, I already had experience with graphical modeling and programming environments such as &lt;strong&gt;Simulink&lt;/strong&gt; and &lt;strong&gt;LabVIEW&lt;/strong&gt; – tools where the structure of a system is immediately visible. However, a real shift in understanding happened when I translated one of my Simulink models into text-based MATLAB code &lt;em&gt;(you can see examples &lt;a href="https://github.com/fosfor15/SatCommSystem-QPSK-OFDM-LSEstimation-TransionosphericChannel" rel="noopener noreferrer"&gt;here&lt;/a&gt; and &lt;a href="https://github.com/fosfor15/HFCommSystem-MPSK-AdaptEqualizers-ITURHFMultipathChannel" rel="noopener noreferrer"&gt;here&lt;/a&gt;)&lt;/em&gt;. At that moment, the relationship between the textual and graphical representations of the exact same system became literally tangible.&lt;/p&gt;

&lt;p&gt;This perspective was later reinforced by the introduction to Robert C. Martin's &lt;em&gt;Clean Architecture&lt;/em&gt;, where architecture is described as something intangible and difficult to visualize, yet objectively real – something that directly shapes the fate of thousands of projects and determines whether they can continue to evolve.&lt;/p&gt;

&lt;p&gt;Looking at today's complex software systems – video games, operating systems, industrial control software – it is tempting to ask: how is it even possible to build them while operating with something as intangible as software architecture? That is a hyperbolic form of the question, of course, since this software clearly exists. A more realistic question is: &lt;strong&gt;at the cost of what resources is this achieved?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As humans, developers operate within hard biological limits: finite cognitive bandwidth for absorbing, understanding, and contributing to a codebase, a narrow focus of working memory (around 7 ± 2 items at once according to Miller's classic law, or closer to 4 ± 1 in Cowan's more recent research), and a rapidly fading short-term context. Add business constraints on top of that (more on this another time), and the conclusion is clear: we should not overestimate our internal resources. It is far better to approach them realistically, pragmatically, and proactively.&lt;/p&gt;

&lt;p&gt;Engineering has always solved this challenge with tools that make the invisible visible: architectural blueprints, circuit schematics, oscilloscopes, and profilers. They do not replace an engineer's thinking – they extend our capabilities and the scale of systems we are able to manage.&lt;/p&gt;

&lt;h2&gt;
  
  
  A One-Month Plan That Took Two Years
&lt;/h2&gt;

&lt;p&gt;I decided to take the same proactive approach. Initially, I envisioned a small tool to accelerate my own workflow: quickly tracing component and directive chains and clearly visualizing navigation flows in Angular projects.&lt;/p&gt;

&lt;p&gt;The original working name was &lt;strong&gt;TopView&lt;/strong&gt; &lt;em&gt;(mentioned publicly here for the first time)&lt;/em&gt; – representing a way to step beyond the wall of source code and view the project from above. I estimated a laughable &lt;strong&gt;1 month&lt;/strong&gt; to build it. In reality, reaching the first public release that met my standards took &lt;strong&gt;2 years&lt;/strong&gt;, and I am still actively developing it today.&lt;/p&gt;

&lt;p&gt;Eventually, the project was named &lt;strong&gt;GraphLens&lt;/strong&gt; – by analogy with an optical lens that focuses an Angular codebase and projects its architecture into a set of interactive graphs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What GraphLens Is and How It Works Under the Hood
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/GraphLens/graphlens" rel="noopener noreferrer"&gt;GraphLens&lt;/a&gt;&lt;/strong&gt; is a static source code analyzer and an interactive architecture visualizer for Angular projects, supporting both NgModule-based and Standalone architectures. It runs &lt;strong&gt;completely locally and privately&lt;/strong&gt; – no AI, no code leaving your local machine – always returning a &lt;strong&gt;deterministic result&lt;/strong&gt; within seconds to a couple of minutes, depending on workspace size. It is built as a &lt;strong&gt;VS Code&lt;/strong&gt; extension so developers can stay in their familiar workspace without switching contexts or relying on external utilities.&lt;/p&gt;

&lt;p&gt;Here is how the analyzer explores a workspace under the hood:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic startup and graph traversal:&lt;/strong&gt; When you open a workspace, the extension detects &lt;code&gt;angular.json&lt;/code&gt; and starts analyzing its projects &lt;em&gt;(currently applications are supported, with library support coming up next)&lt;/em&gt;. Starting from each application's entry file, connections are expanded using Breadth-First Search (BFS) based on a formal classification of Angular software entities and the ways they connect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeScript Language Server integration:&lt;/strong&gt; To locate related entities, GraphLens relies on built-in VS Code commands – &lt;code&gt;vscode.executeDefinitionProvider&lt;/code&gt; and &lt;code&gt;vscode.executeReferenceProvider&lt;/code&gt;. Tuning them to work reliably during a TypeScript Language Server cold start became a dedicated engineering task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A custom "shallow" parser:&lt;/strong&gt; Static code analysis is performed by a custom-built parser that accounted for roughly &lt;strong&gt;40% of the total development time&lt;/strong&gt;. It parses source code only to the minimum depth required without constructing unnecessary AST details, which resulted in significant performance gains.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the next part of this series, I will dive deeper into the architecture of this parser and how I addressed the TypeScript Language Server cold start.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Solves This in Practice
&lt;/h2&gt;

&lt;p&gt;To address the original challenge of navigating relationships and architectural layers, GraphLens presents your project structure through three synchronized views:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;An interactive graph&lt;/strong&gt; in the &lt;strong&gt;GraphView&lt;/strong&gt; panel right within the editor area.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Structure Tree&lt;/strong&gt; in the VS Code sidebar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A list of related entities&lt;/strong&gt; directly in the Command Palette.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is what a complex relationship involving content projection between &lt;code&gt;TitleComponent&lt;/code&gt;, &lt;code&gt;TitleContainerComponent&lt;/code&gt;, and &lt;code&gt;AppComponent&lt;/code&gt; looks like in the open &lt;a href="https://github.com/GraphLens/graphlens/tree/main/demo" rel="noopener noreferrer"&gt;demo project&lt;/a&gt;, which you can clone and test yourself:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Interactive Component Tree graph in GraphView&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7p45xyirpixq2l55onig.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7p45xyirpixq2l55onig.jpg" alt="Interactive Component Tree graph in GraphView" width="691" height="937"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Structure Tree in the sidebar&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1qfxra4elaiilzmj1m8x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1qfxra4elaiilzmj1m8x.jpg" alt="Structure Tree in the sidebar" width="800" height="651"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Relations list in the Command Palette&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnhc7zrxm8lf5ky2uugym.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnhc7zrxm8lf5ky2uugym.jpg" alt="Relations list in the Command Palette" width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finding parent components and tracing relationships now become trivial tasks. You no longer need to keep the entire chain in your head while reading code – it is always right there, just a couple of clicks or keystrokes away.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Boundary of the Unknown
&lt;/h2&gt;

&lt;p&gt;Did this solve all of my practical needs? No – but it covered the foundational ones. It works much like the circle of knowledge: the more its area expands, the longer its circumference – the boundary with the unknown – becomes. The basic needs are addressed, and more complex layers are next in line: library support, visualizing the Dependency Injection map and injector hierarchy (that picture promises to be quite impressive!), and further ahead, &lt;strong&gt;Code Liquidity&lt;/strong&gt; metrics reflecting a codebase's ability to absorb changes driven by new business requirements quickly and safely.&lt;/p&gt;

&lt;p&gt;You can try the extension and explore the full list of features and limitations on the &lt;a href="https://marketplace.visualstudio.com/items?itemName=GraphLens.graphlens" rel="noopener noreferrer"&gt;VS Code Marketplace&lt;/a&gt;, &lt;a href="https://open-vsx.org/extension/GraphLens/graphlens" rel="noopener noreferrer"&gt;Open VSX Registry&lt;/a&gt;, and in the &lt;a href="https://github.com/GraphLens/graphlens" rel="noopener noreferrer"&gt;public repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I firmly believe that any source code is, first and foremost, a set of interconnected elements – though only real-world, day-to-day usage can prove how much value visualizing them brings. How do you currently navigate an unfamiliar or overgrown codebase: global search, mental maps, AI summaries, or visual graphs? I would be happy to hear your experience and thoughts on architecture visualization in the comments.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>architecture</category>
      <category>showdev</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
