diff --git a/docs/diagrams/architecture/c4.md b/docs/diagrams/architecture/c4.md new file mode 100644 index 00000000..116a263c --- /dev/null +++ b/docs/diagrams/architecture/c4.md @@ -0,0 +1,72 @@ +## Context + +```mermaid +graph LR + subgraph External + User + end + + subgraph Container + ContainerImage("Container Image") + TrestlebotContainer("Trestlebot Container") + end + + subgraph GitHub + OSCALRepo("OSCAL Content Repository") + GithubActions("GitHub Actions") + CustomAction("Custom GitHub Action") + end + + User -- Uses --> OSCALRepo + GithubActions -- Triggers --> CustomAction + CustomAction -- Builds --> ContainerImage + ContainerImage -- Runs --> TrestlebotContainer + OSCALRepo -- Uses --> GithubActions + User -- Uses --> GithubActions +``` + +## Container + +```mermaid +graph LR + subgraph Container + ContainerImage("Container Image") + TrestlebotCLI("Trestlebot CLI") + end + subgraph GitHub + GithubActions("GitHub Actions") + CustomAction("Custom GitHub Action") + end + + + GithubActions -- Triggers --> CustomAction + CustomAction -- Builds --> ContainerImage + ContainerImage -- Distributes --> TrestlebotCLI +``` + +## Component + +```mermaid +graph TD + subgraph Container + TrestlebotCLI("Trestlebot CLI") + Entrypoint("Entrypoint script") + end + + subgraph Runtime + EnvironmentVariables("Environment Variables") + GitRepo("Git Local Repository") + end + + subgraph GitHub + GitHubAction("GitHub Action") + GitHubAPI("GitHub API") + end + + GitHubAction -- Sets --> EnvironmentVariables + GitHubAction -- Uses --> Entrypoint + TrestlebotCLI -- Reads content --> GitRepo + Entrypoint -- Runs --> TrestlebotCLI + Entrypoint -- Reads --> EnvironmentVariables + TrestlebotCLI -- Update content --> GitHubAPI +``` diff --git a/docs/diagrams/assemble/assemble_diagrams.md b/docs/diagrams/workflows/assemble_diagrams.md similarity index 91% rename from docs/diagrams/assemble/assemble_diagrams.md rename to docs/diagrams/workflows/assemble_diagrams.md index 78e3580b..a2b05cf0 100644 --- a/docs/diagrams/assemble/assemble_diagrams.md +++ b/docs/diagrams/workflows/assemble_diagrams.md @@ -1,4 +1,4 @@ -# Assemble Diagrams +# Diagrams: Assemble ## Context @@ -18,8 +18,4 @@ graph LR Trestle_Bot --> Compliance_Trestle["Compliance-Trestle SDK"] Compliance_Trestle --> Git_Provider_API["Git Provider API"] Git_Provider_API --> Branch["User's Git Branch"] -``` - -## Component - -## Code \ No newline at end of file +``` \ No newline at end of file diff --git a/docs/diagrams/workflows/create_diagrams.md b/docs/diagrams/workflows/create_diagrams.md new file mode 100644 index 00000000..20990ca5 --- /dev/null +++ b/docs/diagrams/workflows/create_diagrams.md @@ -0,0 +1,24 @@ +# Diagrams: Create Content + +## Context + +```mermaid +graph LR + User["User"] --> Workflow_Dispatch["Workflow Dispatch"] + Workflow_Dispatch --> Trestle_Bot["Trestle-Bot"] + Trestle_Bot --> New_Branch["New Branch"] + New_Branch --> PR["Draft Pull Request"] + +``` + +## Container + +```mermaid +graph LR + User["User"] --> GH_Action["GitHub Action"] + GH_Action --> Trestle_Bot["Trestle-Bot"] + Trestle_Bot --> Compliance_Trestle["Compliance-Trestle SDK"] + Compliance_Trestle --> Git_Provider_API["Git Provider API"] + Git_Provider_API --> Branch["New Branch"] + Branch --> PR["Draft Pull Request"] +``` \ No newline at end of file