# mr-r3b00t/soc_chef architecture

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

- Interactive diagram: https://gitdiagram.com/mr-r3b00t/soc_chef
- Repository: https://github.com/mr-r3b00t/soc_chef

## Overview

##### Project Type and Purpose
- soc_chef is a static-site “Security Operations Chef” comprising a suite of proof-of-concept HTML/JS tools, JSON data files, and markdown templates.
- There is no traditional backend service; all HTML pages, data JSON, and interactive logic live in the repository and are served as static assets (e.g., via GitHub Pages + CDN).
- Its purpose is to deliver policy generators, risk and threat models, incident response wizards, planning checklists, and other security-ops utilities directly in the browser.

##### High-Level Architecture Components
A. Development & Deployment
- Git Repository (README, file tree)
- CI/CD Pipeline (GitHub Actions or equivalent to publish to GitHub Pages)
- Hosting / CDN (GitHub Pages + global cache)
B. Static Asset Store
- HTML files (tools, policy, processes, planning, models, assessments, resources)
- JSON data files (e.g., planning/project_plan_schema.json, process IR wizards)
- Markdown / templates (templates/html/playbook_template.html)
C. Client-Side Runtime
- Browser loads HTML/JS/CSS
- In-page JavaScript fetches JSON, renders dynamic content, wires user interactions
- Minimal third-party dependencies (vanilla JS or lightweight libs)

##### Relationships & Data Flows
1. Developer edits files → commits to GitHub
2. CI/CD builds (if needed) → publishes to GitHub Pages & CDN
3. End user’s browser requests HTML page
4. CDN serves static HTML/JS/CSS → browser renders UI
5. JS modules fetch associated JSON data or templates (e.g., planning JSON, process wizards)
6. JS dynamically injects content into the DOM → interactive tool

##### Architectural Patterns & Design Principles
- Static-First Architecture: All logic and data shipped as static files, no backend runtime.
- Modular & Categorized Content: Directories group functionality by domain (assessments, policy, processes, tools).
- Client-Side Rendering: JSON data + HTML templates → processed in browser.
- Reusable Templates: Playbook templates in templates/html drive consistent look and feel across tools.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development & Deployment
    Developer["Developer"]:::dev
    GitRepo["Git Repository"]:::infra
    CI["CI/CD Pipeline"]:::infra
    CDN["GitHub Pages / CDN"]:::infra

    Developer -->|"commits code"| GitRepo
    GitRepo -->|"triggers"| CI
    CI -->|"deploys static site"| CDN

    %% Static Asset Store
    subgraph "Static Asset Store"
        direction TB
        HTMLFiles["HTML Files"]:::static
        JSONData["JSON Data Files"]:::data
        Templates["HTML Templates"]:::static

        subgraph "Modules"
            direction TB
            assessmentsModule["assessments/"]:::static
            modelsModule["models/"]:::static
            planningModule["planning/"]:::static
            policyModule["policy/"]:::static
            processesModule["processes/"]:::static
            resourcesModule["resources/"]:::static
            toolsModule["tools/"]:::static
        end
    end

    %% Client-Side Runtime
    Browser["User Browser (Client-Side Runtime)"]:::client
    Browser -->|"requests HTML"| CDN
    CDN -->|"serves HTML/JS/CSS"| Browser

    Browser -->|"fetch JSON data"| JSONData
    Browser -->|"load templates"| Templates
    Browser -->|"render UI interactively"| Browser

    %% Content flow
    CDN --> HTMLFiles
    CDN --> JSONData
    CDN --> Templates
    CDN --> modules

    %% Click Events
    click GitRepo "https://github.com/mr-r3b00t/soc_chef/blob/main/README.md"
    click assessmentsModule "https://github.com/mr-r3b00t/soc_chef/tree/main/assessments/"
    click modelsModule "https://github.com/mr-r3b00t/soc_chef/tree/main/models/"
    click planningModule "https://github.com/mr-r3b00t/soc_chef/tree/main/planning/"
    click policyModule "https://github.com/mr-r3b00t/soc_chef/tree/main/policy/"
    click processesModule "https://github.com/mr-r3b00t/soc_chef/tree/main/processes/"
    click resourcesModule "https://github.com/mr-r3b00t/soc_chef/tree/main/resources/"
    click templates "https://github.com/mr-r3b00t/soc_chef/tree/main/templates/html/"
    click toolsModule "https://github.com/mr-r3b00t/soc_chef/tree/main/tools/"

    %% Styles
    classDef infra fill:#BBDEFB,stroke:#1976D2,color:#0D47A1
    classDef static fill:#C8E6C9,stroke:#388E3C,color:#1B5E20
    classDef data fill:#F3E5F5,stroke:#8E24AA,color:#4A148C
    classDef client fill:#FFE0B2,stroke:#F57C00,color:#E65100
    classDef dev fill:#E1BEE7,stroke:#6A1B9A,color:#4A148C
```
