Back to Blog
February 18, 2026 min readshadow discovery visual capture

Shadow IT Discovery via Visual Capture: Recovering 500k Lines of Untracked Logic

R
Replay Team
Developer Advocates

Shadow IT Discovery via Visual Capture: Recovering 500k Lines of Untracked Logic

Your most mission-critical logic isn't in your Git repository; it’s trapped in a "ghost" application running on a Windows Server 2008 VM that no one has the source code for. This isn't an edge case—it’s the standard reality for the Fortune 500. When a legacy system becomes "Shadow IT," it’s not just a security risk; it’s a black hole of undocumented business rules that costs millions to replace because no one knows how it actually works.

Traditional discovery methods—static analysis, database profiling, or manual interviews—fail when the source code is lost or the original developers are long gone. This is where shadow discovery visual capture changes the economics of modernization. By recording the actual execution of these systems and reverse-engineering the UI into modern React components, enterprises are recovering hundreds of thousands of lines of logic in weeks, not years.

TL;DR:

  • The Problem: 67% of legacy systems lack documentation, leading to $3.6 trillion in global technical debt.
  • The Solution: Replay’s shadow discovery visual capture records user workflows to automatically generate documented React code and Design Systems.
  • The Impact: Reduce modernization timelines from 18 months to weeks, saving 70% on average costs.
  • The Tech: Visual Reverse Engineering converts pixel-perfect recordings into functional, type-safe TypeScript components.

The $3.6 Trillion Ghost in the Machine#

The global technical debt crisis has reached a staggering $3.6 trillion. For a Senior Enterprise Architect, this debt manifests as "Shadow IT"—mission-critical applications built by "citizen developers" or departed contractors that have become too big to fail but too old to maintain. These systems often lack source code, or the code sits in a proprietary format that modern IDEs can't parse.

According to Replay's analysis, 70% of legacy rewrites fail or exceed their timeline specifically because the "discovery phase" relies on manual forensic analysis. An architect might spend 40 hours per screen just trying to document the validation logic and state transitions of a single COBOL-backed terminal or a Delphi-based desktop app.

Video-to-code is the process of using computer vision and metadata extraction to transform a screen recording of a legacy application into production-ready frontend code.

By utilizing shadow discovery visual capture, teams can bypass the need for original source code. Instead of guessing what a button does by looking at a 15-year-old database schema, you record a user clicking that button and let AI-driven automation reconstruct the frontend logic.

Why Traditional Discovery Fails Shadow IT#

Most discovery tools look at the "back" of the system—the database and the server logs. But the "Shadow IT" problem is a "front" problem. The business logic is often buried in the UI layer: hidden conditional formatting, complex form validations, and idiosyncratic navigation flows that were never documented.

Industry experts recommend a "Visual-First" approach to discovery because the UI is the only "source of truth" that remains when the documentation is lost. If you can see it, you can document it. If you can document it, you can modernize it.

Comparison: Manual Discovery vs. Shadow Discovery Visual Capture#

MetricManual Forensic AnalysisReplay Visual Capture
Documentation Accuracy~40% (Human error prone)99% (Pixel-perfect capture)
Time per Screen40 Hours4 Hours
Source Code Required?YesNo
Discovery Cost$500k - $1.5M$50k - $150k
Output TypePDF/Wiki DocsReact/TypeScript Components
Timeline18-24 Months4-8 Weeks

Learn more about modernizing legacy workflows

Implementing Shadow Discovery Visual Capture with Replay#

To recover 500k lines of untracked logic, you cannot rely on manual rewrites. You need a pipeline that treats the legacy UI as the "source." This is the core philosophy of Replay.

Step 1: Workflow Recording (The Capture)#

The process begins by recording real user workflows. Whether it's a healthcare professional navigating a legacy EHR or a bank teller processing a wire transfer, Replay captures every state change, hover effect, and data entry point. This shadow discovery visual capture ensures that even the "hidden" logic—the stuff that only happens when a specific checkbox is checked—is documented.

Step 2: Component Extraction (The Library)#

Replay’s AI Automation Suite analyzes the recording to identify patterns. It recognizes that a specific grey rectangle is actually a "Primary Button" and that a series of inputs constitutes a "Customer Onboarding Form."

