# pillacaantonio/proyectoapi architecture

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

- Interactive diagram: https://gitdiagram.com/pillacaantonio/proyectoapi
- Repository: https://github.com/pillacaantonio/proyectoapi

## Overview

ProyectoApi is an ASP.NET Core API for client, product, and invoice-detail operations. HTTP requests enter resource controllers, which delegate to repository interfaces; repository implementations execute stored-procedure operations through a shared database executor and return response models. The sampled code shows client and product data access in detail, and the source index identifies the corresponding invoice-detail repository and its dependencies. No README was provided, and the database executor’s implementation was not excerpted, so the graph does not assert a specific database connection flow.

Main entry points: [`ProyectoApi/Program.cs`](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Program.cs) (Service registration), [`ProyectoApi/Helpers/IDatabaseExecutor.cs`](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Helpers/IDatabaseExecutor.cs) (Database executor contract), [`ProyectoApi/Controllers/ClienteController.cs`](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/ClienteController.cs) (Client controller), [`ProyectoApi/Controllers/ProductoController.cs`](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/ProductoController.cs) (Product controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["HTTP API"]
  node_client_controller["Client controller"]
  node_product_controller["Product controller"]
  node_detail_controller["Invoice detail controller"]
end

subgraph group_domain["Domain contracts"]
  node_client_contracts["Client contracts"]
  node_product_contracts["Product contracts"]
  node_detail_contracts["Detail contracts"]
end

subgraph group_data["Data access"]
  node_client_interface["Client repository contract"]
  node_product_interface["Product repository contract"]
  node_detail_interface["Detail repository contract"]
  node_client_repository["Client repository"]
  node_product_repository["Product repository"]
  node_detail_repository["Invoice detail repository"]
  node_executor_interface["Database executor contract"]
  node_executor["Database executor"]
end

subgraph group_runtime["Application setup"]
  node_startup["Service registration<br/>[Program.cs]"]
end

node_caller(("API caller"))

node_caller -->|"sends requests"| node_client_controller
node_caller -->|"sends requests"| node_product_controller
node_caller -->|"sends requests"| node_detail_controller
node_client_controller -->|"delegates to"| node_client_interface
node_product_controller -->|"delegates to"| node_product_interface
node_detail_controller -->|"delegates to"| node_detail_interface
node_client_controller -->|"uses models"| node_client_contracts
node_product_controller -->|"uses models"| node_product_contracts
node_detail_controller -->|"uses models"| node_detail_contracts
node_client_repository -->|"executes through"| node_executor_interface
node_product_repository -->|"executes through"| node_executor_interface
node_detail_repository -->|"executes through"| node_executor_interface
node_client_repository -->|"maps models"| node_client_contracts
node_product_repository -->|"maps models"| node_product_contracts
node_detail_repository -->|"maps models"| node_detail_contracts
node_startup -->|"registers service"| node_executor_interface
node_startup -->|"creates service"| node_executor
node_startup -->|"registers implementation"| node_client_repository
node_startup -->|"registers implementation"| node_product_repository
node_startup -->|"registers implementation"| node_detail_repository

click node_client_controller "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/ClienteController.cs"
click node_product_controller "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/ProductoController.cs"
click node_detail_controller "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/FacDetalleController.cs"
click node_client_contracts "https://github.com/pillacaantonio/proyectoapi/tree/main/ProyectoApi/Models"
click node_product_contracts "https://github.com/pillacaantonio/proyectoapi/tree/main/ProyectoApi/Models"
click node_detail_contracts "https://github.com/pillacaantonio/proyectoapi/tree/main/ProyectoApi/Models"
click node_client_interface "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/interfaces/IClienteRepository.cs"
click node_product_interface "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/interfaces/IProductoRepository.cs"
click node_detail_interface "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/interfaces/IFacDetalleRepository.cs"
click node_client_repository "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/ClienteRepository.cs"
click node_product_repository "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/ProductoRepository.cs"
click node_detail_repository "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/FacDetalleRepository.cs"
click node_executor_interface "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Helpers/IDatabaseExecutor.cs"
click node_executor "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Helpers/DatabaseExecutor.cs"
click node_startup "https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Program.cs"

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_client_controller,node_product_controller,node_detail_controller toneBlue
class node_client_contracts,node_product_contracts,node_detail_contracts toneAmber
class node_client_interface,node_product_interface,node_detail_interface,node_client_repository,node_product_repository,node_detail_repository,node_executor_interface,node_executor,node_caller toneMint
class node_startup toneRose
```

## Components

### HTTP API

- [Client controller](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/ClienteController.cs): `ProyectoApi/Controllers/ClienteController.cs`
- [Product controller](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/ProductoController.cs): `ProyectoApi/Controllers/ProductoController.cs`
- [Invoice detail controller](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Controllers/FacDetalleController.cs): `ProyectoApi/Controllers/FacDetalleController.cs`

### Domain contracts

- [Client contracts](https://github.com/pillacaantonio/proyectoapi/tree/main/ProyectoApi/Models): `ProyectoApi/Models`
- [Product contracts](https://github.com/pillacaantonio/proyectoapi/tree/main/ProyectoApi/Models): `ProyectoApi/Models`
- [Detail contracts](https://github.com/pillacaantonio/proyectoapi/tree/main/ProyectoApi/Models): `ProyectoApi/Models`

### Data access

- [Client repository contract](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/interfaces/IClienteRepository.cs): `ProyectoApi/Repositories/interfaces/IClienteRepository.cs`
- [Product repository contract](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/interfaces/IProductoRepository.cs): `ProyectoApi/Repositories/interfaces/IProductoRepository.cs`
- [Detail repository contract](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/interfaces/IFacDetalleRepository.cs): `ProyectoApi/Repositories/interfaces/IFacDetalleRepository.cs`
- [Client repository](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/ClienteRepository.cs): `ProyectoApi/Repositories/ClienteRepository.cs`
- [Product repository](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/ProductoRepository.cs): `ProyectoApi/Repositories/ProductoRepository.cs`
- [Invoice detail repository](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Repositories/FacDetalleRepository.cs): `ProyectoApi/Repositories/FacDetalleRepository.cs`
- [Database executor contract](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Helpers/IDatabaseExecutor.cs): `ProyectoApi/Helpers/IDatabaseExecutor.cs`
- [Database executor](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Helpers/DatabaseExecutor.cs): `ProyectoApi/Helpers/DatabaseExecutor.cs`

### Application setup

- [Service registration](https://github.com/pillacaantonio/proyectoapi/blob/main/ProyectoApi/Program.cs): `ProyectoApi/Program.cs`

### Other components

- **API caller**

## Connections

- API caller → Client controller: sends requests
- API caller → Product controller: sends requests
- API caller → Invoice detail controller: sends requests
- Client controller → Client repository contract: delegates to (evidence: `ProyectoApi/Controllers/ClienteController.cs`)
- Product controller → Product repository contract: delegates to (evidence: `ProyectoApi/Controllers/ProductoController.cs`)
- Invoice detail controller → Detail repository contract: delegates to (evidence: `ProyectoApi/Controllers/FacDetalleController.cs`)
- Client controller → Client contracts: uses models (evidence: `ProyectoApi/Controllers/ClienteController.cs`)
- Product controller → Product contracts: uses models (evidence: `ProyectoApi/Controllers/ProductoController.cs`)
- Invoice detail controller → Detail contracts: uses models (evidence: `ProyectoApi/Controllers/FacDetalleController.cs`)
- Client repository → Database executor contract: executes through (evidence: `ProyectoApi/Repositories/ClienteRepository.cs`)
- Product repository → Database executor contract: executes through (evidence: `ProyectoApi/Repositories/ProductoRepository.cs`)
- Invoice detail repository → Database executor contract: executes through (evidence: `ProyectoApi/Repositories/FacDetalleRepository.cs`)
- Client repository → Client contracts: maps models (evidence: `ProyectoApi/Repositories/ClienteRepository.cs`)
- Product repository → Product contracts: maps models (evidence: `ProyectoApi/Repositories/ProductoRepository.cs`)
- Invoice detail repository → Detail contracts: maps models (evidence: `ProyectoApi/Repositories/FacDetalleRepository.cs`)
- Service registration → Database executor contract: registers service (evidence: `ProyectoApi/Program.cs`)
- Service registration → Database executor: creates service (evidence: `ProyectoApi/Program.cs`)
- Service registration → Client repository: registers implementation (evidence: `ProyectoApi/Program.cs`)
- Service registration → Product repository: registers implementation (evidence: `ProyectoApi/Program.cs`)
- Service registration → Invoice detail repository: registers implementation (evidence: `ProyectoApi/Program.cs`)
