# abhisheksingh1180/jirapilot architecture

> Architecture diagram of the GitHub repository abhisheksingh1180/jirapilot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhisheksingh1180/jirapilot
- Repository: https://github.com/abhisheksingh1180/jirapilot

## Overview

##### Project type and purpose
- JiraPilot is an automation/integration tool (open-source utility) whose goal is to listen for Jira events and automatically generate code via an LLM (Ollama) and push it back to GitHub.
- It is not a full-stack app but rather a “glue” script (code_generator.py) orchestrated by a GitHub Actions workflow (.github/workflows/codegen.yml).

##### File structure
- Top level:
- .github/workflows/codegen.yml – defines the event triggers and steps of the GitHub Action
- code_generator.py – Python entry point that implements the core logic: parsing Jira payload, calling Ollama API, writing files, committing and pushing
- requirements.txt – Python dependencies
- README.md / LICENSE – documentation
- There are no separate frontend/backend directories; the “architecture” is an event-driven pipeline.

##### README for additional insights
- Technology stack: Python, Ollama LLM, GitHub Actions, Jira Webhooks, GitHub REST API.

##### Detailed element checklist
- Jira → Runner (“Webhook: issue created”)
- Runner → Script (“Run codegen.py with payload”)
- Script → Ollama (“API call: prompt → code”)
- Script → Local FS (“Write code to /<path>”)
- Script → GitHub (“Check/version branch, commit & push”)
- External service vs. internal process vs. storage

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Components
    JIRA["Jira Webhook"]:::source
    subgraph "GitHub Actions Runner"
        GA["GitHub Actions Runner"]:::ci
    end
    CODE["Code Generator Script\n(code_generator.py)"]:::compute
    OLLAMA["Ollama LLM API"]:::external
    FS["Local Workspace\n(write files)"]:::storage
    GITAPI["GitHub REST API\n(branch & push)"]:::storage
    GHREP["GitHub Repository\n(feature branches)"]:::storage

    subgraph "Repository Files"
        REQ["requirements.txt"]:::docs
        README["README.md"]:::docs
        LIC["LICENSE"]:::docs
    end

    %% Sequence
    JIRA -->|"1 Webhook: issue created"| GA
    GA -->|"2 Run codegen.py with payload"| CODE
    CODE -->|"3 API call: prompt → code"| OLLAMA
    CODE -->|"4 Write generated code"| FS
    CODE -->|"5 Create/version branch, commit & push"| GITAPI
    GITAPI -->|"updates"| GHREP

    %% Click events
    click GA "https://github.com/abhisheksingh1180/jirapilot/blob/main/.github/workflows/codegen.yml"
    click CODE "https://github.com/abhisheksingh1180/jirapilot/blob/main/code_generator.py"
    click REQ "https://github.com/abhisheksingh1180/jirapilot/blob/main/requirements.txt"
    click README "https://github.com/abhisheksingh1180/jirapilot/blob/main/README.md"
    click LIC "https://github.com/abhisheksingh1180/jirapilot/tree/main/LICENSE"

    %% Styles
    classDef source fill:#add8e6,stroke:#333,stroke-width:1px;
    classDef ci fill:#90ee90,stroke:#333,stroke-width:1px;
    classDef compute fill:#ffcc99,stroke:#333,stroke-width:1px;
    classDef external fill:#dda0dd,stroke:#333,stroke-width:1px;
    classDef storage fill:#d3d3d3,stroke:#333,stroke-width:1px;
    classDef docs fill:#f0e68c,stroke:#333,stroke-width:1px;
```