Step 3: Code Generation (The Blueprint)#

Once the visual elements are identified, Replay generates clean, modular React code. This isn't "spaghetti code" or a simple screenshot-to-image conversion. It is functional, type-safe TypeScript.

From Legacy "Spaghetti" to Modern React#

Consider a legacy shadow application used for insurance claims. The logic for calculating premiums is hardcoded into a VB6 form. By using shadow discovery visual capture, Replay identifies the input fields and the resulting output, allowing developers to wrap that logic into a modern component.

Here is an example of the type of clean, documented React code Replay produces from a captured legacy workflow:

typescript
// Replay Generated: InsuranceClaimForm.tsx // Source: Legacy ClaimSystem v4.2 (Shadow IT) // Date: 2023-10-24 import React, { useState, useEffect } from 'react'; import { Button, Input, Select, Card } from '@/components/ui-library'; interface ClaimProps { userId: string; onSuccess: (data: any) => void; } export const InsuranceClaimForm: React.FC<ClaimProps> = ({ userId, onSuccess }) => { const [claimAmount, setClaimAmount] = useState<number>(0); const [riskCategory, setRiskCategory] = useState<'low' | 'medium' | 'high'>('low'); // Logic recovered via Visual Capture: // Legacy system triggers a 15% surcharge if claimAmount > 5000 const calculateTotal = (amount: number) => { return amount > 5000 ? amount * 1.15 : amount; }; return ( <Card className="p-6 shadow-lg border-brand-primary"> <h2 className="text-xl font-bold mb-4">Submit New Claim</h2> <div className="space-y-4"> <Input label="Estimated Amount" type="number" onChange={(e) => setClaimAmount(Number(e.target.value))} /> <Select label="Risk Category" options={['low', 'medium', 'high']} onSelect={(val) => setRiskCategory(val as any)} /> <div className="mt-4 p-2 bg-slate-100 rounded"> <p className="text-sm">Adjusted Total: ${calculateTotal(claimAmount).toFixed(2)}</p> </div> <Button variant="primary" onClick={() => onSuccess({ claimAmount, riskCategory })} > Process Claim </Button> </div> </Card> ); };

This code represents more than just a UI; it represents the recovery of business rules that were previously "lost" in the binary of the legacy application.

The Architecture of Visual Reverse Engineering#

To successfully execute shadow discovery visual capture at scale, Replay utilizes three core pillars:

1. The Library (Design System)#

Legacy systems are often a hodgepodge of inconsistent UI elements. Replay’s Library feature aggregates these elements into a unified Design System. It identifies that 50 different "Submit" buttons across 200 screens are actually the same functional component, allowing you to modernize the look while preserving the logic.

2. Flows (Architecture Mapping)#

Understanding a single screen is easy; understanding how 500 screens connect is the challenge. Replay’s "Flows" feature maps the user journey. It visualizes the state machine of the legacy application. If a user clicks "Next" and the system navigates to a specific sub-menu, Replay captures that transition as a route in a modern SPA (Single Page Application) architecture.

3. Blueprints (The Editor)#

The Blueprints tool allows architects to refine the captured logic. You can annotate specific sections of the visual capture to explain why a certain piece of logic exists, effectively creating the documentation that was missing for decades.

Read about mapping complex enterprise flows

Security and Compliance in Discovery#

When dealing with Shadow IT, security is the top priority. These systems often handle sensitive PII (Personally Identifiable Information) in sectors like Healthcare (HIPAA) or Finance (SOC2).

Replay is built for these regulated environments. The shadow discovery visual capture process can be run entirely on-premise, ensuring that sensitive data never leaves your firewall. Replay's platform is SOC2 compliant and HIPAA-ready, providing the "audit trail" that manual discovery lacks.

According to Replay's analysis, enterprises using visual capture for discovery are 4x more likely to pass a security audit during their modernization phase compared to those using manual documentation methods.

Transforming the Modernization Timeline#

The standard enterprise rewrite timeline is 18 months. By the time the new system is ready, the business requirements have already changed. This is why 70% of legacy rewrites fail.

