# sameh-zaghloul/alice-bob-eve-docker architecture

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

- Interactive diagram: https://gitdiagram.com/sameh-zaghloul/alice-bob-eve-docker
- Repository: https://github.com/sameh-zaghloul/alice-bob-eve-docker

## Overview

##### Main Components
- Docker Containers: There are three distinct Dockerfile configurations (Dockerfile.alice, Dockerfile.bob, Dockerfile.eve) indicating that each role (Alice, Bob, Eve) runs in its own isolated container.
- Python Scripts: The files alice3.py, bob3.py, and eve3.py represent the executable logic for each corresponding role.
- Coordination: The docker-compose.yml demonstrates that Docker Compose is used to orchestrate and manage these containers.

##### Establish the Relationships
- Alice sending encoded quantum bits to Bob.
- Bob receiving and processing this data.
- Eve potentially intercepting or interacting with the communication channel.

##### Architectural Patterns and Technologies
- Containerization: Emphasize the Docker-based container architecture which assures isolated execution environments.
- Multi-Service Coordination: The docker-compose file is the backbone that links these independent microservices together.
- Protocol Simulation: The project is tailored specifically to demonstrate the BB84 Quantum Key Distribution protocol (as suggested by “BB84 alice-bob-eve-Docker” in the README).

##### Additional Suggestions for Detail
- If needed, include a note on the configuration files (Dockerfiles for each role) to emphasize unique configurations and deployment details.

## Diagram (Mermaid)

```mermaid
graph TD
    Note["BB84 Protocol Simulation"]:::note

    DC["Docker Compose"]:::orchestration
    Note --> DC

    subgraph "Alice Container"
        A1["alice3.py"]:::script
        A2["Docker Config"]:::config
    end

    subgraph "Bob Container"
        B1["bob3.py"]:::script
        B2["Docker Config"]:::config
    end

    subgraph "Eve Container"
        E1["eve3.py"]:::script
        E2["Docker Config"]:::config
    end

    DC --> A1
    DC --> B1
    DC --> E1

    A1 -->|"QuantumKeyBits"| B1
    A1 -->|"Intercepted"| E1
    E1 -->|"Eavesdropped"| B1

    click A1 "https://github.com/sameh-zaghloul/alice-bob-eve-docker/blob/main/alice3.py"
    click A2 "https://github.com/sameh-zaghloul/alice-bob-eve-docker/blob/main/Dockerfile.alice"
    click B1 "https://github.com/sameh-zaghloul/alice-bob-eve-docker/blob/main/bob3.py"
    click B2 "https://github.com/sameh-zaghloul/alice-bob-eve-docker/blob/main/Dockerfile.bob"
    click E1 "https://github.com/sameh-zaghloul/alice-bob-eve-docker/blob/main/eve3.py"
    click E2 "https://github.com/sameh-zaghloul/alice-bob-eve-docker/blob/main/Dockerfile.eve"
    click DC "https://github.com/sameh-zaghloul/alice-bob-eve-docker/blob/main/docker-compose.yml"

    classDef orchestration fill:#f9c,stroke:#333,stroke-width:2px;
    classDef container fill:#bbf,stroke:#333,stroke-width:2px;
    classDef script fill:#cfc,stroke:#333,stroke-width:2px;
    classDef config fill:#fc9,stroke:#333,stroke-width:2px;
    classDef note fill:#eee,stroke:#333,stroke-width:2px,stroke-dasharray:5,5
```
