Skip to content

About

CGraph knowledge graph (web+backend+packages) — queryable via graphify

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CGraph Graphify — Knowledge Graph for CGraph (web + backend + packages)

A queryable knowledge graph of the CGraph monorepo's web, backend, and packages slices (desktop/mobile/landing deferred until those apps start). Built with rhanka/graphify v1.0.

What's in the graph

Metric Value
Nodes 12,201
Edges 24,526
Communities 620
Nodes described 12,199 (DeepSeek-generated, via fill_descriptions.py)
Source files parsed 4,104 (AST) + 157 semantic (docs/config)

Top hubs: createLogger() (192), cn() (111), SocketManager (49), apiCall() (47), apiClient (44).

Query it

./graphify-query.sh "what connects the web app to the backend"
./graphify-query.sh path "api-client" "backend"
./graphify-query.sh explain stripe.tsx
./graphify-query.sh summary

Visual studio

# static bundle at .graphify/studio/ — serve it:
cd ~/Projects/Repos/CGraph-graphify/.graphify/studio && python3 -m http.server 8800
# open http://127.0.0.1:8800

Rebuild after code changes

# rebuild AST-only (fast, no LLM):
export PATH="$HOME/.local/share/mise/installs/node/22/bin:$HOME/.local/bin:$PATH"
cd ~/Projects/Repos/CGraph-graphify
node_modules/.bin/graphify update "$HOME/Projects/Repos/CGraph Umbrella"

# full rebuild with semantic extraction (needs the fence proxy -> DeepSeek):
# 1. start proxy:  FENCE_PROXY_UPSTREAM=https://api.deepseek.com/v1 python3 fence_proxy.py
# 2. OPENAI_API_KEY=dummy OPENAI_BASE_URL=http://127.0.0.1:18099/v1 \
#    node_modules/.bin/graphify extract "$HOME/Projects/Repos/CGraph Umbrella" \
#      --scope all --backend openai --model deepseek-chat --out .

How the semantic backend works (the hard-won path)

graphify v1 uses AI SDK v5, whose openai() provider defaults to the Responses API (input/output shapes) even for DeepSeek, which only speaks /chat/completions. The bundled fence_proxy.py translates:

  • request: input -> messages, flattens content-part arrays to strings
  • response: choices[].message.content -> Responses output[].content[] (including required annotations: [], logprobs: [], usage.input_tokens / output_tokens, id, status), and strips ```json fences.

Local ollama models (3B/phi-4-mini) are too weak for the strict extraction schema; DeepSeek-chat works through the proxy. Node 20+ required (mise: mise use -g node@22).

Files

  • fence_proxy.py — Responses<->Chat translation proxy (the fix that made semantic extraction work)
  • fill_descriptions.py — fills graphify's batch-NNN.json description answer files via DeepSeek, then graphify describe ingests them
  • graphify-query.sh — query wrapper for agents/terminal
  • .graphify/graph.json — the built graph (17MB, not committed to CGraph repo to avoid bloat)
  • .graphify/studio/ — static visual studio export (38MB)

About

CGraph knowledge graph (web+backend+packages) — queryable via graphify

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages