Files
codegraph/site/src/content/docs/guides/framework-routes.md
T
Colby McHenry 2f3188eb49 docs: reframe value prop around precision/speed, update Node floor to 20, and expand language/framework coverage
- Benchmark table reordered to lead with tool calls, time, and file reads (the universal wins); cost and tokens moved right with a note that savings are scale-dependent, not a headline claim
- README/introduction/quickstart/installation messaging updated to "surgical context · fewer tool calls · faster answers" framing, dropping the "16% cheaper" headline
- Node engine floor raised from 18 to 20 in CLAUDE.md, package.json description updated
- `codegraph init` now creates and indexes in one step; the `-i` flag is retired (still accepted as a no-op)
- CLI reference expanded with new commands: `explore`, `node`, `unlock`, `daemon`, `telemetry`, `upgrade`, `version`, `help`
- MCP server docs clarified: single `codegraph_explore` tool exposed by default, others unlisted but re-enableable via `CODEGRAPH_MCP_TOOLS`
- Language support adds Objective-C, Astro, and R; framework routes adds Play, Vue Router/Nuxt, and Astro
- API reference documents lower-level exports and embedding requirements (Node 22.5+ for `node:sqlite`)
- Troubleshooting adds WSL/Windows dual-checkout guidance
- How-it-works updated: SQLite backend is now Node's built-in `node:sqlite` in WAL mode, not better-sqlite3/WASM
2026-06-22 09:45:57 -05:00

2.0 KiB

title, description
title description
Framework Routes CodeGraph links URL patterns to the handlers that serve them.

CodeGraph detects web-framework routing files and emits route nodes linked by references edges to their handler classes or functions. Querying the callers of a view or controller then surfaces the URL pattern that binds it.

Framework Shapes recognized
Django path(), re_path(), url(), include() in urls.py (CBV .as_view(), dotted paths)
Flask @app.route('/path', methods=[...]), blueprint routes
FastAPI @app.get(...), @router.post(...), all standard methods
Express app.get(...), router.post(...) with middleware chains
NestJS @Controller + @Get/@Post/..., GraphQL @Resolver + @Query/@Mutation, @MessagePattern/@EventPattern, @SubscribeMessage
Laravel Route::get(), Route::resource(), Controller@action, tuple syntax
Drupal *.routing.yml routes (_controller, _form, entity handlers); hook_* implementations in .module/.theme/.install/.inc
Rails get '/x', to: 'users#index', hash-rocket => syntax
Spring @GetMapping, @PostMapping, @RequestMapping on methods
Play GET/POST/… verb routes in conf/routesController.method actions (Scala + Java)
Gin / chi / gorilla / mux r.GET(...), router.HandleFunc(...)
Axum / actix / Rocket .route("/x", get(handler))
ASP.NET [HttpGet("/x")] attributes on action methods
Vapor app.get("x", use: handler)
React Router / SvelteKit Route component nodes
Vue Router / Nuxt pages/ file-based routes, server/api/ endpoints, route middleware
Astro src/pages/ file-based routes (.astro pages + .ts endpoints, [param]/[...rest] syntax)

Route resolution is automatic — there's nothing to configure. If a framework file is recognized, its routes appear in the graph after the next index or sync.