Graphs from source
Paste a public GitHub repo. Haywire parses the code and graphs the functions, modules, and calls.
See how it worksHow it works
checkout.ts
source
1import { requireUser } from "../auth";2import { StripeClient } from "../billing/stripe";3import { Inventory } from "../catalog/inventory";4import { Orders } from "../db/orders";56export async function createCheckout(req: Request) {7 const user = await requireUser(req);8 const cart = await Inventory.loadCart(user.id);9 return chargeCart(user, cart);10}1112async function chargeCart(user: User, cart: Cart) {13 const session = await StripeClient.sessions.create({14 customer: user.stripeId,15 line_items: cart.lines,16 success_url: "/orders",17 });18 await Orders.insert({ userId: user.id, sessionId: session.id });19 return Response.json({ url: session.url });20}2122export async function handleWebhook(event: Stripe.Event) {23 if (event.type !== "checkout.session.completed") return;24 const order = await Orders.bySession(event.data.object.id);25 await Inventory.commit(order.cartId);26 await Orders.markPaid(order.id);27}
graph
0 nodes · 0 edges
checkout.ts. Two handlers, four imports.
from createCheckout
Click a function. Haywire lights up what it calls, then what those call, one hop at a time.
who_calls("createCheckout")
who_calls, trace_path, and find_symbol pull a small subgraph. Chat reads that instead of 200 source files, so the same question uses far fewer tokens.
8 to 12 modules on a 16 by 12 grid. Streets are file dependencies. Click a building to see what it talks to.
Functions that call each other a lot sit in the same cluster. Drag a node. Click a group to hide the rest.
Public GitHub repos. Paste owner/repo or a github.com URL. Private repos stay out; we don't use a GitHub token to clone.
No. A tree-sitter pass over a shallow clone does. Models show up later, when you query or generate a map.
The full graph is stored. The canvas only draws about 3,500 nodes and 8,000 edges so layout stays usable. Queries still run on the full graph.
EXTRACTED is a call, import, or write the parser actually saw. INFERRED is a guess, drawn dashed. You can filter either in the graph UI.
From the graph, not the README. Haywire sends a short file/symbol summary to a model, asks for 8 to 12 modules on a 16 by 12 grid, and you can drag the buildings. If a repo won't compress into at least three modules, we don't draw a map.
Yes. The app, extract backend, and this landing page live at github.com/vmath20/haywire.