# veergandhii/devsecops-skeleton architecture

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

- Interactive diagram: https://gitdiagram.com/veergandhii/devsecops-skeleton
- Repository: https://github.com/veergandhii/devsecops-skeleton

## Overview

This repository is a small two-service DevSecOps skeleton built around an asynchronous event flow.

1. **Top-level shape**
   - The repo contains two independent Python services: `webhook-receiver` and `scan-orchestrator`.
   - `docker-compose.yml` ties them together for local deployment, while each service also has its own `Dockerfile` and `requirements.txt`.

2. **Primary architectural split**
   - `webhook-receiver` is the ingress boundary: it accepts incoming webhook calls from an external system.
   - `scan-orchestrator` is the downstream processing boundary: it consumes events and performs orchestration work, likely scan scheduling/coordination.

3. **Event-driven handoff**
   - The presence of `publisher.py` in `webhook-receiver` and `consumer.py` in `scan-orchestrator` indicates an asynchronous message-based integration between the two services.
   - The webhook service does not appear to directly perform scan work; it transforms inbound webhook data into a published event for later processing.

4. **Webhook receiver responsibilities**
   - Main application entrypoint: `webhook-receiver/app/main.py`.
   - Route layer: `app/routes/webhook.py` handles the webhook endpoint, and `app/routes/health.py` provides a readiness/liveness check.
   - `app/config.py` centralizes runtime configuration, likely including broker connection details and webhook-related settings.

5. **Scan orchestrator responsibilities**
   - Main application entrypoint: `scan-orchestrator/app/main.py`.
   - `app/consumer.py` is the core integration point for consuming queued messages/events.
   - `app/routes/health.py` exposes health status, suggesting this service is meant to run continuously as a background worker with a minimal HTTP surface.

6. **Likely runtime model**
   - Both services are containerized Python applications.
   - The HTTP layer is used only where needed: the receiver for inbound webhooks and both services for health checks.
   - The orchestrator likely spends most of its time in a consumer loop rather than serving request traffic.

7. **Configuration boundaries**
   - Each service has its own `config.py` and `.env`-style configuration.
   - This separation suggests independent deployability and isolated operational settings, even though the services collaborate through the messaging layer.

8. **Operational and deployment shape**
   - Docker Compose is the main local integration mechanism.
   - The repo does not show a shared library or monorepo framework; the services are intentionally loosely coupled and deployed as separate containers.

9. **External dependency boundary**
   - The critical external dependency is the message broker or queue system implied by publisher/consumer roles.
   - The webhook receiver likely depends on an upstream SaaS or source system that emits webhooks, while the orchestrator depends on the broker to receive those events reliably.

10. **What is not in this repo**
   - There is no evidence of a UI, database layer, or monolithic backend here.
   - The repository appears focused on the integration spine: ingest webhook, publish event, consume event, and report health.

11. **How to draw the architecture**
   - Draw `external webhook source` feeding `webhook-receiver`.
   - Draw `webhook-receiver` publishing into a `message broker/queue`.
   - Draw `scan-orchestrator` consuming from that broker.
   - Show both services exposing health endpoints and each containerized separately.

12. **Overall intent**
   - The project is a skeleton for an event-driven DevSecOps pipeline, where webhook events become orchestration inputs for downstream scanning or automation workflows.

