Skip to main content

Supported languages

Dorgu detects the primary language of your application by looking for well-known manifest files in the project root:
LanguageDetection FileKey Identifier
JavaScript / Node.jspackage.jsonpackage.json exists
Pythonrequirements.txt, pyproject.toml, setup.py, PipfileAny Python manifest present
Gogo.modgo.mod exists
Javapom.xmlpom.xml exists
RubyGemfileGemfile exists
RustCargo.tomlCargo.toml exists
If multiple language files are detected (e.g., both package.json and requirements.txt), Dorgu uses heuristics and the Dockerfile base image to determine the primary language.

Supported frameworks

Once the language is identified, Dorgu inspects dependency manifests to detect the framework in use:
FrameworkLanguageDetection Method
ExpressNode.js"express" in package.json dependencies
FastifyNode.js"fastify" in package.json dependencies
NestJSNode.js"@nestjs/core" in package.json dependencies
FastAPIPython"fastapi" in requirements
DjangoPython"django" in requirements
FlaskPython"flask" in requirements
GinGo"github.com/gin-gonic/gin" in go.mod
EchoGo"github.com/labstack/echo" in go.mod
Spring BootJavaspring-boot in pom.xml
RailsRuby"rails" in Gemfile
ActixRust"actix-web" in Cargo.toml
Framework detection influences the generated manifests — for example, a Spring Boot app gets a default port of 8080 and JVM-appropriate resource limits, while an Express app defaults to port 3000 with lower memory requirements.

Health endpoint detection

Dorgu scans your source code for common health endpoint patterns. When found, these are used to configure liveness and readiness probes in the generated Kubernetes manifests. Detected endpoints:
  • /health
  • /healthz
  • /ping
  • /ready
  • /readyz
  • /livez
  • /status
The scanner looks for route registrations in your source code (e.g., app.get("/health", ...) in Express, @app.get("/health") in FastAPI, r.GET("/health", ...) in Gin). If multiple health endpoints are found, Dorgu uses /healthz or /health for liveness and /readyz or /ready for readiness probes.

Metrics endpoint detection

Dorgu also checks for Prometheus-compatible metrics endpoints:
  • /metrics
  • /prometheus
When a metrics endpoint is detected, the generated manifests include Prometheus scrape annotations on the pod template:
annotations:
  prometheus.io/scrape: "true"
  prometheus.io/port: "8080"
  prometheus.io/path: "/metrics"

Dependency extraction

Dorgu reads dependencies from each language’s standard manifest file to understand the application’s technology stack:
LanguageManifest FileWhat is extracted
Node.jspackage.jsondependencies and devDependencies
Pythonrequirements.txtPackage names and version specifiers
Gogo.modrequire block entries
Javapom.xml<dependency> elements
RubyGemfilegem declarations
RustCargo.toml[dependencies] table entries
Extracted dependencies are used for framework detection, identifying database drivers (to suggest appropriate resource limits), and populating the persona’s dependency metadata.

LLM-enhanced detection

When using the --llm-provider flag, the LLM augments static analysis with deeper understanding:
dorgu generate . --llm-provider openai
The LLM can identify:
  • Frameworks not in the static detection list — less common or newer frameworks
  • Architectural patterns — microservice vs monolith, event-driven, CQRS
  • Resource sizing recommendations — based on the application’s actual code patterns
  • Security practices — identifying sensitive data handling, authentication mechanisms
LLM analysis results are merged with static analysis — static detection always takes precedence for known frameworks to ensure deterministic behavior.

Adding support

Framework detection logic lives in internal/analyzer/code.go in the Dorgu CLI repository. To add support for a new language or framework:
  1. Add the detection file to the language detection map
  2. Add the framework’s dependency identifier to the framework detection map
  3. Add default port and resource recommendations for the framework
Contributions are welcome — see the contributing guide for details.