# tripathyjayesh/api-dependabot architecture

> Architecture diagram of the GitHub repository tripathyjayesh/api-dependabot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tripathyjayesh/api-dependabot
- Repository: https://github.com/tripathyjayesh/api-dependabot

## Overview

API Dependabot compares OpenAPI specifications, searches Java/Spring consumer repositories for affected code, and ranks contract and repository evidence for migration questions. Its principal flow is CLI request → contract diff → repository impact analysis and evidence retrieval → optional single-pass RAG or read-only ReAct answer. Local repositories and GitHub checkouts are supported. The README documents these capabilities; sampled source confirms key service calls, but some CLI wiring and diff internals were not fully excerpted.

Main entry points: [`src/main/java/org/apidependabot/diff/DiffCommandRunner.java`](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/diff/DiffCommandRunner.java) (CLI orchestration), [`src/main/java/org/apidependabot/answer/ReActAnswerService.java`](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/ReActAnswerService.java) (ReAct agent), [`src/main/java/org/apidependabot/answer/ReActRepositoryTools.java`](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/ReActRepositoryTools.java) (Repository tools), [`src/main/java/org/apidependabot/retrieval/LexicalRetrievalService.java`](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/retrieval/LexicalRetrievalService.java) (Lexical retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["CLI workflow"]
  node_cli["CLI orchestration"]
  node_result["Diff and guidance"]
end

subgraph group_contracts["Contract analysis"]
  node_specs["OpenAPI specs"]
  node_diff["OpenAPI diff"]
end

subgraph group_repository["Repository analysis"]
  node_checkout["Repository access"]
  node_search["Java impact search"]
  node_retrieval["Lexical retrieval"]
end

subgraph group_answers["Migration assistance"]
  node_vanilla["Vanilla RAG"]
  node_react["ReAct agent"]
  node_tools["Repository tools"]
end

node_user(("Engineer"))
node_github["GitHub"]
node_model["Chat model"]

node_user -->|"submits request"| node_cli
node_cli -->|"reads specs"| node_specs
node_cli -->|"requests comparison"| node_diff
node_cli -->|"opens repository"| node_checkout
node_checkout -->|"clones repository"| node_github
node_cli -->|"searches Java"| node_search
node_diff -->|"derives search terms"| node_search
node_cli -->|"requests evidence"| node_retrieval
node_cli -->|"requests answer"| node_vanilla
node_vanilla -->|"calls model"| node_model
node_cli -->|"requests agent"| node_react
node_react -->|"registers tools"| node_tools
node_react -->|"calls model"| node_model
node_tools -->|"searches terms"| node_search
node_tools -->|"retrieves chunks"| node_retrieval
node_retrieval -->|"ranks evidence"| node_result
node_cli -->|"emits results"| node_result

click node_cli "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/diff/DiffCommandRunner.java"
click node_diff "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/diff/OpenApiDiffService.java"
click node_checkout "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/repository/GitHubRepositoryService.java"
click node_search "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/repository/JavaSourceSearchService.java"
click node_retrieval "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/retrieval/LexicalRetrievalService.java"
click node_vanilla "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/VanillaRagAnswerService.java"
click node_react "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/ReActAnswerService.java"
click node_tools "https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/ReActRepositoryTools.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_result toneBlue
class node_specs,node_diff toneAmber
class node_checkout,node_search,node_retrieval toneMint
class node_vanilla,node_react,node_tools toneRose
class node_user,node_github,node_model toneIndigo
```

## Components

### CLI workflow

- [CLI orchestration](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/diff/DiffCommandRunner.java): `src/main/java/org/apidependabot/diff/DiffCommandRunner.java`
- **Diff and guidance**

### Contract analysis

- **OpenAPI specs**
- [OpenAPI diff](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/diff/OpenApiDiffService.java): `src/main/java/org/apidependabot/diff/OpenApiDiffService.java`

### Repository analysis

- [Repository access](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/repository/GitHubRepositoryService.java): `src/main/java/org/apidependabot/repository/GitHubRepositoryService.java`
- [Java impact search](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/repository/JavaSourceSearchService.java): `src/main/java/org/apidependabot/repository/JavaSourceSearchService.java`
- [Lexical retrieval](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/retrieval/LexicalRetrievalService.java): `src/main/java/org/apidependabot/retrieval/LexicalRetrievalService.java`

### Migration assistance

- [Vanilla RAG](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/VanillaRagAnswerService.java): `src/main/java/org/apidependabot/answer/VanillaRagAnswerService.java`
- [ReAct agent](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/ReActAnswerService.java): `src/main/java/org/apidependabot/answer/ReActAnswerService.java`
- [Repository tools](https://github.com/tripathyjayesh/api-dependabot/blob/main/src/main/java/org/apidependabot/answer/ReActRepositoryTools.java): `src/main/java/org/apidependabot/answer/ReActRepositoryTools.java`

### Other components

- **Engineer**
- **GitHub**
- **Chat model**

## Connections

- Engineer → CLI orchestration: submits request (evidence: `README.md`)
- CLI orchestration → OpenAPI specs: reads specs (evidence: `README.md`)
- CLI orchestration → OpenAPI diff: requests comparison (evidence: `src/main/java/org/apidependabot/diff/DiffCommandRunner.java`)
- CLI orchestration → Repository access: opens repository (evidence: `src/main/java/org/apidependabot/diff/DiffCommandRunner.java`)
- Repository access → GitHub: clones repository (evidence: `src/main/java/org/apidependabot/repository/GitHubRepositoryService.java`)
- CLI orchestration → Java impact search: searches Java (evidence: `src/main/java/org/apidependabot/diff/DiffCommandRunner.java`)
- OpenAPI diff → Java impact search: derives search terms (evidence: `README.md`)
- CLI orchestration → Lexical retrieval: requests evidence (evidence: `src/main/java/org/apidependabot/diff/DiffCommandRunner.java`)
- CLI orchestration → Vanilla RAG: requests answer (evidence: `src/main/java/org/apidependabot/diff/DiffCommandRunner.java`)
- Vanilla RAG → Chat model: calls model (evidence: `src/main/java/org/apidependabot/answer/VanillaRagAnswerService.java`)
- CLI orchestration → ReAct agent: requests agent (evidence: `src/main/java/org/apidependabot/diff/DiffCommandRunner.java`)
- ReAct agent → Repository tools: registers tools (evidence: `src/main/java/org/apidependabot/answer/ReActAnswerService.java`)
- ReAct agent → Chat model: calls model (evidence: `src/main/java/org/apidependabot/answer/ReActAnswerService.java`)
- Repository tools → Java impact search: searches terms (evidence: `src/main/java/org/apidependabot/answer/ReActRepositoryTools.java`)
- Repository tools → Lexical retrieval: retrieves chunks (evidence: `src/main/java/org/apidependabot/answer/ReActRepositoryTools.java`)
- Lexical retrieval → Diff and guidance: ranks evidence (evidence: `README.md`)
- CLI orchestration → Diff and guidance: emits results (evidence: `README.md`)