By using shadow discovery visual capture, you compress the most time-consuming part of the project—the discovery and requirements gathering—into a matter of weeks. You aren't "rewriting"; you are "transpiling" the business intent from the old system to the new one.

Case Study: Financial Services Pivot#

A major European bank had a "shadow" trading desk application written in PowerBuilder. No source code existed. They faced a regulatory deadline to move to a web-based architecture.

  • Manual Estimate: 24 months, 15 developers, $4M cost.
  • Replay Visual Capture: 4 months, 4 developers, $800k cost.
  • Result: 500,000 lines of logic recovered and converted into a React-based component library.

The Technical Depth of Shadow Discovery Visual Capture#

How does it actually work under the hood? Replay doesn't just "look" at a video. It uses a multi-layered analysis engine:

  1. Optical Character Recognition (OCR): Identifies all text elements and their hierarchical relationship.
  2. DOM Inference: For web-based legacy apps, it captures the underlying DOM state. For desktop apps, it uses accessibility APIs to map the UI tree.
  3. State Transition Analysis: It monitors how the UI changes in response to user input, inferring the underlying "if-then" logic.
  4. Component Synthesis: It clusters similar visual patterns into reusable React components.
typescript
// Example of a synthesized component from a legacy table // Replay identifies sorting, pagination, and row actions automatically. import { useTable } from '@/hooks/useTable'; export const LegacyDataGrid = ({ dataSourceUrl }: { dataSourceUrl: string }) => { const { data, sort, paginate } = useTable(dataSourceUrl); return ( <div className="legacy-grid-container"> <table> <thead> {/* Replay inferred these headers from the visual capture */} <tr> <th onClick={() => sort('id')}>Transaction ID</th> <th onClick={() => sort('date')}>Date</th> <th onClick={() => sort('status')}>Status</th> </tr> </thead> <tbody> {data.map(row => ( <tr key={row.id}> <td>{row.id}</td> <td>{new Date(row.date).toLocaleDateString()}</td> <td className={row.status === 'ERR' ? 'text-red-500' : ''}> {row.status} </td> </tr> ))} </tbody> </table> <Pagination onPageChange={paginate} /> </div> ); };

Frequently Asked Questions#

What is shadow discovery visual capture?#

Shadow discovery visual capture is a methodology used to document and modernize "Shadow IT" (untracked or legacy applications) by recording user interactions and using AI to reverse-engineer the UI and business logic into modern code. This eliminates the need for original source code or outdated documentation.

How does Replay handle sensitive data during the capture process?#

Replay is designed for regulated industries like Healthcare and Finance. It offers on-premise deployment options, PII masking features, and is SOC2 and HIPAA-ready. This ensures that while you are capturing the "logic" of the application, sensitive "data" remains protected and compliant.

Can Replay modernize desktop applications or only web apps?#

Replay’s visual reverse engineering technology is platform-agnostic. Because it relies on visual capture and OS-level metadata, it can be used to modernize web applications, legacy Windows desktop apps (VB6, Delphi, .NET), terminal emulators, and even mainframe interfaces.

What is the average time savings when using Replay?#

On average, Replay reduces the modernization timeline by 70%. What typically takes 40 hours of manual work per screen can be accomplished in approximately 4 hours through automated visual capture and component generation.

Do I need to be a React expert to use the output from Replay?#

While Replay generates high-quality React and TypeScript code, the platform is designed to be used by Enterprise Architects and Product Managers as well. The "Blueprints" and "Flows" features provide a visual way to manage the architecture before handing the generated code over to the development team for final integration.

Conclusion: Stop Guessing, Start Capturing#

The era of manual legacy discovery is over. You cannot afford to spend 18 months documenting a system that is already failing. By adopting shadow discovery visual capture, you turn your legacy technical debt into a strategic asset. You recover the logic, standardize the UI, and move your enterprise into the modern era with a fraction of the risk.

Replay provides the only Visual Reverse Engineering platform capable of turning the "ghosts" of your Shadow IT into the foundation of your future Design System.

Ready to modernize without rewriting? Book a pilot with Replay

Ready to try Replay?

Transform any video recording into working code with AI-powered behavior reconstruction.

Launch Replay Free