# mmalyszko/php-local-vin-decoder architecture

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

- Interactive diagram: https://gitdiagram.com/mmalyszko/php-local-vin-decoder
- Repository: https://github.com/mmalyszko/php-local-vin-decoder

## Overview

This is a small, local PHP VIN-decoding library. A caller constructs a Vin from a 17-character value, then requests its components or decoded brand, model, year, region, and country. VIN parsing and most decoding tables live together in Vin.php; model decoding reads a configurable PHP VDS mapping file, with a bundled example dataset. The excerpts show the model-data read and README documents the supported results and local operation; finer internal call flow is not expanded beyond that evidence.

Main entry points: [`src/VinDecoder/Vin.php`](https://github.com/mmalyszko/php-local-vin-decoder/blob/main/src/VinDecoder/Vin.php) (VIN parsing and decoding), [`src/VinDecoder/data/vds.php`](https://github.com/mmalyszko/php-local-vin-decoder/blob/main/src/VinDecoder/data/vds.php) (Bundled VDS mappings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_decoder["VIN decoder"]
  node_vin["VIN parsing and decoding<br/>[Vin.php]"]
end

subgraph group_data["Model mappings"]
  node_vds["Bundled VDS mappings<br/>[vds.php]"]
end

node_caller(("Library caller"))

node_caller -->|"constructs and queries"| node_vin
node_vin -->|"loads model mappings"| node_vds

click node_vin "https://github.com/mmalyszko/php-local-vin-decoder/blob/main/src/VinDecoder/Vin.php"
click node_vds "https://github.com/mmalyszko/php-local-vin-decoder/blob/main/src/VinDecoder/data/vds.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_vin toneBlue
class node_vds toneAmber
class node_caller toneIndigo
```

## Components

### VIN decoder

- [VIN parsing and decoding](https://github.com/mmalyszko/php-local-vin-decoder/blob/main/src/VinDecoder/Vin.php): `src/VinDecoder/Vin.php`

### Model mappings

- [Bundled VDS mappings](https://github.com/mmalyszko/php-local-vin-decoder/blob/main/src/VinDecoder/data/vds.php): `src/VinDecoder/data/vds.php`

### Other components

- **Library caller**

## Connections

- Library caller → VIN parsing and decoding: constructs and queries (evidence: `README.md`)
- VIN parsing and decoding → Bundled VDS mappings: loads model mappings (evidence: `src/VinDecoder/Vin.php`)
