LegacyLens is an AI-powered software archaeology platform for teams inheriting old, undocumented codebases. Instead of spending weeks tracing imports and rediscovering business context, an engineer can provide a Git repository or ZIP archive and get an evidence-backed map of how the system works.

The MVP scans Python, JavaScript, TypeScript, and Java source. It detects files, modules, classes, functions, imports, dependency edges, circular paths, complexity hotspots, conditional business-rule candidates, and likely dead code. The dashboard turns those results into an interactive Cytoscape dependency graph, a Mermaid architecture diagram, a business-rule report with file and line references, a cleanup report with confidence scores, and a modernization brief.

LegacyLens also includes an AI repository assistant. Source files are chunked and indexed for retrieval. When OpenAI and Qdrant are configured, GPT-5.6 answers repository questions using semantic evidence and returns citations. When no API key is available, the same product remains demoable through local lexical retrieval and deterministic answers instead of fabricated results.

The key design decision was to keep facts grounded in static analysis and source citations, using GPT-5.6 for translation and synthesis rather than asking the model to infer the entire repository from scratch. This makes the output inspectable and gives engineers a practical starting point for safer modernization.

Codex was used to scaffold the React/FastAPI/Docker workspace, implement the ingestion and analysis pipeline, connect the AI retrieval flow, create the interactive graph and report views, generate tests, diagnose a module-resolution bug, and produce the deployment and submission documentation. The implementation was built incrementally: the backend analyzer was tested before the dashboard was connected, and the frontend build configuration was verified independently.

GPT-5.6 is used through the OpenAI Responses API to rewrite conditional source code into concise business policies and answer repository questions from retrieved source snippets with citations. OpenAI embeddings power semantic chunk retrieval in Qdrant.

Built With

Share this project:

Updates