Part of the Discovery Engine epic #125.
Scope — routes/endpoints from loaded JS bundles (most advanced)
SPA route tables and API URLs are often statically defined in the app's JS. Extract them from the already-loaded bundles (in the browser) — this surfaces routes/endpoints without any clicking.
- Framework fingerprint:
window.ng/__NG*, __REACT*, window.__VUE*, __NEXT_DATA__, script-src patterns → run only relevant extractors.
js-route detectors (per framework):
- Angular:
RouterModule.forRoot([...]) / loadChildren / route metadata.
- React Router:
createBrowserRouter([...]), <Route path>, route manifest.
- Vue Router:
routes: [{ path }].
- Next.js:
__NEXT_DATA__, build/route manifest.
api-call detector: mine fetch("/api/..."), axios.<m>("/..."), template-literal URLs, baseURL/API_BASE constants → endpoints.
Honest fragility
Minified/obfuscated bundles make regex/AST extraction brittle. Mitigations: prefer source-maps when present; emit with a confidence score; treat as best-effort seeds (the crawl/LLM still validate). This is why it's the last phase and modular per framework.
Commits (granular)
Fingerprint → bundle collection (loaded scripts) → source-map detection → Angular route extractor → React extractor → Vue extractor → Next.js extractor → api-call URL miner → base-url resolution → confidence scoring → emit → per-extractor tests.
Part of the Discovery Engine epic #125.
Scope — routes/endpoints from loaded JS bundles (most advanced)
SPA route tables and API URLs are often statically defined in the app's JS. Extract them from the already-loaded bundles (in the browser) — this surfaces routes/endpoints without any clicking.
window.ng/__NG*,__REACT*,window.__VUE*,__NEXT_DATA__, script-src patterns → run only relevant extractors.js-routedetectors (per framework):RouterModule.forRoot([...])/loadChildren/ route metadata.createBrowserRouter([...]),<Route path>, route manifest.routes: [{ path }].__NEXT_DATA__, build/route manifest.api-calldetector: minefetch("/api/..."),axios.<m>("/..."), template-literal URLs,baseURL/API_BASEconstants → endpoints.Honest fragility
Minified/obfuscated bundles make regex/AST extraction brittle. Mitigations: prefer source-maps when present; emit with a confidence score; treat as best-effort seeds (the crawl/LLM still validate). This is why it's the last phase and modular per framework.
Commits (granular)
Fingerprint → bundle collection (loaded scripts) → source-map detection → Angular route extractor → React extractor → Vue extractor → Next.js extractor → api-call URL miner → base-url resolution → confidence scoring → emit → per-extractor tests.