# dev-macb/poderoso architecture

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

- Interactive diagram: https://gitdiagram.com/dev-macb/poderoso
- Repository: https://github.com/dev-macb/poderoso

## Overview

Poderoso is a small PHP database abstraction library. A consumer configures connection parameters, constructs a table-scoped instance, then uses its CRUD and query helpers; those helpers execute prepared SQL through PDO against the configured database. The single implementation file also provides row counting and configurable selection. The README documents the intended workflow and database portability; the graph reflects the one sampled runtime implementation, without splitting its methods into speculative modules.

Main entry points: [`src/Poderoso.php`](https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php) (Table API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Library API"]
  node_config["Connection config<br/>[Poderoso.php]"]
  node_table_api["Table API<br/>[Poderoso.php]"]
end

subgraph group_runtime["Database runtime"]
  node_connection["PDO connection<br/>[Poderoso.php]"]
  node_queries["SQL execution<br/>[Poderoso.php]"]
end

node_consumer(("PHP consumer"))
node_database[("Database")]

node_consumer -->|"configures"| node_config
node_consumer -->|"calls CRUD"| node_table_api
node_config -->|"sets credentials"| node_connection
node_table_api -->|"constructs via"| node_connection
node_table_api -->|"executes SQL"| node_queries
node_connection -->|"connects"| node_database
node_queries -->|"runs queries"| node_database

click node_config "https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php"
click node_table_api "https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php"
click node_connection "https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php"
click node_queries "https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.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_config,node_table_api toneBlue
class node_connection,node_queries,node_database toneAmber
class node_consumer toneIndigo
```

## Components

### Library API

- [Connection config](https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php): `src/Poderoso.php`
- [Table API](https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php): `src/Poderoso.php`

### Database runtime

- [PDO connection](https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php): `src/Poderoso.php`
- [SQL execution](https://github.com/dev-macb/poderoso/blob/main/src/Poderoso.php): `src/Poderoso.php`

### Other components

- **PHP consumer**
- **Database**

## Connections

- PHP consumer → Connection config: configures (evidence: `README.md`)
- PHP consumer → Table API: calls CRUD (evidence: `README.md`)
- Connection config → PDO connection: sets credentials (evidence: `src/Poderoso.php`)
- Table API → PDO connection: constructs via (evidence: `src/Poderoso.php`)
- Table API → SQL execution: executes SQL (evidence: `src/Poderoso.php`)
- PDO connection → Database: connects (evidence: `src/Poderoso.php`)
- SQL execution → Database: runs queries (evidence: `src/Poderoso.php`)
