# pradumnasaraf/devops architecture

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

- Interactive diagram: https://gitdiagram.com/pradumnasaraf/devops
- Repository: https://github.com/pradumnasaraf/devops

## Overview

##### Main Components
- Website Frontend: The “src” folder (with its components and CSS) together with the “static” directory provides the web UI that renders and displays the documentation content.
- Documentation Repository: The “docs” directory is the core content library. It is hierarchically organized into subdirectories by topic (e.g., Docker, Kubernetes, GitHub Actions, Linux, etc.).
- CI/CD Pipelines: The “.github/workflows” directory contains multiple GitHub Actions workflows (for Dockerhub, GHCR, releases, Vercel preview/production) that automate building, testing, and deployment.
- Deployment & Containerization: Files such as the “Dockerfile” and “compose.yaml” indicate containerization. Also, there are deployment manifests in some docs (e.g., in docs/argocd, docs/docker/docker-compose).
- Configuration & Community: Supporting files (such as .gitignore, CONTRIBUTING.md, CODE_OF_CONDUCT.md, etc.) and GitHub Issue/Pull Request templates facilitate collaboration and repository management.

##### Relationships and Interactions
- The Website Frontend reads content from the Documentation Repository to render and display the learning materials.
- When a commit is made (to source or docs), CI/CD pipelines are triggered (via GitHub Actions) which build/deploy the site to Vercel as well as update container images with Docker.
- Deployment components (Docker, Compose, Kubernetes manifests) show that parts of the repository can be used to launch sample environments/tutorials.
- The repository’s community configurations (issue templates, PR templates) interact with developers/contributors to maintain code quality and documentation consistency.

##### Architectural Patterns and Technologies
- Monorepo Organization: Separation of concerns is clearly maintained with directories for docs, source, workflow configurations, and CI/CD deployment setups.
- CI/CD Integration: Automated pipelines (via GitHub Actions) are used to continuously deploy both the website and container images.
- Containerization: Docker-related files point toward container-based development and deployment patterns.
- Static Site Generation: The contents in “src” and “static” coupled with configuration files (like docusaurus.config.js, sidebars.js) suggests a static site generator (such as Docusaurus) for the documentation portal.
- Modular Documentation: Each learning topic (Docker, Kubernetes, etc.) is modularized into its own subdirectory in “docs,” which can be viewed as separate “components” of the overall learning system.

##### Elements
- "Website Frontend (src & static)" – representing the UI and the static content.
- "Documentation Library (docs)" – showing subtopics such as Docker, Kubernetes, GitHub Actions, etc.
- "CI/CD Pipeline (GitHub Actions)" – highlighting workflows for deploying to Vercel, publishing Docker images, and releasing updates.
- "Container & Deployment Configurations" – capturing the Dockerfile, compose.yaml, Kubernetes manifests (found in docs/argocd and docs/kubernetes), etc.
- "Repository Management & Community" – representing .github configurations, issue templates, and other contributor guidelines.
- The flow from code and content commits → CI/CD pipelines → Deployment (website update, Docker image publish).
- Interaction between the front-end and the documentation library (content delivery).
- A different one for documentation content.
- A third for automation/CI-CD workflows.
- Optionally, a separate style for configuration/community components.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        FE("Website Frontend (src & static)"):::frontend
    end

    %% Content Layer
    subgraph "Content Layer"
        DOC("Documentation Library (docs)"):::docs
        DOC_Docker("Docker"):::docs
        DOC_K8s("Kubernetes"):::docs
        DOC_GHA("GitHubActions"):::docs
        DOC_Others("OtherTopics"):::docs
    end

    %% Automation Layer
    subgraph "Automation Layer"
        CICD("CI/CD Pipeline (GitHubActions)"):::cicd
    end

    %% Deployment & Containerization
    subgraph "Deployment & Containerization"
        DF("Dockerfile"):::deploy
        CY("compose.yaml"):::deploy
        ARG("ArgoCD Manifests (docs/argocd/manifests)"):::deploy
        DC("DockerCompose (docs/docker/docker-compose)"):::deploy
    end

    %% Community & Repository Management
    subgraph "Community & Repository Management"
        GITHUB(".github"):::community
        ISSUE("ISSUE_TEMPLATE"):::community
        PR("PULL_REQUEST_TEMPLATE.md"):::community
        COC("CODE_OF_CONDUCT.md"):::community
        CONTR("CONTRIBUTING.md"):::community
    end

    %% Relationships
    %% Website Frontend consumes content from Documentation Library
    FE -->|"readsContent"| DOC

    %% Documentation Library contains various topics
    DOC -->|"contains"| DOC_Docker
    DOC -->|"contains"| DOC_K8s
    DOC -->|"contains"| DOC_GHA
    DOC -->|"contains"| DOC_Others

    %% Commits from Frontend and Documentation trigger CI/CD pipelines
    FE -->|"commitTriggers"| CICD
    DOC -->|"commitTriggers"| CICD

    %% CI/CD pipelines build and deploy containers
    CICD -->|"buildsContainer"| DF
    CICD -->|"buildsContainer"| CY

    %% Interdependency within Deployment components
    DF -->|"integratedWith"| ARG
    CY -->|"integratedWith"| DC

    %% Repository Management includes community configs
    GITHUB -->|"includes"| ISSUE
    GITHUB -->|"includes"| PR
    GITHUB -->|"includes"| COC
    GITHUB -->|"includes"| CONTR

    %% Click Events
    click FE "https://github.com/pradumnasaraf/devops/tree/main/src"
    click DOC "https://github.com/pradumnasaraf/devops/tree/main/docs"
    click CICD "https://github.com/pradumnasaraf/devops/tree/main/.github/workflows"
    click DF "https://github.com/pradumnasaraf/devops/tree/main/Dockerfile"
    click CY "https://github.com/pradumnasaraf/devops/blob/main/compose.yaml"
    click ARG "https://github.com/pradumnasaraf/devops/tree/main/docs/argocd/manifests"
    click DC "https://github.com/pradumnasaraf/devops/tree/main/docs/docker/docker-compose"
    click GITHUB "https://github.com/pradumnasaraf/devops/blob/main/.github"
    click ISSUE "https://github.com/pradumnasaraf/devops/tree/main/.github/ISSUE_TEMPLATE"
    click PR "https://github.com/pradumnasaraf/devops/blob/main/.github/PULL_REQUEST_TEMPLATE.md"
    click COC "https://github.com/pradumnasaraf/devops/blob/main/CODE_OF_CONDUCT.md"
    click CONTR "https://github.com/pradumnasaraf/devops/blob/main/CONTRIBUTING.md"

    %% Styles
    classDef frontend fill:#a2d5f2,stroke:#205375,stroke-width:2px;
    classDef docs fill:#ffe4c4,stroke:#d2691e,stroke-width:2px;
    classDef cicd fill:#c3f0ca,stroke:#2e8b57,stroke-width:2px;
    classDef deploy fill:#f4cccc,stroke:#a40000,stroke-width:2px;
    classDef community fill:#d9d2e9,stroke:#5a2c83,stroke-width:2px;
```
