# codesparadox/not_n_issue architecture

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

- Interactive diagram: https://gitdiagram.com/codesparadox/not_n_issue
- Repository: https://github.com/codesparadox/not_n_issue

## Overview

##### Project type and purpose
- This is an open-source, single-file Python CLI tool (“issues_manager.py”) built with Typer.
- Purpose: Perform full CRUD and advanced filtering on GitHub Issues for any repo, with optional Slack notifications.
- It also includes a GitHub Actions workflow that sends Slack notifications on issue events triggered via the GitHub web UI.

##### File structure
- Top-level files:
- .env.example (environment variable template)
- README.md (documentation & usage)
- requirements.txt (Python dependencies)
- issues_manager.py (single-file CLI application)
- Directories:
- .github/workflows/notify-slack-on-issue.yml (GitHub Actions workflow)
- docs/ (extended REPORT.md)
- No separate “src” or “lib” directories—everything lives in one script and one workflow file.

##### README for additional insights
- Confirms Typer for CLI parsing, requests for HTTP to GitHub API, python-dotenv for config.
- Describes core commands (create, get, update, close, comment, list, etc.), advanced filtering, JSON output.
- Slack integration optional via incoming webhook.
- GitHub Actions workflow triggers on issue events and posts to Slack.

2. Inside it, subdivide or annotate four modules:
- Parser (Typer)
- Config Loader (.env, python-dotenv)
- GitHub Adapter (requests)
- Slack Adapter (requests)
- CLI code (e.g., blue)
- Adapters (green)
- External services (gray)
- CI/CD flow (orange)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Actors
    User["User / CI Script"]:::actor

    %% CLI component with submodules
    subgraph "CLI: issues_manager.py" 
        direction TB
        Parser["Parser (Typer)"]:::runtime
        ConfigLoader["Configuration Loader\n(python-dotenv)"]:::runtime
        GitHubAdapter["GitHub Adapter\n(requests)"]:::adapter
        SlackAdapter["Slack Adapter\n(requests)"]:::adapter
    end

    %% External services
    GitHubAPI["GitHub REST API"]:::external
    SlackWebhook["Slack Incoming Webhook"]:::external

    %% GitHub platform and CI/CD
    GitHubPlatform["GitHub Platform"]:::external
    subgraph "CI/CD: GitHub Actions" 
        direction TB
        Workflow["notify-slack-on-issue.yml"]:::cicd
    end

    %% Documentation and files
    README["README.md"]:::docs
    ENV[".env.example"]:::config
    REQ["requirements.txt"]:::docs
    REPORT["docs/REPORT.md"]:::docs

    %% Relationships
    User -->|"invokes CLI"| Parser
    Parser --> ConfigLoader
    ConfigLoader --> Parser
    Parser --> GitHubAdapter
    GitHubAdapter -->|"HTTP requests"| GitHubAPI
    Parser --> SlackAdapter
    SlackAdapter -->|"POST message"| SlackWebhook

    GitHubPlatform -->|"issue events"| Workflow
    Workflow -->|"POST message"| SlackWebhook

    %% Click events
    click Parser "https://github.com/codesparadox/not_n_issue/blob/main/issues_manager.py"
    click ConfigLoader "https://github.com/codesparadox/not_n_issue/blob/main/.env.example"
    click GitHubAdapter "https://github.com/codesparadox/not_n_issue/blob/main/issues_manager.py"
    click SlackAdapter "https://github.com/codesparadox/not_n_issue/blob/main/issues_manager.py"
    click Workflow "https://github.com/codesparadox/not_n_issue/blob/main/.github/workflows/notify-slack-on-issue.yml"
    click README "https://github.com/codesparadox/not_n_issue/blob/main/README.md"
    click REPORT "https://github.com/codesparadox/not_n_issue/blob/main/docs/REPORT.md"
    click REQ "https://github.com/codesparadox/not_n_issue/blob/main/requirements.txt"

    %% Styles
    classDef runtime fill:#D0E8FF,stroke:#037FFC,color:#000;
    classDef adapter fill:#D4F5D4,stroke:#28A828,color:#000;
    classDef external fill:#EEEEEE,stroke:#888888,color:#000;
    classDef cicd fill:#FFE4B5,stroke:#FFA500,color:#000;
    classDef actor fill:#FFDDE0,stroke:#FF3366,color:#000;
    classDef docs fill:#F0F0FF,stroke:#6666FF,color:#000;
    classDef config fill:#FFF0E0,stroke:#FF9933,color:#000;
```
