Skip to content

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.

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.

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
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
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
Framework What it detects
Terraform Resources, modules, providers, data sources

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.

The indexing pipeline processes analyzers in this order:

  1. Language analyzers - Parse ASTs and extract symbols, references, call edges, and import edges.
  2. Framework analyzers - Use import edges from step 1 to detect frameworks, then run framework-specific tree-sitter queries.
  3. 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.