<!-- llms-txt: https://hydron.app/llms.txt -->
<!-- llms-full-txt: https://hydron.app/llms-full.txt -->
<!-- canonical: https://hydron.app/docs/code-analysis -->

# Code Analysis

Code analysis is Hydron's process for understanding your application. The AI scans your repository to detect languages, frameworks, services, dependencies, and configuration requirements.

## What gets analyzed

When you connect a Git repository, Hydron examines:

| File type | What's extracted |
|-----------|-----------------|
| **Package files** (`package.json`, `requirements.txt`, `Gemfile`, etc.) | Dependencies, build scripts, entry points |
| **Dockerfiles** | Existing container configurations |
| **Config files** (`.env.example`, `config/`, etc.) | Environment variables, settings |
| **Source code** | Framework detection, port usage, service boundaries |
| **CI/CD files** (`.github/workflows/`, `Jenkinsfile`, etc.) | Build and deploy patterns |
| **Documentation** (`README.md`, `docs/`) | Project description and setup instructions |

## Supported languages and frameworks

Hydron supports a wide range of technologies:

### Backend

| Language | Frameworks |
|----------|-----------|
| **Node.js** | Express, Fastify, NestJS, Koa, Hapi |
| **Python** | Django, Flask, FastAPI, Celery |
| **Ruby** | Rails, Sinatra |
| **Java** | Spring Boot, Quarkus |
| **Go** | Gin, Echo, Fiber |
| **PHP** | Laravel, Symfony |
| **Rust** | Actix, Axum, Rocket |
| **.NET** | ASP.NET Core |

### Frontend

| Framework | Description |
|-----------|-------------|
| **React** | Including Next.js, Gatsby, Remix |
| **Vue.js** | Including Nuxt.js |
| **Angular** | All major versions |
| **Svelte** | Including SvelteKit |
| **Static sites** | HTML/CSS/JS, Hugo, Jekyll, 11ty |

### Databases & services

| Category | Technologies |
|----------|-------------|
| **SQL databases** | PostgreSQL, MySQL, MariaDB, SQLite |
| **NoSQL databases** | MongoDB, Redis, Elasticsearch |
| **Message queues** | RabbitMQ, Kafka, BullMQ |
| **Search** | Elasticsearch, Meilisearch |

## The analysis process

Code analysis happens in several steps:

1. **Clone Repository** — Download source code from Git
2. **File Discovery** — Scan directory structure, identify key files
3. **Language Detection** — Determine programming languages used
4. **Framework Detection** — Identify frameworks from dependencies and code patterns
5. **Service Discovery** — Find deployable components and their boundaries
6. **Configuration Extraction** — Extract environment variables and settings
7. **Dockerfile Analysis** — Check for existing Dockerfiles, assess quality
8. **Report Generation** — Compile findings into a structured analysis report

![The AI performing code analysis with results streaming in real-time](/images/docs/chat-interface.png)

## Analysis results

After analysis completes, you'll see results in two places:

### In the chat
The AI provides a summary of what it found:

- Number of services detected
- Key technologies identified
- Required environment variables
- Recommendations for Dockerfiles
- Any issues or warnings

### In the sidebar
The **Services** tab shows detailed results:

- Each detected service with its configuration
- Accept/reject controls for each service
- Dockerfile preview and editing
- Environment variable list

## Monorepo support

Hydron handles monorepos by detecting multiple services within a single repository:

Each service in a monorepo gets its own:
- Dockerfile with correct build context
- Environment variables
- Port configuration
- Health check settings

## Rerunning analysis

You can rerun the code analysis at any time by asking the AI:

- "Reanalyze the repository"
- "Check for new services"
- "Update the analysis with the latest code"

This is useful after you've pushed changes to your repository or if you want the AI to focus on a specific directory.

## Limitations

- **Binary files** are skipped (images, compiled assets, etc.)
- **Very large repositories** (>1GB) may have longer analysis times
- **Obfuscated or minified code** may not be fully analyzed
- **Custom or niche frameworks** may require manual configuration hints

If the AI misses something, you can always provide additional context through the chat. For example: "This project uses a custom Python framework based on Flask — treat it like a Flask app."