Main entry points: [`webhook-receiver/app/main.py`](https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/main.py) (App Entry), [`scan-orchestrator/app/main.py`](https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/main.py) (App Entry), [`webhook-receiver/app/routes/webhook.py`](https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/routes/webhook.py) (Webhook API), [`docker-compose.yml`](https://github.com/veergandhii/devsecops-skeleton/blob/main/docker-compose.yml) (Compose)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_external["External"]
  node_external_webhook_source(("Webhook Source<br/>external system"))
  node_message_broker["Message Broker<br/>queue/bus"]
  node_compose["Compose<br/>local deployment<br/>[docker-compose.yml]"]
end

subgraph group_webhook["Webhook Receiver"]
  node_webhook_main["App Entry<br/>service entrypoint<br/>[main.py]"]
  node_webhook_route["Webhook API<br/>HTTP route<br/>[webhook.py]"]
  node_health_rx["Health API<br/>HTTP route<br/>[health.py]"]
  node_receiver_config["Config<br/>[config.py]"]
  node_publisher["Publisher<br/>[publisher.py]"]
  node_webhook_docker["Container<br/>deployment"]
end

subgraph group_orchestrator["Scan Orchestrator"]
  node_orchestrator_main["App Entry<br/>service entrypoint<br/>[main.py]"]
  node_consumer["Consumer<br/>[consumer.py]"]
  node_orch_health["Health API<br/>HTTP route<br/>[health.py]"]
  node_orchestrator_config["Config<br/>[config.py]"]
  node_orchestrator_docker["Container<br/>deployment"]
end

node_external_webhook_source -->|"sends webhook"| node_webhook_route
node_webhook_main -->|"mounts"| node_webhook_route
node_webhook_main -->|"mounts"| node_health_rx
node_webhook_main -->|"loads"| node_receiver_config
node_webhook_route -->|"publishes"| node_publisher
node_publisher -->|"enqueue"| node_message_broker
node_health_rx -.->|"served by"| node_webhook_main
node_orchestrator_main -->|"starts"| node_consumer
node_orchestrator_main -->|"mounts"| node_orch_health
node_orchestrator_main -->|"loads"| node_orchestrator_config
node_consumer -->|"consumes"| node_message_broker
node_orch_health -.->|"served by"| node_orchestrator_main
node_compose -->|"runs"| node_webhook_docker
node_compose -->|"runs"| node_orchestrator_docker
node_webhook_docker -.->|"packages"| node_webhook_main
node_orchestrator_docker -.->|"packages"| node_orchestrator_main

click node_webhook_main "https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/main.py"
click node_webhook_route "https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/routes/webhook.py"
click node_health_rx "https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/routes/health.py"
click node_receiver_config "https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/config.py"
click node_publisher "https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/publisher.py"
click node_webhook_docker "https://github.com/veergandhii/devsecops-skeleton/tree/main/webhook-receiver/Dockerfile"
click node_orchestrator_main "https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/main.py"
click node_consumer "https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/consumer.py"
click node_orch_health "https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/routes/health.py"
click node_orchestrator_config "https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/config.py"
click node_orchestrator_docker "https://github.com/veergandhii/devsecops-skeleton/tree/main/scan-orchestrator/Dockerfile"
click node_compose "https://github.com/veergandhii/devsecops-skeleton/blob/main/docker-compose.yml"

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_external_webhook_source,node_message_broker,node_compose toneBlue
class node_webhook_main,node_webhook_route,node_health_rx,node_receiver_config,node_publisher,node_webhook_docker toneAmber
class node_orchestrator_main,node_consumer,node_orch_health,node_orchestrator_config,node_orchestrator_docker toneMint
```

## Components

### External

Upstream webhook source and shared messaging dependency

- **Webhook Source**: external system · Upstream SaaS or event source that sends incoming webhooks
- **Message Broker**: queue/bus · Asynchronous transport between receiver and orchestrator
- [Compose](https://github.com/veergandhii/devsecops-skeleton/blob/main/docker-compose.yml): local deployment · Local multi-container wiring for both services · `docker-compose.yml`

### Webhook Receiver

Ingress service that accepts webhooks and publishes events

- [App Entry](https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/main.py): service entrypoint · Main application startup for the receiver · `webhook-receiver/app/main.py`
- [Webhook API](https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/routes/webhook.py): HTTP route · Webhook endpoint that accepts inbound events · `webhook-receiver/app/routes/webhook.py`
- [Health API](https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/routes/health.py): HTTP route · Receiver health and readiness check · `webhook-receiver/app/routes/health.py`
- [Config](https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/config.py): runtime config · Receiver settings and broker-related configuration · `webhook-receiver/app/config.py`
- [Publisher](https://github.com/veergandhii/devsecops-skeleton/blob/main/webhook-receiver/app/publisher.py): event publisher · Transforms inbound webhook data into broker messages · `webhook-receiver/app/publisher.py`
- [Container](https://github.com/veergandhii/devsecops-skeleton/tree/main/webhook-receiver/Dockerfile): deployment · Container image for the webhook receiver · `webhook-receiver/Dockerfile`

### Scan Orchestrator

Downstream worker service that consumes events and coordinates scans

- [App Entry](https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/main.py): service entrypoint · Main application startup for the orchestrator · `scan-orchestrator/app/main.py`
- [Consumer](https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/consumer.py): event consumer · Consumes queued events and drives orchestration work · `scan-orchestrator/app/consumer.py`
- [Health API](https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/routes/health.py): HTTP route · Orchestrator health check endpoint · `scan-orchestrator/app/routes/health.py`
- [Config](https://github.com/veergandhii/devsecops-skeleton/blob/main/scan-orchestrator/app/config.py): runtime config · Orchestrator settings and environment configuration · `scan-orchestrator/app/config.py`
- [Container](https://github.com/veergandhii/devsecops-skeleton/tree/main/scan-orchestrator/Dockerfile): deployment · Container image for the orchestrator · `scan-orchestrator/Dockerfile`

## Connections

- Webhook Source → Webhook API: sends webhook · Incoming event delivery to the receiver boundary
- App Entry → Webhook API: mounts · Starts the HTTP service and registers routes
- App Entry → Health API: mounts · Exposes service health endpoint
- App Entry → Config: loads · Reads runtime settings at startup
- Webhook API → Publisher: publishes · Converts inbound webhook payloads into broker events
- Publisher → Message Broker: enqueue · Sends event data to the asynchronous transport
- Health API → App Entry: served by · Health endpoint is part of the receiver application
- App Entry → Consumer: starts · Boots the worker loop that consumes events
- App Entry → Health API: mounts · Exposes minimal health endpoint
- App Entry → Config: loads · Reads runtime settings at startup
- Consumer → Message Broker: consumes · Pulls queued events for orchestration
- Health API → App Entry: served by · Health endpoint is part of the orchestrator application
- Compose → Container: runs · Defines local container for receiver
- Compose → Container: runs · Defines local container for orchestrator
- Container → App Entry: packages · Builds the receiver service image around the app
- Container → App Entry: packages · Builds the orchestrator service image around the app
