Building SwitchPath: A Graph-Backed Code Audit Tool
Discover how SwitchPath uses React, FastAPI, and FalkorDB to transform code audits by tracing evidence relationships instead of relying on flat scores.

Stock photo for illustration only, not from the actual event
- SwitchPath is a prototype project audit tool designed to improve code inspection workflows.
- The architecture combines React, TypeScript, Python, FastAPI, and FalkorDB via Docker Compose.
- It enforces strict inventory limits such as a maximum of 500 files and 3 million scanned bytes.
- The system uses graph relationships to connect audit findings directly to source evidence.
Performing a keyword search across an existing codebase often returns a list of matching files, but it rarely explains why a specific file matters or which source file supports a conclusion. This gap inspired the creation of SwitchPath, a prototype audit tool built to make code evidence and relationships easier to inspect.
The creator started this project as a learner participating in FalkorDB for Graph Hacks, with the goal of building a functional application that could inspect a local project, identify relevant dependencies, and help developers trace findings back to their exact sources.
Architecturally, SwitchPath features a React and TypeScript frontend, a Python and FastAPI backend, and FalkorDB serving as the graph database layer orchestrated locally using Docker Compose.

Stock photo for illustration only, not from the actual event
Getting the local environment running presented initial hurdles, including Docker readiness and PowerShell command behaviors. By breaking down the system into smaller checks—such as verifying database connectivity and API responsiveness—the developer learned valuable lessons in systematic debugging and service separation.
During an audit, SwitchPath performs a bounded, read-only inventory without executing the inspected project code. It records metadata including relative file paths, sizes, line counts, and SHA-256 fingerprints, while extracting dependency declarations from formats like package.json and requirements.txt.
To keep the prototype focused, the scanner applies explicit inventory boundaries: a maximum of 500 files, 200,000 bytes per file, and a total scan cap of 3,000,000 bytes, while excluding configured sensitive directories and file patterns.
"A filename match is a useful lead, but it is not proof that a feature works."
SwitchPath Creator
Because relevance scores alone do not explain how a feature works, SwitchPath utilizes FalkorDB to persist and traverse relationships between records. Nodes such as audits, findings, candidate evidence, and dependencies are explicitly connected, allowing developers to trace the exact path from a dependency to its manifest file.
Adopting graph databases for codebase auditing represents a powerful paradigm shift in software tooling. Since codebases inherently form network structures—where files reference dependencies and modules interconnect—graph traversal allows developers to query complex dependency chains much more effectively than traditional relational databases.
Source: Dev.to
Found something wrong in this article? Report an issue with this article
Comments
Leave a Comment