# shashanktu/github_webhook_endpoint architecture

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

- Interactive diagram: https://gitdiagram.com/shashanktu/github_webhook_endpoint
- Repository: https://github.com/shashanktu/github_webhook_endpoint

## Overview

This is a small FastAPI service with two independently defined GitHub webhook entrypoints. Each accepts a POST payload, extracts repository and branch information, logs it, and returns a processed status. The root entrypoint additionally adapts the app for Mangum. Repository-content fetching is commented out, and no downstream processing or GitHub API call is active in the shown code.

Main entry points: [`main.py`](https://github.com/shashanktu/github_webhook_endpoint/blob/main/main.py) (Root webhook endpoint), [`api/index.py`](https://github.com/shashanktu/github_webhook_endpoint/blob/main/api/index.py) (API webhook endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_webhook["Webhook service"]
  node_root_endpoint["Root webhook endpoint<br/>[main.py]"]
  node_api_endpoint["API webhook endpoint<br/>[index.py]"]
  node_mangum["Mangum adapter<br/>[main.py]"]
end

node_github(("GitHub webhook sender"))

node_github -->|"POSTs payload"| node_root_endpoint
node_github -->|"POSTs payload"| node_api_endpoint
node_root_endpoint -->|"adapts app"| node_mangum

click node_root_endpoint "https://github.com/shashanktu/github_webhook_endpoint/blob/main/main.py"
click node_api_endpoint "https://github.com/shashanktu/github_webhook_endpoint/blob/main/api/index.py"
click node_mangum "https://github.com/shashanktu/github_webhook_endpoint/blob/main/main.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_root_endpoint,node_api_endpoint,node_mangum toneBlue
class node_github toneMint
```

## Components

### Webhook service

- [Root webhook endpoint](https://github.com/shashanktu/github_webhook_endpoint/blob/main/main.py): `main.py`
- [API webhook endpoint](https://github.com/shashanktu/github_webhook_endpoint/blob/main/api/index.py): `api/index.py`
- [Mangum adapter](https://github.com/shashanktu/github_webhook_endpoint/blob/main/main.py): `main.py`

### Other components

- **GitHub webhook sender**

## Connections

- GitHub webhook sender → Root webhook endpoint: POSTs payload (evidence: `main.py`)
- GitHub webhook sender → API webhook endpoint: POSTs payload (evidence: `api/index.py`)
- Root webhook endpoint → Mangum adapter: adapts app (evidence: `main.py`)
