# c4t-but-s4d/goldctf-2024 architecture

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

- Interactive diagram: https://gitdiagram.com/c4t-but-s4d/goldctf-2024
- Repository: https://github.com/c4t-but-s4d/goldctf-2024

## Overview

##### Main Components
- Checkers – For each service there is a corresponding checker (located under checkers/… directories). Group these and indicate that they “monitor” or “validate” the target services.
- Sploits – Similarly, there are sploit directories (under sploits/…) that contain exploitation or challenge-specific scripts.
- CI/CD & DevOps – Represent the GitHub Actions pipelines (under .github/workflows) which handle automation routines such as check-service tests.
- Infrastructure and Configuration – Although not a running component by itself, include any relevant infrastructure-related files like Dockerfiles, docker-compose files and configuration files for nginx, centrifugo, etc. They indicate deployment and runtime environments.

##### Relationships and Interactions
- The “cell-front” component can be shown connected to the “cell” service (and possibly other services if the front-end is used to administer or view data), capturing the separation between client-side (front-end) and server-side (backend) code.
- A CI/CD block (labeled “GitHub Actions / CI Pipeline”) that points to various components (services, checkers, possibly sploits) to suggest the automated integration, testing, and deployment flows that are built into the project.

##### Architectural Patterns and Design Principles
- Multi-language/Multi-service Architecture – Emphasis on a modular design in which each challenge is a separate “service”, developed with a language and technology best suited to the challenge.
- Health Checking and Monitoring – The separation of checkers, which are designed to verify the health, availability, and perhaps security of the services.
- Separation of Frontend and Backend – Notably in the “cell” service, where there’s both a service backend (services/cell/backend) and an independent “cell-front” internal front-end.
- Containers and Orchestration – The multiple Dockerfiles and docker-compose files indicate that services and checkers are containerized. Include a note on this and display connections to the deployment environment if applicable.

##### Technologies and Frameworks
- PHP, Python, C++ (for digger), Rust, and Go are the primary languages for the services.
- Svelte (and Vite) in “cell-front” indicates a modern JavaScript framework for the front-end component.
- Docker and docker-compose for container orchestration.
- GitHub Actions for CI/CD automation.

## Diagram (Mermaid)

```mermaid
graph TD

%% Challenge Services
subgraph "Challenge Services"
    subgraph "Cell Service (PHP)"
        cell_backend["Service: cell Backend (PHP)"]
        cell_front["Service: cell Front Assets"]
    end
    conveyor["Service: conveyor (Python)"]
    subgraph "Digger Service (C++/C)"
        digger_main["Service: digger"]
    end
    goldarn["Service: goldarn (Rust)"]
    nugget["Service: nugget (Go)"]
end

%% Checkers
subgraph "Checkers"
    checker_cell["Checker: cell"]
    checker_conveyor["Checker: conveyor"]
    checker_digger["Checker: digger"]
    checker_goldarn["Checker: goldarn"]
    checker_nugget["Checker: nugget"]
end

%% Sploits
subgraph "Sploits"
    sploit_cell["Sploit: cell"]
    sploit_conveyor["Sploit: conveyor"]
    sploit_digger["Sploit: digger"]
    sploit_goldarn["Sploit: goldarn"]
    sploit_nugget["Sploit: nugget"]
end

%% Internal Components
subgraph "Internal Components"
    cell_front_internal["Frontend: cell-front (Svelte)"]
    digger_internal["Internal: digger Files"]
end

%% CI/CD & DevOps
subgraph "CI/CD & DevOps"
    cicd["GitHub Actions / CI Pipeline"]
end

%% Infrastructure & Configuration
subgraph "Infrastructure & Configuration"
    infra["Docker & Config Files"]
end

%% Relationships: Checkers monitoring Services
checker_cell -->|"monitors"| cell_backend
checker_conveyor -->|"monitors"| conveyor
checker_digger -->|"monitors"| digger_main
checker_goldarn -->|"monitors"| goldarn
checker_nugget -->|"monitors"| nugget

%% Relationships: Sploits targeting Services
sploit_cell -->|"targets"| cell_backend
sploit_conveyor -->|"targets"| conveyor
sploit_digger -->|"targets"| digger_main
sploit_goldarn -->|"targets"| goldarn
sploit_nugget -->|"targets"| nugget

%% Internal Interfaces
cell_front_internal -->|"interfaces"| cell_backend
digger_internal -->|"enhances"| digger_main

%% CI/CD interactions
cicd -->|"deploys"| cell_backend
cicd -->|"deploys"| conveyor
cicd -->|"deploys"| digger_main
cicd -->|"deploys"| goldarn
cicd -->|"deploys"| nugget
cicd -->|"tests"| checker_cell
cicd -->|"tests"| checker_conveyor
cicd -->|"tests"| checker_digger
cicd -->|"tests"| checker_goldarn
cicd -->|"tests"| checker_nugget
cicd -->|"tests"| sploit_cell
cicd -->|"tests"| sploit_conveyor
cicd -->|"tests"| sploit_digger
cicd -->|"tests"| sploit_goldarn
cicd -->|"tests"| sploit_nugget

%% Infrastructure supports Services and CI/CD
infra -->|"orchestrates"| cell_backend
infra -->|"orchestrates"| conveyor
infra -->|"orchestrates"| digger_main
infra -->|"orchestrates"| goldarn
infra -->|"orchestrates"| nugget
infra -->|"supports"| cicd

%% Styles
classDef service fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
classDef checker fill:#D5F5E3,stroke:#239B56,stroke-width:2px;
classDef sploit fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
classDef internal fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
classDef cicd fill:#E8DAEF,stroke:#8E44AD,stroke-width:2px;
classDef infra fill:#FAD7A0,stroke:#D35400,stroke-width:2px;

class cell_backend,cell_front,conveyor,digger_main,goldarn,nugget service;
class checker_cell,checker_conveyor,checker_digger,checker_goldarn,checker_nugget checker;
class sploit_cell,sploit_conveyor,sploit_digger,sploit_goldarn,sploit_nugget sploit;
class cell_front_internal,digger_internal internal;
class cicd cicd;
class infra infra;

%% Click Events
click cell_backend "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/services/cell/backend"
click cell_front "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/services/cell/front"
click cell_front_internal "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/internal/cell-front"
click conveyor "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/services/conveyor"
click digger_main "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/services/digger"
click digger_internal "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/internal/digger"
click goldarn "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/services/goldarn"
click nugget "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/services/nugget"
click checker_cell "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/checkers/cell"
click checker_conveyor "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/checkers/conveyor"
click checker_digger "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/checkers/digger"
click checker_goldarn "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/checkers/goldarn"
click checker_nugget "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/checkers/nugget"
click sploit_cell "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/sploits/cell"
click sploit_conveyor "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/sploits/conveyor"
click sploit_digger "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/sploits/digger"
click sploit_goldarn "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/sploits/goldarn"
click sploit_nugget "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/sploits/nugget"
click cicd "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/.github/workflows"
click infra "https://github.com/c4t-but-s4d/goldctf-2024/tree/master/services/cell/conf"

%% Infra Note Annotations for containerization
infra ---|"includes_Dockerfiles"| infra
infra ---|"docker-compose_files"| infra
```
