# amitpandey1992/java-gke-cicd architecture

> Architecture diagram of the GitHub repository amitpandey1992/java-gke-cicd, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amitpandey1992/java-gke-cicd
- Repository: https://github.com/amitpandey1992/java-gke-cicd

## Overview

This repository’s documented primary product is a CI/CD failure analyzer: it retrieves build logs, prepares them for analysis, reuses similar past failures or invokes an AI provider, then returns and records a suggested fix. It also exposes feedback and dashboard statistics, and documents Slack notifications. The graph uses README-described capabilities where source excerpts are incomplete; the dashboard JavaScript excerpt currently uses demo data, so its live connection to the statistics API is not shown.

Main entry points: [`app/api/analyze.py`](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/api/analyze.py) (Analyze API), [`app/ai_engine`](https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/ai_engine) (AI engine), [`app/database/postgres_client.py`](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/database/postgres_client.py) (Postgres access), [`app/ingestion`](https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/ingestion) (CI log fetchers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Failure analysis"]
  node_analyze_api["Analyze API<br/>[analyze.py]"]
  node_ci_fetchers["CI log fetchers"]
  node_log_cleanup["Log preparation"]
  node_ai_engine["AI engine"]
  node_ai_factory["Provider selection<br/>[ai_factory.py]"]
  node_prompt_builder["Prompt builder<br/>[prompt_builder.py]"]
end

subgraph group_memory["Analysis memory"]
  node_memory_search["Similarity search"]
  node_chroma[("ChromaDB memory<br/>[chromadb_store.py]")]
  node_feedback_api["Feedback API<br/>[feedback.py]"]
end

subgraph group_reporting["Reporting"]
  node_postgres_client["Postgres access<br/>[postgres_client.py]"]
  node_postgres[("PostgreSQL<br/>[models.py]")]
  node_dashboard_api["Dashboard stats API<br/>[dashboard.py]"]
  node_dashboard_ui["Metrics dashboard<br/>[charts.js]"]
end

subgraph group_integrations["External integrations"]
  node_slack_notifier["Slack notifications<br/>[slack_notifier.py]"]
end

node_user(("API caller"))
node_jenkins(("Jenkins"))
node_github_actions(("GitHub Actions"))
node_teamcity(("TeamCity"))
node_llm_provider(("Ollama or Vertex AI"))
node_slack(("Slack"))

node_user -->|"submits analysis"| node_analyze_api
node_analyze_api -->|"fetches logs"| node_ci_fetchers
node_jenkins -->|"provides logs"| node_ci_fetchers
node_github_actions -->|"provides logs"| node_ci_fetchers
node_teamcity -->|"provides logs"| node_ci_fetchers
node_analyze_api -->|"sanitizes and truncates"| node_log_cleanup
node_analyze_api -->|"searches failures"| node_memory_search
node_memory_search -->|"queries"| node_chroma
node_analyze_api -->|"analyzes unmatched logs"| node_ai_engine
node_ai_engine -->|"selects provider"| node_ai_factory
node_ai_engine -->|"builds prompt"| node_prompt_builder
node_ai_engine -->|"requests analysis"| node_llm_provider
node_analyze_api -->|"stores analysis"| node_chroma
node_analyze_api -->|"records result"| node_postgres_client
node_postgres_client -->|"reads and writes"| node_postgres
node_user -->|"submits feedback"| node_feedback_api
node_feedback_api -->|"updates feedback"| node_postgres_client
node_user -->|"requests statistics"| node_dashboard_api
node_dashboard_api -->|"loads statistics"| node_postgres_client
node_dashboard_ui -.->|"live wiring unshown"| node_dashboard_api
node_slack_notifier -.->|"sends summary"| node_slack

click node_analyze_api "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/api/analyze.py"
click node_ci_fetchers "https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/ingestion"
click node_log_cleanup "https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/processing"
click node_ai_engine "https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/ai_engine"
click node_ai_factory "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/ai_engine/ai_factory.py"
click node_prompt_builder "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/ai_engine/prompt_builder.py"
click node_memory_search "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/memory/similarity_search.py"
click node_chroma "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/memory/chromadb_store.py"
click node_feedback_api "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/api/feedback.py"
click node_postgres_client "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/database/postgres_client.py"
click node_postgres "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/database/models.py"
click node_dashboard_api "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/api/dashboard.py"
click node_dashboard_ui "https://github.com/amitpandey1992/java-gke-cicd/blob/main/dashboard/charts.js"
click node_slack_notifier "https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/notifications/slack_notifier.py"

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_analyze_api,node_ci_fetchers,node_log_cleanup,node_ai_engine,node_ai_factory,node_prompt_builder toneBlue
class node_memory_search,node_chroma,node_feedback_api toneAmber
class node_postgres_client,node_postgres,node_dashboard_api,node_dashboard_ui,node_user toneMint
class node_slack_notifier toneRose
class node_jenkins,node_github_actions,node_teamcity,node_llm_provider,node_slack toneIndigo
```

## Components

### Failure analysis

- [Analyze API](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/api/analyze.py): `app/api/analyze.py`
- [CI log fetchers](https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/ingestion): `app/ingestion`
- [Log preparation](https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/processing): `app/processing`
- [AI engine](https://github.com/amitpandey1992/java-gke-cicd/tree/main/app/ai_engine): `app/ai_engine`
- [Provider selection](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/ai_engine/ai_factory.py): `app/ai_engine/ai_factory.py`
- [Prompt builder](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/ai_engine/prompt_builder.py): `app/ai_engine/prompt_builder.py`

### Analysis memory

- [Similarity search](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/memory/similarity_search.py): `app/memory/similarity_search.py`
- [ChromaDB memory](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/memory/chromadb_store.py): `app/memory/chromadb_store.py`
- [Feedback API](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/api/feedback.py): `app/api/feedback.py`

### Reporting

- [Postgres access](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/database/postgres_client.py): `app/database/postgres_client.py`
- [PostgreSQL](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/database/models.py): `app/database/models.py`
- [Dashboard stats API](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/api/dashboard.py): `app/api/dashboard.py`
- [Metrics dashboard](https://github.com/amitpandey1992/java-gke-cicd/blob/main/dashboard/charts.js): `dashboard/charts.js`

### External integrations

- [Slack notifications](https://github.com/amitpandey1992/java-gke-cicd/blob/main/app/notifications/slack_notifier.py): `app/notifications/slack_notifier.py`

### Other components

- **API caller**
- **Jenkins**
- **GitHub Actions**
- **TeamCity**
- **Ollama or Vertex AI**
- **Slack**

## Connections

- API caller → Analyze API: submits analysis
- Analyze API → CI log fetchers: fetches logs
- Jenkins → CI log fetchers: provides logs
- GitHub Actions → CI log fetchers: provides logs
- TeamCity → CI log fetchers: provides logs
- Analyze API → Log preparation: sanitizes and truncates
- Analyze API → Similarity search: searches failures
- Similarity search → ChromaDB memory: queries
- Analyze API → AI engine: analyzes unmatched logs
- AI engine → Provider selection: selects provider
- AI engine → Prompt builder: builds prompt
- AI engine → Ollama or Vertex AI: requests analysis
- Analyze API → ChromaDB memory: stores analysis
- Analyze API → Postgres access: records result
- Postgres access → PostgreSQL: reads and writes
- API caller → Feedback API: submits feedback
- Feedback API → Postgres access: updates feedback
- API caller → Dashboard stats API: requests statistics
- Dashboard stats API → Postgres access: loads statistics
- Metrics dashboard → Dashboard stats API: live wiring unshown
- Slack notifications → Slack: sends summary
