# sgoedecke/gh-standup architecture

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

- Interactive diagram: https://gitdiagram.com/sgoedecke/gh-standup
- Repository: https://github.com/sgoedecke/gh-standup

## Overview

##### Project type and purpose
- This is a Go-based GitHub CLI extension (“gh-standup”) whose sole purpose is to generate AI-powered daily standup reports by querying your GitHub activity and summarizing it via GitHub’s hosted LLMs.
- It’s a lightweight, single-CLI-command tool, not a web app or service-based microservices architecture.

##### File structure
- Top-level:
- cmd/standup/main.go — the CLI entrypoint
- internal/github — wrapper for GitHub REST API calls
- internal/llm — wrapper for the GitHub Models inference API, plus the YAML standup prompt
- internal/types — domain types (Activity, etc.)
- example.sh, extension.yml, Makefile, CI workflows, Go modules, README, LICENSE
- No frontend; no database; no separate backend service. Everything lives in one binary.
- The separation into internal packages indicates a clear modular design: CLI orchestration, data retrieval, prompt orchestration, output formatting.

##### README for additional insights
- The README clarifies:
- How the extension is installed/registered with GitHub CLI
- It uses the user’s GitHub CLI token for both GitHub REST API and for GitHub Models inference
- Configurable flags (––days, ––user, ––repo, ––model)

## Diagram (Mermaid)

```mermaid
flowchart TD
    User["User"]:::user
    CLI["CLI Entrypoint<br>(cmd/standup)"]:::internal
    RESTClient["GitHub REST Client<br>(internal/github)"]:::internal
    Domain["Domain Types<br>(internal/types)"]:::internal
    LLM["LLM Client<br>(internal/llm)"]:::internal
    Prompt["Standup Prompt<br>(standup.prompt.yml)"]:::config
    ExtREST["GitHub REST API"]:::external
    ExtModels["GitHub Models API"]:::external
    STDOUT["stdout<br>(Markdown)"]:::output

    subgraph "Ancillary Files"
        Manifest["extension.yml"]:::config
        Example["example.sh"]:::config
        CI1["ci.yml"]:::config
        CI2["release.yml"]:::config
        Meta1["go.mod"]:::config
        Meta2["Makefile"]:::config
        Meta3["README.md"]:::config
        Meta4["LICENSE"]:::config
    end

    User -->|invokes| CLI
    CLI -->|parses flags & calls| RESTClient
    RESTClient -->|fetches activity| ExtREST
    ExtREST -->|returns JSON| RESTClient
    RESTClient -->|normalizes data| Domain
    Domain -->|returns structs| CLI
    CLI -->|assembles prompt & calls| LLM
    Prompt -.->|YAML prompt| LLM
    LLM -->|sends prompt| ExtModels
    ExtModels -->|returns report| LLM
    LLM -->|returns text| CLI
    CLI -->|prints| STDOUT

    click CLI "https://github.com/sgoedecke/gh-standup/blob/main/cmd/standup/main.go"
    click RESTClient "https://github.com/sgoedecke/gh-standup/blob/main/internal/github/client.go"
    click Domain "https://github.com/sgoedecke/gh-standup/blob/main/internal/types/activity.go"
    click LLM "https://github.com/sgoedecke/gh-standup/blob/main/internal/llm/client.go"
    click Prompt "https://github.com/sgoedecke/gh-standup/blob/main/internal/llm/standup.prompt.yml"
    click Manifest "https://github.com/sgoedecke/gh-standup/blob/main/extension.yml"
    click Example "https://github.com/sgoedecke/gh-standup/blob/main/example.sh"
    click CI1 "https://github.com/sgoedecke/gh-standup/blob/main/.github/workflows/ci.yml"
    click CI2 "https://github.com/sgoedecke/gh-standup/blob/main/.github/workflows/release.yml"
    click Meta1 "https://github.com/sgoedecke/gh-standup/blob/main/go.mod"
    click Meta2 "https://github.com/sgoedecke/gh-standup/tree/main/Makefile"
    click Meta3 "https://github.com/sgoedecke/gh-standup/blob/main/README.md"
    click Meta4 "https://github.com/sgoedecke/gh-standup/tree/main/LICENSE"

    classDef internal fill:#D6EAF8,stroke:#21618C,color:#1B4F72
    classDef external fill:#F9E79F,stroke:#B9770E,color:#7E5109
    classDef user fill:#ABEBC6,stroke:#1D8348,color:#145A32
    classDef config fill:#E8DAEF,stroke:#8E44AD,color:#4A235A
    classDef output fill:#FCF3CF,stroke:#B7950B,color:#7D6608
```
