Endpoint Map
Open a backend project and see every endpoint listed. Click one and get a map of how a request travels through the code:
route -> middleware -> handler -> services / repositories -> database / external APIs -> response
Made for handovers and onboarding: a new developer can learn what an endpoint does without opening twenty files.
Supported
| Framework |
What is detected |
| Express |
app/router.get/post/..., app.use('/prefix', router) across files, middleware, inline handlers |
| Next.js |
App Router app/**/route.ts (GET/POST/...), Pages Router pages/api/**, dynamic [id] segments, (groups) |
| Flask |
@app.route, @bp.route(methods=[...]), @app.get, Blueprint url_prefix and register_blueprint overrides |
| FastAPI |
@router.get(...), APIRouter(prefix=), include_router(prefix=), Depends(...) shown as middleware |
| Go |
net/http (incl. Go 1.22 "GET /x"), gin, echo, chi (incl. nested r.Route, r.With(mw)), gorilla/mux; groups followed through variables and helper functions |
Which scanners run is decided automatically from package.json, requirements.txt, pyproject.toml and go.mod.
Using it
- Click the Endpoint Map icon in the Activity Bar. All routes are listed, grouped by resource, with colored method dots.
- Search: the magnifier button filters the list ("post users"); or run Endpoint Map: Search and Open Route Map from the Command Palette.
- Click a route to open its map. Each box shows the function, file:line and a short description (from the docstring/comment, otherwise made from the function name, shown in italics).
- Open file / Go to function on any box opens the code beside the map and highlights the function.
- Hover a box to light up its whole path. Click a legend chip to hide a kind of box (e.g. utilities). Use the Depth slider to follow more or fewer levels.
- A View map link also appears above every route definition in the editor.
Dashed lines/boxes mean "probably, but not proven" (guessed by function name). The map never pretends otherwise.
How it works
- Route scanner (
src/scanners/*): regex/bracket-matching over your source files. No language server needed. Verified by npm test, which runs the scanners against small fake projects.
- Call tracing (
src/callGraph.ts): starts at the handler and uses VS Code's own Go to Definition / Document Symbols to follow each call into the next project function. That means the TypeScript, Python (Pylance) and Go extensions give the best results. Calls into node_modules, site-packages, vendor or the standard library are not followed.
- Classification: database calls (
prisma.*, db.*, session.*...), outgoing HTTP (axios, requests, http.Get...) and response sites (res.json, JSONResponse, c.JSON, NextResponse.json...) are recognised by name and drawn as their own boxes. Status codes seen are listed on the Response box.
- Map: a plain webview (no external libraries) with layered left-to-right layout, pan and zoom.
Run it
npm install
npm run compile
npm test # scanner self-test
Then open this folder in VS Code and press F5 to start an Extension Development Host. Open any backend project in that window.
To build an installable file: npm run package (creates a .vsix; install via Extensions > ... > Install from VSIX).
Known limits (honest list)
- Dynamic wiring is invisible to static analysis: dependency injection containers,
getattr, reflection, event emitters, callbacks stored in variables. Interface calls are followed to an implementation only when the language server can find one.
- Express:
app.route('/x').get().post() chains and routes registered inside loops are not detected. Global app.use(mw) middleware is not attached to each route.
- Go: routers passed through struct fields or returned from functions lose their prefix (the route still shows, with a shorter path).
- Python: routes added with
add_url_rule / add_api_route are not detected.
- Call tracing needs a language server for each language; without one you still get the route list, handler, database/external/response boxes, but fewer service boxes. The map shows a warning when this happens.
Ideas for next steps
- AI-written one-line summaries for functions without comments (cache per function hash).
- Export the map as Mermaid / PNG / Markdown for handover documents.
- Show request/response shapes (Zod / Pydantic / struct types) on the handler box.
- More frameworks: NestJS, Django REST, Gin-only apps with swagger annotations, Hono, Fastify.
| |