HomeGraph Schema
Neo4j Schema

Graph Schema

The DNA of your codebase. 17 node types, 22 edge types — every relationship your AI needs to understand your architecture.

All nodes and edges carry a projectId property for multi-project isolation. One Neo4j instance can serve unlimited projects.

Node Types

📄File

Source file tracked by the scanner

path, language, hash, lineCount, size
Function

Function, method, or arrow function

name, params, returnType, isAsync, bodyHash
🏗️Class

Class, interface, struct, enum, or trait

name, superClass, interfaces, methods
🌐Route

HTTP, gRPC, tRPC, GraphQL, WebSocket endpoint

method, path, handlerName, apiTags
🗃️DBTable

Database table (Prisma, Supabase, Knex, Redis, SQL)

name, schema, operations
📊DBColumn

Column within a DB table (SQL, C# EF, Django)

name, type, tableName
🔗ExternalAPI

External API (Stripe, AWS, fetch, axios)

name, baseUrl, methods
🔑EnvVar

process.env, os.environ, .env files, feature flags

name, required, defaultValue
📡Event

Event bus / Socket.IO / WebSocket events

name, eventKind, namespace, room
📦Module

Logical module (file, package, or external)

name, path, moduleType
📌Variable

Top-level const, let, or var

name, kind, isExported, valueType
CronJob

Scheduled task (node-cron, @nestjs/schedule, agenda)

name, schedule, handlerName
📬QueueJob

Job queue (Bull, BullMQ, Bee-Queue, pg-boss)

name, queueName, jobKind
📈Metric

Prometheus / OpenTelemetry metric

name, metricType, help
🔭Span

OpenTelemetry / dd-trace / Sentry span

name, spanKind, attributes
📨Topic

Message broker topic (Kafka, RabbitMQ, NATS, SQS/SNS)

name, broker, topicKind
🚨SecurityIssue

Hardcoded secret, weak crypto, exposed credential

name, severity, category

Edge Types

CONTAINSFile Function/Class
CALLSFunction Function
IMPORTSFile Module
EXPORTSModule Symbol
DEPENDS_ONFunction Module
EXTENDSClass Class
IMPLEMENTSClass Class
HANDLESRoute Function
READS_FROMFunction DBTable
WRITES_TOFunction DBTable
CALLS_EXTERNALFunction ExternalAPI
EMITSFunction Event
LISTENS_TOFunction Event
USES_ENVFunction EnvVar
PRODUCES_JOBFunction QueueJob
CONSUMES_JOBFunction QueueJob
USES_METRICFunction Metric
STARTS_SPANFunction Span
PRODUCES_MESSAGEFunction Topic
CONSUMES_MESSAGEFunction Topic
SCHEDULESFunction CronJob
HAS_SECURITY_ISSUEFile SecurityIssue

Cypher Query Examples

Impact Analysis

What breaks if I modify processPayment?

cypher
MATCH (target {name: $name, projectId: $pid})
CALL apoc.path.subgraphNodes(target, {
relationshipFilter: "<CALLS|<HANDLES|<TRIGGERS",
maxLevel: 3
}) YIELD node
RETURN node.name, labels(node)[0] as type
Dead Code Detection

Functions never called (excludes constructors, class methods, React, barrel re-exports)

cypher
MATCH (f:Function)
WHERE NOT (f)<-[:CALLS]-() AND NOT (f)<-[:HANDLES]-()
AND f.name <> 'constructor'
AND f.projectId = $projectId
RETURN f.name, f.filePath
DB Table Impact

Which functions read from or write to the users table?

cypher
MATCH (t:DBTable {name: 'users', projectId: $pid})
OPTIONAL MATCH (t)<-[r:READS_FROM]-(reader)
OPTIONAL MATCH (t)<-[w:WRITES_TO]-(writer)
RETURN reader.name as readers, writer.name as writers
Duplicate Code

Functions with identical bodyHash (copy-paste detection)

cypher
MATCH (f:Function {projectId: $pid})
WHERE f.bodyHash IS NOT NULL
AND (f.endLine - f.startLine) >= 3
WITH f.bodyHash as hash, collect(f.name) as fns, count(*) as cnt
WHERE cnt > 1
RETURN hash, cnt, fns ORDER BY cnt DESC