# enmanuelbrosa/parcial_p4_luisenmanuel architecture

> Architecture diagram of the GitHub repository enmanuelbrosa/parcial_p4_luisenmanuel, 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/enmanuelbrosa/parcial_p4_luisenmanuel
- Repository: https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel

## Overview

This is a small ASP.NET Core API for doubling an integer and retaining the result as a timestamped record. A client posts a number; the controller computes the result and asks the service to save the record. Clients can also retrieve one record by ID or list the history. The service initializes and queries a SQLite table. Program.cs wires the service and controller endpoints and exposes OpenAPI/Scalar references. Relationships shown are limited to calls and database operations visible in the excerpts.

Main entry points: [`Controller/NumberController.cs`](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Controller/NumberController.cs) (Number Controller), [`Servicios/NumbersService.cs`](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Servicios/NumbersService.cs) (Numbers Service), [`Program.cs`](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Program.cs) (Application Host), [`Models/NumberRecord.cs`](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Models/NumberRecord.cs) (Number Record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["HTTP API"]
  node_controller["Number Controller"]
  node_api_docs["API References<br/>[Program.cs]"]
end

subgraph group_logic["Number Logic"]
  node_record["Number Record<br/>[NumberRecord.cs]"]
end

subgraph group_persistence["Persistence"]
  node_service["Numbers Service<br/>[NumbersService.cs]"]
  node_sqlite[("SQLite Database")]
end

subgraph group_runtime["Runtime"]
  node_host["Application Host<br/>[Program.cs]"]
end

node_client(("API Client"))

node_client -->|"sends requests"| node_controller
node_controller -->|"creates record"| node_record
node_controller -->|"saves and queries"| node_service
node_service -->|"maps records"| node_record
node_service -->|"reads and writes"| node_sqlite
node_host -->|"initializes"| node_service
node_host -->|"maps references"| node_api_docs
node_controller -->|"returns results"| node_client

click node_controller "https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Controller/NumberController.cs"
click node_service "https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Servicios/NumbersService.cs"
click node_record "https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Models/NumberRecord.cs"
click node_host "https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Program.cs"
click node_api_docs "https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/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_controller,node_api_docs,node_client toneBlue
class node_record toneAmber
class node_service,node_sqlite toneMint
class node_host toneRose
```

## Components

### HTTP API

- [Number Controller](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Controller/NumberController.cs): `Controller/NumberController.cs`
- [API References](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Program.cs): `Program.cs`

### Number Logic

- [Number Record](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Models/NumberRecord.cs): `Models/NumberRecord.cs`

### Persistence

- [Numbers Service](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Servicios/NumbersService.cs): `Servicios/NumbersService.cs`
- **SQLite Database**

### Runtime

- [Application Host](https://github.com/enmanuelbrosa/parcial_p4_luisenmanuel/blob/main/Program.cs): `Program.cs`

### Other components

- **API Client**

## Connections

- API Client → Number Controller: sends requests (evidence: `Controller/NumberController.cs`)
- Number Controller → Number Record: creates record (evidence: `Controller/NumberController.cs`)
- Number Controller → Numbers Service: saves and queries (evidence: `Controller/NumberController.cs`)
- Numbers Service → Number Record: maps records (evidence: `Servicios/NumbersService.cs`)
- Numbers Service → SQLite Database: reads and writes (evidence: `Servicios/NumbersService.cs`)
- Application Host → Numbers Service: initializes (evidence: `Program.cs`)
- Application Host → API References: maps references (evidence: `Program.cs`)
- Number Controller → API Client: returns results (evidence: `Controller/NumberController.cs`)
