# cuongcds/advero-php architecture

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

- Interactive diagram: https://gitdiagram.com/cuongcds/advero-php
- Repository: https://github.com/cuongcds/advero-php

## Overview

Advero PHP is a dependency-light server-to-server API client, not the browser ad-display SDK. A PHP application calls its domain methods to manage publisher properties and placements, browse and quote inventory, manage wallet state, build campaigns and creatives, and retrieve reports; the client sends authenticated HTTP requests and returns decoded response data. API error envelopes become AdveroApiException instances. The domain methods and shared transport are all implemented in src/Client.php; the README documents the broader method coverage, while the excerpts show only selected methods and transport behavior.

Main entry points: [`src/Client.php`](https://github.com/cuongcds/advero-php/blob/main/src/Client.php) (HTTP transport), [`src/Exception/AdveroApiException.php`](https://github.com/cuongcds/advero-php/blob/main/src/Exception/AdveroApiException.php) (API exception)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_domain["API domains"]
  node_properties["Properties &amp; placements<br/>[Client.php]"]
  node_plans["Pricing plans<br/>[Client.php]"]
  node_market["Inventory &amp; quotes<br/>[Client.php]"]
  node_wallet["Wallet<br/>[Client.php]"]
  node_campaigns["Campaigns &amp; creatives<br/>[Client.php]"]
  node_reports["Reports<br/>[Client.php]"]
end

subgraph group_core["Client runtime"]
  node_client["Advero Client<br/>[Client.php]"]
  node_transport["HTTP transport<br/>[Client.php]"]
  node_exception["API exception"]
end

node_app(("PHP application"))
node_api{{"Advero API"}}

node_app -->|"calls methods"| node_client
node_properties -->|"requests"| node_transport
node_plans -->|"requests"| node_transport
node_market -->|"requests"| node_transport
node_wallet -->|"requests"| node_transport
node_campaigns -->|"requests"| node_transport
node_reports -->|"requests"| node_transport
node_transport -->|"sends HTTP"| node_api
node_transport -->|"throws on API errors"| node_exception

click node_client "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_properties "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_plans "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_market "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_wallet "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_campaigns "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_reports "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_transport "https://github.com/cuongcds/advero-php/blob/main/src/Client.php"
click node_exception "https://github.com/cuongcds/advero-php/blob/main/src/Exception/AdveroApiException.php"

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_properties,node_plans,node_market,node_wallet,node_campaigns,node_reports toneBlue
class node_client,node_transport,node_exception toneAmber
class node_app toneIndigo
class node_api toneMint
```

## Components

### API domains

- [Properties & placements](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`
- [Pricing plans](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`
- [Inventory & quotes](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`
- [Wallet](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`
- [Campaigns & creatives](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`
- [Reports](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`

### Client runtime

- [Advero Client](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`
- [HTTP transport](https://github.com/cuongcds/advero-php/blob/main/src/Client.php): `src/Client.php`
- [API exception](https://github.com/cuongcds/advero-php/blob/main/src/Exception/AdveroApiException.php): `src/Exception/AdveroApiException.php`

### Other components

- **PHP application**
- **Advero API**

## Connections

- PHP application → Advero Client: calls methods (evidence: `README.md`)
- Properties & placements → HTTP transport: requests (evidence: `src/Client.php`)
- Pricing plans → HTTP transport: requests (evidence: `README.md`)
- Inventory & quotes → HTTP transport: requests (evidence: `src/Client.php`)
- Wallet → HTTP transport: requests (evidence: `README.md`)
- Campaigns & creatives → HTTP transport: requests (evidence: `src/Client.php`)
- Reports → HTTP transport: requests (evidence: `src/Client.php`)
- HTTP transport → Advero API: sends HTTP (evidence: `src/Client.php`)
- HTTP transport → API exception: throws on API errors (evidence: `src/Client.php`)
