# johnulist/serpscanphp architecture

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

- Interactive diagram: https://gitdiagram.com/johnulist/serpscanphp
- Repository: https://github.com/johnulist/serpscanphp

## Overview

This is a small PHP client for Serpscan’s API. A caller uses the single Serpscan class to manage tracked websites and keywords, retrieve keyword rankings, and send HTTP requests to the remote service. The source shows the request methods and JSON decoding, but no README or additional modules document further behavior.

Main entry points: [`src/Serpscan.php`](https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php) (Serpscan client)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Library caller"))
node_client["Serpscan client<br/>[Serpscan.php]"]
node_transport["HTTP transport<br/>[Serpscan.php]"]
node_api{{"Serpscan API"}}
node_websites["Website management<br/>[Serpscan.php]"]
node_keywords["Keyword management<br/>[Serpscan.php]"]
node_rankings["Keyword rankings<br/>[Serpscan.php]"]

node_caller -->|"calls methods"| node_client
node_client -->|"manages sites"| node_websites
node_client -->|"manages keywords"| node_keywords
node_client -->|"retrieves rankings"| node_rankings
node_client -->|"sends requests"| node_transport
node_transport -->|"HTTP requests"| node_api
node_api -->|"returns responses"| node_transport

click node_client "https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php"
click node_transport "https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php"
click node_websites "https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php"
click node_keywords "https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php"
click node_rankings "https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.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_caller toneIndigo
class node_client toneBlue
class node_transport,node_websites,node_keywords,node_rankings toneTeal
class node_api toneMint
```

## Components

### Other components

- **Library caller**
- [Serpscan client](https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php): `src/Serpscan.php`
- [HTTP transport](https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php): `src/Serpscan.php`
- **Serpscan API**
- [Website management](https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php): `src/Serpscan.php`
- [Keyword management](https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php): `src/Serpscan.php`
- [Keyword rankings](https://github.com/johnulist/serpscanphp/blob/master/src/Serpscan.php): `src/Serpscan.php`

## Connections

- Library caller → Serpscan client: calls methods
- Serpscan client → Website management: manages sites
- Serpscan client → Keyword management: manages keywords
- Serpscan client → Keyword rankings: retrieves rankings
- Serpscan client → HTTP transport: sends requests
- HTTP transport → Serpscan API: HTTP requests
- Serpscan API → HTTP transport: returns responses
