Skip to content
D

DepGraph.ai

Dependency clarity in every layer of your stack.

Created on 15th March 2026

•

D

DepGraph.ai

Dependency clarity in every layer of your stack.

The problem DepGraph.ai solves

Modern full-stack apps span three languages simultaneously — SQL, Python, and TypeScript — but no tool connects them. A database column renamed in one place silently breaks serializers, API contracts, and React components that nobody knew were depending on it.

DepGraph.ai solves this by building a unified cross-language knowledge graph of your entire codebase.

What engineers can do with it:

  • Trace any variable end-to-end — click a database column, instantly see its full path through the Python ORM → serializer → TypeScript interface → React component
  • Know the blast radius before touching anything — every node gets an impact severity score (CRITICAL / HIGH / MEDIUM / LOW) showing exactly how many nodes across how many languages break if you change it
  • Rename safely across all 3 layers — rename a symbol and get a topologically-ordered, line-level diff of every file that needs to change in the correct dependency order — apply to disk or download as a zip
  • Ask questions in plain English — "What breaks if I rename this table?", "Which API routes expose user data?" — the RAG chat answers using your actual codebase as context
  • Onboard to unfamiliar codebases faster — instead of reading thousands of lines across multiple languages, explore a visual map of every dependency

What it makes safer:

  • Refactoring shared database columns without breaking downstream consumers
  • Renaming ORM models or TypeScript interfaces that are referenced across layers
  • Identifying which parts of the codebase are highest risk before a production deploy
  • Reviewing pull requests that touch cross-language boundaries

Challenges we ran into

The Knowledge Graph Was the Hardest Part

Building the visual UI and the API layer was straightforward. The real engineering
challenge was the knowledge graph itself — specifically, how do you reliably connect
symbols across three completely different languages with no shared runtime?


Challenge 1: The Cross-Language Naming Problem

The first wall we hit was that the same piece of data has a completely different name
in every layer.

A database column user_first_name becomes first_name in the Django ORM (SQLAlchemy
strips the prefix), firstName in the TypeScript interface (camelCase convention), and
{user.firstName} in the React component. To a static analysis tool these look like
four completely unrelated symbols.

How we solved it:
We built a two-pass matching system. First pass uses strict AST matching — if a Python
variable contains Column("user_first_name"), we directly link it to the SQL column
with confidence = 1.0. Second pass uses a tokenized Jaccard similarity function that
splits identifiers on underscores and camelCase boundaries, normalizes to lowercase
tokens, and computes overlap. user_first_name and firstName share the tokens
{first, name} — they get a MAPS_TO edge with confidence = 0.92 and
inferred_by = "naming". This alone recovered around 60% of cross-language edges
without touching the LLM at all.


Challenge 2: Connections That Can't Be Derived From AST

Some cross-language connections are genuinely invisible to static analysis. A Django
REST Framework serializer doesn't explicitly say "this maps to the TypeScript
UserResponse interface." A FastAPI route returning user_id doesn't explicitly
declare that the TypeScript fetchUser() function consumes it.

Pure AST tools miss these entirely. We couldn't miss them — they're the most important
edges in the graph.

How we solved it:
We built a boundary detection layer that identifies nodes sitting at language
boundaries — serializers, API routes, DTO interfaces, fetch calls — using a library of
regex patterns per language. These boundary pairs are then batched and sent to an LLM
(Llama 3.1 8B via Featherless/OpenRouter) with structured context about each node
and asked to infer the semantic connection and assign a relationship type
(FLOWS_TO, EXPOSES_AS, SERIALIZES_TO). Every LLM-inferred edge is tagged with
inferred_by = "llm" and a confidence score, and rendered as a dashed edge in the
graph so engineers always know which connections are AI-inferred vs AST-proven.


Challenge 3: LLM Rate Limits Killing the Pipeline

Our first implementation called the LLM once per boundary node and once per boundary
pair. On a repo with 50 boundary nodes, that was 50+ API calls. Featherless has a
concurrency limit on lower-tier plans — we started getting 429 Too Many Requests
errors mid-pipeline, which silently dropped edges and produced an incomplete graph
with no error shown to the user.

How we solved it:
We rewrote the LLM resolver to batch all boundary nodes into a single annotation call
and all boundary pairs into at most 2 resolution calls — reducing 50+ API calls to
3-4 total per analysis. We also added a semaphore (asyncio.Semaphore(1)) to enforce
one in-flight LLM request at a time, a content-hash cache so re-analyzing the same
repo doesn't re-call the LLM at all, and a pre-flight availability check that
gracefully falls back to structural-only mode if the LLM API is unreachable.


Challenge 4: The Graph Had No Concept of "Layer"

After getting all nodes and edges into NetworkX, the graph was topologically correct
but visually meaningless — SQL nodes mixed with TypeScript nodes mixed with Python
nodes, no clear separation. The Dagre auto-layout made it worse: it arranged nodes
purely by graph topology, so a Python ORM field might end up visually between two
React components just because that's where the edges led.

How we solved it:
We built a post-layout zone-snapping pass. After Dagre assigns positions, we collect
each node's x coordinate, group nodes by language layer (database / backend /
frontend), compute the min/max x range within each group, then normalize every node's
x into a fixed zone band centered at a target column (DATABASE at x≈220, BACKEND at
x≈860, FRONTEND at x≈1520). Y positions from Dagre are preserved exactly — so the
topology-based vertical ordering is maintained, but every node is guaranteed to land
in its correct visual column. Zone background panels are then drawn behind each
column so the DB / Backend / Frontend separation is always visually clear.


Challenge 5: Per-User Graph Isolation Without a Full Database

The original design used a single global graph in memory. When we added multi-user
auth, we needed per-user isolation — but spinning up a separate Neo4j instance or
database schema per user wasn't feasible in a hackathon timeframe.

How we solved it:
We replaced the single global G NetworkX graph with a `

Tracks Applied (1)

GenAI

How DepGraph.ai Fits the Generative AI Track AI Is Not a Feature — It's Load-Bearing Infrastructure Most projects in t...Read More

Discussion

Builders also viewed

See more projects on Devfolio