Framework Detection
Framework analyzers extend the base language analysis with framework-specific intelligence. They detect HTTP routes, dependency injection patterns, event handlers, ORM models, and other framework conventions that language analyzers alone cannot identify.
How framework detection works
Section titled “How framework detection works”Framework analyzers run after language analyzers in the indexing pipeline. They use the import edges extracted during the language pass to detect which frameworks a codebase uses. If a file imports org.springframework.web.bind.annotation.RestController, the Spring framework analyzer activates for that file.
Each framework analyzer implements the FrameworkAnalyzer interface, which extends the base Analyzer with a DetectFramework() method. This method examines import edges and returns whether the framework is present in the file. If detected, the framework analyzer runs its own tree-sitter queries to extract framework-specific patterns.
This two-pass approach means framework analyzers only process files that actually use the framework, keeping analysis fast and avoiding false positives.
Supported frameworks
Section titled “Supported frameworks”| Framework | What it detects |
|---|---|
| Spring Boot / Spring MVC | REST controllers, @Service/@Repository beans, Spring Security configuration, JPA entities, Spring Data repositories |
| Framework | What it detects |
|---|---|
| Gin | HTTP routes, middleware chains, handler groups |
| Echo | HTTP routes, middleware, groups |
| Chi | HTTP routes, middleware, route patterns |
Python
Section titled “Python”| Framework | What it detects |
|---|---|
| FastAPI | Route decorators, dependency injection, Pydantic models |
| Django / DRF | URL patterns, views, serializers, models, signals |
| Flask | Route decorators, blueprints |
| Celery | Task definitions, beat schedules |
TypeScript / JavaScript
Section titled “TypeScript / JavaScript”| Framework | What it detects |
|---|---|
| Express | Route handlers, middleware |
| NestJS | Controllers, providers, modules, guards |
| Next.js | Pages, API routes, middleware |
| Fastify | Route handlers, plugins |
| Framework | What it detects |
|---|---|
| ASP.NET Core | Controllers, middleware, DI services, Entity Framework models |
| Azure Functions | Function triggers, bindings |
| MassTransit | Message consumers, sagas |
| Framework | What it detects |
|---|---|
| Rails | Controllers, models, routes, ActiveJob jobs, concerns |
| ActiveJob | Job classes, queue adapters |
| Sidekiq | Workers, scheduled jobs |
| Framework | What it detects |
|---|---|
| Laravel | Controllers, routes, middleware, Eloquent models |
| Guzzle | HTTP client usage |
Infrastructure as Code
Section titled “Infrastructure as Code”| Framework | What it detects |
|---|---|
| Terraform | Resources, modules, providers, data sources |
What framework detection adds
Section titled “What framework detection adds”Framework-specific analysis produces intelligence that pure language analysis misses:
Entry points - Language analyzers see function definitions, but framework analyzers identify which functions are HTTP route handlers, message consumers, or scheduled tasks. This is critical for entry point mapping and impact analysis.
Dependency injection - Frameworks like Spring, NestJS, and ASP.NET Core use DI containers that create runtime relationships invisible to static analysis. Framework analyzers extract @Service, @Injectable, and similar annotations to map the DI graph.
Event topology - Message-driven frameworks (Celery, MassTransit, Sidekiq, Rails ActiveJob) define producers and consumers that communicate through queues or topics. Framework analyzers extract task definitions and subscriptions to build the event catalog.
ORM models - JPA entities, Django models, Eloquent models, and Entity Framework classes define the data layer. Framework analyzers extract table mappings, column definitions, and relationships.
Route patterns - HTTP frameworks define URL patterns with path parameters, middleware chains, and authentication guards. Framework analyzers extract the full route tree with metadata.
Pipeline order
Section titled “Pipeline order”The indexing pipeline processes analyzers in this order:
- Language analyzers - Parse ASTs and extract symbols, references, call edges, and import edges.
- Framework analyzers - Use import edges from step 1 to detect frameworks, then run framework-specific tree-sitter queries.
- Text analyzers - Process non-AST files (OpenAPI, SQL DDL, Maven POM, properties) that fell through to the text analyzer fallback.
All three analyzer types produce the same IndexOutput structure and follow the same batch upload path to the API server.
Next steps
Section titled “Next steps”- Review supported languages for the base language analysis capabilities
- Configure the indexer for your repository