# joncykeda/ai-log-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/joncykeda/ai-log-analyzer
- Repository: https://github.com/joncykeda/ai-log-analyzer

## Overview

AI Log Analyzer is a small Streamlit application for uploading text logs, extracting likely errors, and requesting LLM analysis with root causes and suggested fixes. The user starts the flow in the UI; app.py coordinates parsing and optional AI analysis, while the analyzer sends the extracted entries to OpenAI. Parser and analyzer behavior is supported by the sampled source; the README documents the intended analysis results.

Main entry points: [`app.py`](https://github.com/joncykeda/ai-log-analyzer/blob/main/app.py) (Streamlit UI), [`utils/analyzer.py`](https://github.com/joncykeda/ai-log-analyzer/blob/main/utils/analyzer.py) (Log Analyzer), [`utils/parser.py`](https://github.com/joncykeda/ai-log-analyzer/blob/main/utils/parser.py) (Error Parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_developer(("Developer"))
node_app["Streamlit UI<br/>[app.py]"]
node_parser["Error Parser<br/>[parser.py]"]
node_analyzer["Log Analyzer<br/>[analyzer.py]"]
node_openai["OpenAI API"]

node_developer -->|"uploads logs"| node_app
node_app -->|"extracts errors"| node_parser
node_parser -->|"returns errors"| node_app
node_app -->|"requests analysis"| node_analyzer
node_analyzer -->|"requests insights"| node_openai
node_openai -->|"returns analysis"| node_analyzer
node_app -->|"displays results"| node_developer

click node_app "https://github.com/joncykeda/ai-log-analyzer/blob/main/app.py"
click node_parser "https://github.com/joncykeda/ai-log-analyzer/blob/main/utils/parser.py"
click node_analyzer "https://github.com/joncykeda/ai-log-analyzer/blob/main/utils/analyzer.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_developer toneIndigo
class node_app toneBlue
class node_parser,node_analyzer toneTeal
class node_openai toneMint
```

## Components

### Other components

- **Developer**
- [Streamlit UI](https://github.com/joncykeda/ai-log-analyzer/blob/main/app.py): `app.py`
- [Error Parser](https://github.com/joncykeda/ai-log-analyzer/blob/main/utils/parser.py): `utils/parser.py`
- [Log Analyzer](https://github.com/joncykeda/ai-log-analyzer/blob/main/utils/analyzer.py): `utils/analyzer.py`
- **OpenAI API**

## Connections

- Developer → Streamlit UI: uploads logs (evidence: `README.md`)
- Streamlit UI → Error Parser: extracts errors (evidence: `app.py`)
- Error Parser → Streamlit UI: returns errors (evidence: `app.py`)
- Streamlit UI → Log Analyzer: requests analysis (evidence: `app.py`)
- Log Analyzer → OpenAI API: requests insights (evidence: `utils/analyzer.py`)
- OpenAI API → Log Analyzer: returns analysis (evidence: `utils/analyzer.py`)
- Streamlit UI → Developer: displays results (evidence: `app.py`)
