# samuelilagan/thecornerrabbitmqphp_example architecture

> Architecture diagram of the GitHub repository samuelilagan/thecornerrabbitmqphp_example, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samuelilagan/thecornerrabbitmqphp_example
- Repository: https://github.com/samuelilagan/thecornerrabbitmqphp_example

## Overview

This repository is a small set of PHP integration examples, not a single end-user application. Its clearest workflow is a command-line client sending a login request through the RabbitMQ library to a server-side request processor. Separate examples query MongoDB and fetch soccer-season data over HTTP. The excerpts do not show the RabbitMQ library internals or configuration files, so their behavior and wiring are not expanded here; the unrelated PHP language demo is omitted.

Main entry points: [`testRabbitMQServer.php`](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQServer.php) (Test server), [`testRabbitMQClient.php`](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQClient.php) (Test client), [`rpc/loginRequest.php`](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/rpc/loginRequest.php) (RPC login client), [`rabbitMQLib.inc`](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/rabbitMQLib.inc) (RabbitMQ library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_messaging["RabbitMQ examples"]
  node_test_client["Test client"]
  node_rpc_client["RPC login client<br/>[loginRequest.php]"]
  node_rabbit_server["Test server"]
  node_request_processor["Request processor"]
  node_login_handler["Login handler"]
  node_rabbit_library["RabbitMQ library<br/>[rabbitMQLib.inc]"]
end

subgraph group_data["External data examples"]
  node_mongo_example["MongoDB query<br/>[mongoClient.php]"]
  node_mongo_service[("MongoDB service")]
  node_soccer_example["Soccer data fetch<br/>[soccerData.php]"]
  node_football_api["Football data API"]
end

subgraph group_helpers["Shared helpers"]
  node_path_helper["Path helper<br/>[path.inc]"]
  node_host_helper["Host info helper<br/>[get_host_info.inc]"]
end

node_test_client -->|"sends request"| node_rabbit_library
node_rpc_client -->|"sends request"| node_rabbit_library
node_rabbit_server -->|"processes requests"| node_rabbit_library
node_rabbit_server -->|"registers callback"| node_request_processor
node_request_processor -->|"dispatches login"| node_login_handler
node_mongo_example -->|"queries"| node_mongo_service
node_soccer_example -->|"fetches data"| node_football_api
node_test_client -->|"requires"| node_path_helper
node_test_client -->|"requires"| node_host_helper
node_rpc_client -->|"requires"| node_path_helper
node_rpc_client -->|"requires"| node_host_helper
node_rabbit_server -->|"requires"| node_path_helper
node_rabbit_server -->|"requires"| node_host_helper

click node_test_client "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQClient.php"
click node_rpc_client "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/rpc/loginRequest.php"
click node_rabbit_server "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQServer.php"
click node_request_processor "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQServer.php"
click node_login_handler "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQServer.php"
click node_rabbit_library "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/rabbitMQLib.inc"
click node_mongo_example "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/mongoClient.php"
click node_soccer_example "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/soccerData.php"
click node_path_helper "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/path.inc"
click node_host_helper "https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/get_host_info.inc"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_test_client,node_rpc_client,node_rabbit_server,node_request_processor,node_login_handler,node_rabbit_library toneBlue
class node_mongo_example,node_mongo_service,node_soccer_example,node_football_api toneAmber
class node_path_helper,node_host_helper toneMint
```

## Components

### RabbitMQ examples

- [Test client](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQClient.php): `testRabbitMQClient.php`
- [RPC login client](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/rpc/loginRequest.php): `rpc/loginRequest.php`
- [Test server](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQServer.php): `testRabbitMQServer.php`
- [Request processor](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQServer.php): `testRabbitMQServer.php`
- [Login handler](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/testRabbitMQServer.php): `testRabbitMQServer.php`
- [RabbitMQ library](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/rabbitMQLib.inc): `rabbitMQLib.inc`

### External data examples

- [MongoDB query](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/mongoClient.php): `mongoClient.php`
- **MongoDB service**
- [Soccer data fetch](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/soccerData.php): `soccerData.php`
- **Football data API**

### Shared helpers

- [Path helper](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/path.inc): `path.inc`
- [Host info helper](https://github.com/samuelilagan/thecornerrabbitmqphp_example/blob/master/get_host_info.inc): `get_host_info.inc`

## Connections

- Test client → RabbitMQ library: sends request (evidence: `testRabbitMQClient.php`)
- RPC login client → RabbitMQ library: sends request (evidence: `rpc/loginRequest.php`)
- Test server → RabbitMQ library: processes requests (evidence: `testRabbitMQServer.php`)
- Test server → Request processor: registers callback (evidence: `testRabbitMQServer.php`)
- Request processor → Login handler: dispatches login (evidence: `testRabbitMQServer.php`)
- MongoDB query → MongoDB service: queries (evidence: `mongoClient.php`)
- Soccer data fetch → Football data API: fetches data (evidence: `soccerData.php`)
- Test client → Path helper: requires (evidence: `testRabbitMQClient.php`)
- Test client → Host info helper: requires (evidence: `testRabbitMQClient.php`)
- RPC login client → Path helper: requires (evidence: `rpc/loginRequest.php`)
- RPC login client → Host info helper: requires (evidence: `rpc/loginRequest.php`)
- Test server → Path helper: requires (evidence: `testRabbitMQServer.php`)
- Test server → Host info helper: requires (evidence: `testRabbitMQServer.php`)
