One-liner: Connect your repo. Get a live, queryable knowledge graph your entire team and every AI tool shares — automatically updated, never stale.
- What We're Building
- Core Architecture
- Tech Stack
- Phase-by-Phase Build Plan
- The Graph Visualizer
- MCP Server — How Other Devs Use It
- Hosting Strategy
- How Other Developers Connect
- Pricing Model
- Go-To-Market
- What You're NOT Building
- Milestone Summary
Every AI coding tool — Claude Code, Cursor, Windsurf — reads your codebase like a person who just joined the team today. Every session. Every time. They grep files, guess relationships, miss dependencies, and hallucinate imports.
The open-source tools (codebase-memory-mcp, CodeGraphContext, GitNexus) solve this locally — but they require manual re-indexing, don't sync across team members, and have no persistent memory layer.
Sourcegraph Cody solved this at enterprise scale ($59/user/month) and then abandoned the indie/SMB market entirely in July 2025.
Free open-source tools Our product Enterprise (Sourcegraph)
(manual, local, solo) → (managed, live, team) → ($59/user, complex)
↑ ↑ ↑
No team sync Always current Too expensive
Manual reindex Auto-synced via webhook Overkill for SMBs
No dashboard Visual graph explorer Sales-led only
- Connects to your GitHub/GitLab repo via webhook
- Builds and maintains a live knowledge graph — nodes (files, functions, classes, routes, components) and edges (imports, calls, inherits, writes-to)
- Exposes it via MCP — any AI tool can query it instantly
- Syncs across your whole team — everyone shares the same graph state
- Shows a visual explorer — Obsidian-style interactive graph in the browser
- Tracks architectural evolution — co-change patterns, drift alerts, decision logs
┌─────────────────────────────────────────────────────────────────┐
│ DEVELOPER WORKFLOW │
│ │
│ GitHub/GitLab Repo ──webhook──▶ CodeGraph Cloud │
│ │ │
│ ┌──────────┴──────────┐ │
│ │ Ingestion Engine │ │
│ │ (tree-sitter + AST) │ │
│ └──────────┬──────────┘ │
│ │ │
│ ┌──────────▼──────────┐ │
│ │ Graph Database │ │
│ │ (Neo4j / FalkorDB) │ │
│ └──────────┬──────────┘ │
│ │ │
│ ┌──────────────────────────┼──────────────────┐ │
│ │ │ │ │
│ ┌─────────▼──────┐ ┌────────────▼───────┐ ┌──────▼──┐ │
│ │ MCP Server │ │ Graph Explorer UI │ │ REST │ │
│ │ (14 tools) │ │ (Visual Dashboard) │ │ API │ │
│ └────────────────┘ └────────────────────┘ └─────────┘ │
│ │ │ │
│ Claude Code / Cursor Browser (Team) │
│ Windsurf / Any MCP Client Obsidian-like View │
└─────────────────────────────────────────────────────────────────┘
git push
└─▶ GitHub webhook fires
└─▶ CodeGraph ingestion worker picks up diff
└─▶ tree-sitter re-parses only changed files
└─▶ Graph DB updates affected nodes + edges
└─▶ MCP server cache invalidated
└─▶ All connected clients get fresh graph
└─▶ Visual explorer reflects changes
Key insight: We only re-parse the diff, not the whole repo. On a push touching 3 files in a 50K-line codebase, update time is ~200ms.
| Layer | Technology | Why |
|---|---|---|
| Runtime | Node.js (TypeScript) | Ecosystem for tree-sitter bindings |
| Parser | tree-sitter | 155 languages, one API, battle-tested |
| Graph DB | FalkorDB (self-host) or Neo4j AuraDB | FalkorDB is Redis-compatible, fast, cheaper |
| Queue | BullMQ + Redis | Webhook → async job queue |
| Webhook receiver | Express.js | Lightweight, handles GitHub/GitLab payloads |
| Job worker | Separate Node process | Isolated from API server |
| Layer | Technology | Why |
|---|---|---|
| Protocol | Anthropic MCP SDK | First-class MCP support |
| Transport | SSE (Server-Sent Events) | MCP standard for remote servers |
| Auth | API key per workspace | Simple, developer-friendly |
| Caching | Redis | Sub-ms repeated queries |
| Layer | Technology | Why |
|---|---|---|
| Framework | Next.js 14 (App Router) | Fast, SSR, easy deployment |
| Graph renderer | Sigma.js + Graphology | Made for large graphs, WebGL, performant |
| 3D option | Three.js + force-graph | For the Codebase Memory-style 3D view |
| Styling | Tailwind CSS | Rapid UI iteration |
| Auth | Clerk or NextAuth | Team-based auth |
| Layer | Technology | Why |
|---|---|---|
| App hosting | Railway or Render | Simple, affordable, auto-deploy from GitHub |
| Graph DB hosting | FalkorDB Cloud or Railway addon | Managed, no ops |
| File/cache | Upstash Redis | Serverless Redis, pay-per-use |
| CDN / static | Vercel (frontend only) | Free tier, global edge |
| Monitoring | Better Stack or Axiom | Log aggregation, cheap |
Goal: Repo scaffolded, tools confirmed working locally.
Tasks:
├── monorepo setup (pnpm workspaces)
│ ├── packages/ingestion # tree-sitter parser
│ ├── packages/graph-db # DB client + schema
│ ├── packages/mcp-server # MCP tools
│ ├── packages/api # REST API + webhook receiver
│ └── apps/web # Next.js dashboard
│
├── Install + test tree-sitter locally
│ └── Parse a sample TS file → confirm AST output
│
├── Spin up FalkorDB locally via Docker
│ └── docker run -p 6379:6379 falkordb/falkordb
│
└── Confirm MCP SDK works with Claude Code locally
Deliverable: codegraph init runs locally, parses a repo, writes to local DB.
Goal: Parse a real repo into a working graph.
Build:
├── tree-sitter parser module
│ ├── TypeScript / JavaScript (priority)
│ ├── Python
│ └── Go (stretch)
│
├── Node types to extract:
│ ├── File
│ ├── Function / Arrow function
│ ├── Class
│ ├── Interface / Type
│ ├── React Component
│ └── HTTP Route (Express, Next.js API routes)
│
├── Edge types to extract:
│ ├── IMPORTS (file → file)
│ ├── CALLS (function → function)
│ ├── RENDERS (component → component)
│ ├── INHERITS (class → class)
│ ├── DEFINES (file → function/class)
│ └── EXPORTS (file → symbol)
│
├── FalkorDB schema
│ ├── CREATE (:File {path, language, size, last_modified})
│ ├── CREATE (:Function {name, file_path, line_start, line_end})
│ ├── CREATE (:Component {name, props[], file_path})
│ └── Relationship indexes on all edge types
│
└── CLI: codegraph index ./my-repo
└── Output: "✓ Indexed 1,247 nodes, 3,891 edges in 2.1s"
Deliverable: Local CLI that turns any JS/TS repo into a queryable graph.
Goal: Claude Code can query the graph via MCP.
Build 14 MCP tools:
SEARCH TOOLS
├── search_symbol(query) # find any function/class by name
├── find_file(path_fragment) # locate files
└── search_semantic(description) # "find the auth middleware" (vector)
GRAPH TOOLS
├── get_file_context(path) # all imports, exports, callers of a file
├── find_callers(function_name) # who calls this function
├── get_component_tree(name) # full render dependency chain
├── affected_by(symbol) # what breaks if I change this
└── get_dependencies(path) # direct + transitive deps
IMPACT TOOLS
├── blast_radius(symbol) # how many nodes affected by a change
├── co_change_partners(path) # files that historically change together
└── change_impact(file_list) # given these changed files, what's at risk
MEMORY TOOLS
├── add_note(path, note) # attach architectural decision to a node
├── get_notes(path) # retrieve notes for a file/symbol
└── get_recent_changes(hours) # what changed in the last N hours
MCP server setup:
├── SSE transport on port 3748
├── API key authentication header
├── Redis cache for hot queries (TTL: 30s)
└── Config file: ~/.codegraph/config.json
└── { "endpoint": "https://api.codegraph.dev", "key": "cg_..." }
Developer connects Claude Code in one step:
// .claude.json
{
"mcpServers": {
"codegraph": {
"url": "https://api.codegraph.dev/mcp",
"headers": { "Authorization": "Bearer cg_your_key_here" }
}
}
}Deliverable: Claude Code can call affected_by("useAuth") and get accurate results from the graph.
Goal: Push to GitHub → graph updates automatically.
Build:
├── GitHub App (or webhook endpoint)
│ ├── Register app at github.com/settings/apps
│ ├── Subscribe to: push, pull_request events
│ └── Receive payload: list of changed files + diff
│
├── Ingestion worker (BullMQ)
│ ├── On webhook: create job { repo_id, changed_files[], commit_sha }
│ ├── Worker picks up job
│ ├── Fetch changed file contents via GitHub API
│ ├── Re-parse only those files via tree-sitter
│ ├── Compute graph delta (new nodes, removed nodes, changed edges)
│ ├── Apply delta to FalkorDB
│ └── Invalidate Redis cache for affected queries
│
├── Multi-repo support
│ ├── Each repo gets its own graph namespace in FalkorDB
│ ├── Workspace table: { workspace_id, repos[], members[], api_key }
│ └── Isolation: graph queries scoped to workspace
│
└── Onboarding API
├── POST /repos/connect { github_url, branch }
├── Triggers full initial index (queued job)
└── Returns: { repo_id, status: "indexing", eta_seconds: 45 }
Deliverable: Push code, graph updates in <500ms. No manual re-indexing ever.
Goal: A visual, interactive graph dashboard in the browser.
Build (Next.js app):
Pages:
├── /dashboard # repo list, health status, recent changes
├── /graph/:repo_id # main graph explorer (the Obsidian-like view)
├── /search # symbol search across all repos
├── /impact # blast radius calculator
├── /memory # team notes and architectural decisions
└── /settings # API keys, webhook config, team members
Graph Explorer (the wow feature):
├── Renderer: Sigma.js + WebGL (handles 50K+ nodes smoothly)
├── Node colors by type:
│ ├── 🔵 Function
│ ├── 🟣 Class/Interface
│ ├── 🟠 File
│ ├── 🟢 Component
│ ├── 🔴 Route
│ └── ⚪ Variable
├── Edge colors by type:
│ ├── Cyan → imports
│ ├── Green → calls
│ ├── Purple → renders
│ └── Orange → inherits
├── Interactions:
│ ├── Click node → side panel (symbol info, callers, callees, notes)
│ ├── Search → highlight matching nodes
│ ├── Filter by node type (toggle buttons like screenshot)
│ ├── Zoom to cluster
│ ├── "Blast radius" mode → highlight affected subgraph in red
│ └── Toggle: 2D force-directed | 3D globe view
└── Live updates: graph re-renders on push (WebSocket)
Deliverable: Share a URL with your team. Everyone sees the same live graph.
Goal: Ready for first paying customers.
Build:
├── Auth (Clerk)
│ ├── GitHub OAuth (natural for devs)
│ ├── Workspace creation on first login
│ └── Invite team members via email
│
├── Billing (Stripe)
│ ├── Free: 1 repo, 1 user, 10K nodes
│ ├── Pro ($29/mo): 5 repos, 10 users, unlimited nodes
│ └── Team ($79/mo): unlimited repos + users + priority support
│
├── Git history ingestion
│ ├── Parse last 90 days of git log
│ ├── Build co-change edges (A and B change together 12x → strong edge)
│ └── Surface in UI: "High coupling detected: auth.ts ↔ middleware.ts"
│
├── Drift alerts
│ ├── Detect circular dependencies introduced
│ ├── Flag new files with no tests
│ └── Alert on blast-radius > 50 nodes for a single change
│
└── AGENTS.md auto-generation
├── Analyse top clusters in graph
├── Write plain-English architecture summary
└── Commit to repo root on user request
The graph visualizer is your demo moment. Every developer who sees it says "I want that for my codebase." It's the hook, the screenshot that goes viral on X/Reddit, and the thing that makes the product feel like magic versus a CLI tool.
Why Sigma.js over alternatives:
| Library | Pros | Cons |
|---|---|---|
| Sigma.js + Graphology | WebGL, handles 100K+ nodes, designed for this exact use case | Steeper learning curve |
| D3.js | Flexible, many examples | Slow past 5K nodes, SVG-based |
| Three.js force-graph | Stunning 3D | Overkill for most use cases |
| Cytoscape.js | Feature-rich | Heavy, slower rendering |
Sigma.js is the right choice. The screenshot you sent is actually from codebase-memory-mcp's graph-ui package — it uses a custom WebGL renderer. Sigma.js gives you 90% of that with 20% of the work.
Background: #070B12 (near black, deep space)
Node palette:
Function #00D4FF (electric cyan)
Class #A855F7 (violet)
File #F97316 (orange)
Component #22C55E (green)
Route #EF4444 (red)
Variable #94A3B8 (slate)
Edge palette:
imports rgba(0, 212, 255, 0.15)
calls rgba(34, 197, 94, 0.15)
renders rgba(168, 85, 247, 0.15)
inherits rgba(249, 115, 22, 0.15)
Bloom effect: CSS filter: blur + brightness on hot nodes
Animation: Force-directed layout, settles over 2s on load
Hover: Node scales 1.4x, connected edges highlight full opacity
Click: Side panel slides in from right (400px)
FILTER PANEL (left sidebar)
├── Toggle node types on/off
├── Show/hide edge types
├── Slider: minimum node degree (hide low-connectivity noise)
└── Search: live highlights matching nodes
SIDE PANEL (right, on click)
├── Symbol name + type badge
├── File path (clickable → opens in GitHub)
├── Metrics: callers count, callees count, co-change partners
├── Last modified: date + author
├── Team notes: markdown editor
└── Actions: "Show blast radius" | "Copy MCP query"
TOOLBAR (top)
├── Layout: Force-directed | Hierarchical | Radial
├── View: 2D | 3D (Three.js mode)
├── Export: PNG | JSON graph data
└── Live: green dot shows graph is live-synced
Step 1 — Get API key from dashboard
codegraph.dev/settings/api-keys → Create key → Copy
Step 2 — Add to Claude Code
// ~/.claude.json (or per-project .claude.json)
{
"mcpServers": {
"codegraph": {
"type": "sse",
"url": "https://api.codegraph.dev/mcp/sse",
"headers": {
"Authorization": "Bearer cg_live_abc123xyz"
}
}
}
}Step 3 — Verify in Claude Code
/mcp
→ ✓ codegraph (14 tools available)
Done. Claude Code now has graph-aware tools.
// .cursor/mcp.json
{
"mcpServers": {
"codegraph": {
"url": "https://api.codegraph.dev/mcp/sse",
"headers": { "Authorization": "Bearer cg_live_abc123xyz" }
}
}
}// ~/.windsurf/mcp_config.json
{
"servers": [{
"name": "codegraph",
"endpoint": "https://api.codegraph.dev/mcp/sse",
"auth": { "type": "bearer", "token": "cg_live_abc123xyz" }
}]
}User: "Refactor the payment module to support multi-currency"
Claude Code internally calls:
1. get_component_tree("PaymentModule")
→ Returns: PaymentForm, CurrencySelect, PriceDisplay, useCheckout, stripeUtils
2. affected_by("PaymentModule")
→ Returns: 8 downstream components, 2 API routes, 1 webhook handler
3. co_change_partners("PaymentForm.tsx")
→ Returns: "CurrencySelect.tsx changed together 7x, priceUtils.ts 5x"
Claude Code now sends only these 11 targeted files to the LLM.
Result: Precise refactor, no missed dependencies, no hallucinated imports.
Why Railway:
- Deploy directly from GitHub — push to main → auto-deploys
- Add-ons: Redis, Postgres built-in
- FalkorDB available as a community template
- ~$20–40/month for early stage
- No DevOps knowledge required
Production Architecture (Railway):
Service 1: API Server
├── Node.js Express app
├── Handles: webhooks, REST API, auth
├── RAM: 512MB, CPU: 0.5 vCPU
└── Cost: ~$5/mo
Service 2: MCP Server
├── Node.js, SSE transport
├── Handles: all MCP tool requests
├── RAM: 512MB, CPU: 0.5 vCPU
└── Cost: ~$5/mo
Service 3: Ingestion Worker
├── BullMQ worker (Node.js)
├── Handles: parsing jobs from queue
├── Scales horizontally on queue depth
└── Cost: ~$5/mo (scales to ~$20 under load)
Service 4: FalkorDB
├── Railway community template
├── Persistent volume: 10GB to start
└── Cost: ~$10/mo
Service 5: Redis (Upstash)
├── Serverless Redis
├── Used for: job queue, query cache
└── Cost: free tier → ~$10/mo at scale
Service 6: Frontend (Vercel)
├── Next.js app, auto-deploy
├── Free tier handles early traffic
└── Cost: $0
Total early stage: ~$35–50/month
Stage 1 (0–100 repos): Railway monolith ~$50/mo
Stage 2 (100–1K repos): Railway + Upstash ~$200/mo
Stage 3 (1K–10K repos): AWS ECS + RDS ~$800/mo
Stage 4 (10K+ repos): Kubernetes + Aurora Custom
Offer a Docker Compose bundle:
# docker-compose.yml (shipped to customers)
version: '3.8'
services:
api:
image: codegraph/api:latest
ports: ["3747:3747"]
mcp:
image: codegraph/mcp:latest
ports: ["3748:3748"]
worker:
image: codegraph/worker:latest
falkordb:
image: falkordb/falkordb:latest
volumes: ["./data:/data"]
redis:
image: redis:alpine# Customer runs:
curl -fsSL https://codegraph.dev/install.sh | bash
# Done. Self-hosted in 2 minutes.This becomes your enterprise tier — air-gapped, on-prem, no code leaves their servers.
Developer sees CodeGraph on:
├── GitHub (open-source MCP tools + graph library)
├── Product Hunt launch
├── Twitter/X demo video (the graph visual goes viral)
└── MCP marketplace listings (mcp.so, pulsemcp.com)
│
▼
codegraph.dev landing page
│
▼
"Connect your repo" (GitHub OAuth)
│
▼
Initial index runs (~60 seconds for average repo)
│
▼
Copy API key → paste into .claude.json
│
▼
First MCP query → "oh this is fast"
│
▼
Share graph URL with team → team signs up
- Zero config for individuals. One key, one line. Works immediately.
- Team sharing is effortless. Graph URL is shareable like a Figma file.
- Never breaks their workflow. It's additive — Claude Code still works without it, just better with it.
- Privacy clear. We index structure (AST), not raw code. Clearly stated.
Required:
├── Contents: read (to fetch file content for parsing)
└── Metadata: read (repo info)
Webhooks:
├── push (to trigger re-index on changes)
└── repository (to track repo renames/deletes)
NOT requested:
├── Write access (we never push anything)
├── Secrets (never touch .env files)
└── Issues/PRs (not needed for V1)
FREE
├── 1 repository
├── 1 team member
├── Up to 10,000 nodes
├── 5 MCP queries/minute
├── Graph explorer (read-only)
└── Community support
PRO — $29/month
├── 5 repositories
├── 10 team members
├── Unlimited nodes
├── 60 MCP queries/minute
├── Full graph explorer + blast radius
├── Git history ingestion (90 days)
├── Team notes + architectural memory
└── Email support
TEAM — $79/month
├── Unlimited repositories
├── Unlimited team members
├── 300 MCP queries/minute
├── Drift alerts + Slack notifications
├── AGENTS.md auto-generation
├── Priority support
└── Custom webhook integrations
SELF-HOSTED — $199/month (or $1,999/year)
├── Docker Compose bundle
├── Your infrastructure, your data
├── Air-gapped deployment option
├── Enterprise SSO (SAML)
└── Dedicated Slack channel
Month 6 target:
├── 50 free users (conversion funnel)
├── 30 Pro users × $29 = $870/mo
├── 10 Team users × $79 = $790/mo
└── 2 Self-hosted × $199 = $398/mo
───────────
Total MRR: ~$2,058/mo
Month 12 target:
├── 200 free users
├── 100 Pro × $29 = $2,900/mo
├── 40 Team × $79 = $3,160/mo
└── 10 Self × $199 = $1,990/mo
───────────
Total MRR: ~$8,050/mo
- Ship daily updates on X/Twitter with graph screenshots
- The visual is your marketing — a 3D graph of a 50K-node repo stops thumbs
- Target: r/LocalLLaMA, r/ClaudeAI, r/cursor, Hacker News
- Open-source the MCP tools package → GitHub stars → trust
Launch sequence:
├── Product Hunt launch (Tuesday, 9am EST)
├── HN: Show HN post with live demo
├── Post in Claude Code Discord / Cursor Discord
├── MCP marketplace listings (mcp.so, pulsemcp.com, mcpmarket.com)
└── Blog post: "Why AI coding agents are blind (and how to fix it)"
- Agency outreach: Dev agencies with large legacy codebases — highest pain, most willing to pay
- Community: Answer questions in Claude Code / Cursor communities, mention CodeGraph naturally
- Content: "I gave Claude Code a memory — here's what happened" (demo video)
- Integrations: Apply to be featured in Claude Code's MCP directory
To ship in 6 weeks, explicitly exclude:
❌ Your own AI / LLM — you're infrastructure, not an assistant
❌ Code editor / IDE — you're a layer, not a tool replacement
❌ Code review bot — different product category
❌ CI/CD integration — Phase 3+ only
❌ Mobile app — no use case
❌ Support for all 155 languages — JS/TS + Python is 80% of the market
❌ Real-time collaboration cursor — not needed V1
❌ On-prem until you have 3 customers asking for it
Week 1: Local CLI indexes JS/TS repo into FalkorDB graph
Week 2: MCP server with 14 tools, works with Claude Code locally
Week 3: GitHub webhook → auto-reindex on push, deployed to Railway
Week 4: Graph Explorer UI live at app.codegraph.dev
Week 5: Auth, billing (Stripe), team invites — production-ready
Week 6: Product Hunt launch
Month 3: $2K MRR target
Month 6: $5K MRR target
Month 12: $8K MRR target, explore Series A or stay profitable
# Developer CLI (optional companion)
npx codegraph init # connect current repo
npx codegraph status # graph health + node count
npx codegraph query "what calls useAuth" # natural language query
npx codegraph notes add ./src/auth.ts "JWT lives here"
npx codegraph export --format json # export graph data// Node creation
CREATE (:File {
id: string,
path: string,
language: string,
size_bytes: integer,
last_modified: datetime,
repo_id: string
})
CREATE (:Function {
id: string,
name: string,
file_path: string,
line_start: integer,
line_end: integer,
is_exported: boolean,
repo_id: string
})
CREATE (:Component {
id: string,
name: string,
file_path: string,
props: string[],
repo_id: string
})
// Edge creation
MATCH (a:File {path: 'src/auth.ts'}), (b:File {path: 'src/utils.ts'})
CREATE (a)-[:IMPORTS {line: 3}]->(b)
MATCH (f:Function {name: 'validateToken'}), (g:Function {name: 'decodeJWT'})
CREATE (f)-[:CALLS {call_count: 1}]->(g)
// Query examples
MATCH (f:Function)-[:CALLS*1..3]->(target:Function {name: 'useAuth'})
RETURN f.name, f.file_path
MATCH (a:File)-[r:CO_CHANGES]->(b:File)
WHERE r.frequency > 3
RETURN a.path, b.path, r.frequency ORDER BY r.frequency DESCBuilt by Lean Labs · codegraph.dev "Give your AI coding agent a memory."