# thiagopaivamed/rastreadorprecos architecture

> Architecture diagram of the GitHub repository thiagopaivamed/rastreadorprecos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thiagopaivamed/rastreadorprecos
- Repository: https://github.com/thiagopaivamed/rastreadorprecos

## Overview

##### Main Components

a. Client Layer:
- Web Browser
- Static Assets (CSS, JavaScript, including Chart.js)
- jQuery Validation components

b. Application Layer:
- MVC Components:
- Controllers (ProdutosController, InformacoesConsultaController)
- Views (Produtos, InformacoesConsulta, Shared views)
- Models (Produto, InformacoesConsulta)

c. Data Layer:
- PostgreSQL Database
- ADO.NET Data Access Layer

##### Component Relationships

- Data flow between Controllers and Models
- Database interactions through ADO.NET
- Chart.js visualization data flow

##### Detailed Component Breakdown

Client Tier:
**[Web Browser]**
- Views
- Chart.js Visualizations
- jQuery Validation
- Static Assets (CSS/JS)

Application Tier:
**[ASP.NET Core MVC]**
- Controllers
- ProdutosController
- InformacoesConsultaController
- Models
- Produto
- InformacoesConsulta
- Views
- Produtos
- InformacoesConsulta
- Shared

Data Tier:
**[ADO.NET]**
- [PostgreSQL Database]

##### Technical Details to Highlight

- .NET Core 3.1 runtime environment
- PostgreSQL database connections
- Chart.js integration points
- Static file serving (wwwroot)
- Model validation flow

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef client fill:#3498db,stroke:#2980b9,color:white
    classDef mvc fill:#2ecc71,stroke:#27ae60,color:white
    classDef data fill:#f1c40f,stroke:#f39c12,color:black
    classDef database fill:#9b59b6,stroke:#8e44ad,color:white
    classDef config fill:#e74c3c,stroke:#c0392b,color:white

    %% Client Layer
    subgraph ClientLayer
        Browser["Web Browser"]:::client
        StaticAssets["Static Assets"]:::client
        jQuery["jQuery Validation"]:::client
        ChartJS["Chart.js Visualizations"]:::client
    end

    %% Application Layer
    subgraph ApplicationLayer
        %% Controllers
        ProdController["Products Controller"]:::mvc
        InfoController["Consultation Info Controller"]:::mvc

        %% Models
        ProdModel["Product Model"]:::mvc
        InfoModel["Consultation Info Model"]:::mvc

        %% Views
        ProdViews["Product Views"]:::mvc
        InfoViews["Consultation Info Views"]:::mvc
        SharedViews["Shared Views"]:::mvc

        %% Config
        AppConfig["Application Config"]:::config
        Startup["Startup Configuration"]:::config
    end

    %% Data Layer
    subgraph DataLayer
        ADO["ADO.NET Data Access"]:::data
        DB[(PostgreSQL Database)]:::database
    end

    %% Relationships
    Browser --> ProdController & InfoController
    Browser --> StaticAssets
    Browser --> jQuery
    Browser --> ChartJS

    ProdController --> ProdModel
    InfoController --> InfoModel
    
    ProdController --> ProdViews
    InfoController --> InfoViews
    ProdController & InfoController --> SharedViews

    ProdModel & InfoModel --> ADO
    ADO --> DB

    %% Click events for component mapping
    click ProdController "https://github.com/thiagopaivamed/RastreadorPrecos/blob/master/RastreadorPrecos/Controllers/ProdutosController.cs"
    click InfoController "https://github.com/thiagopaivamed/RastreadorPrecos/blob/master/RastreadorPrecos/Controllers/InformacoesConsultaController.cs"
    click ProdModel "https://github.com/thiagopaivamed/RastreadorPrecos/blob/master/RastreadorPrecos/Models/Produto.cs"
    click InfoModel "https://github.com/thiagopaivamed/RastreadorPrecos/blob/master/RastreadorPrecos/Models/InformacoesConsulta.cs"
    click ProdViews "https://github.com/thiagopaivamed/RastreadorPrecos/tree/master/RastreadorPrecos/Views/Produtos/"
    click InfoViews "https://github.com/thiagopaivamed/RastreadorPrecos/tree/master/RastreadorPrecos/Views/InformacoesConsulta/"
    click SharedViews "https://github.com/thiagopaivamed/RastreadorPrecos/tree/master/RastreadorPrecos/Views/Shared/"
    click jQuery "https://github.com/thiagopaivamed/RastreadorPrecos/tree/master/RastreadorPrecos/wwwroot/lib/jquery-validation/"
    click StaticAssets "https://github.com/thiagopaivamed/RastreadorPrecos/tree/master/RastreadorPrecos/wwwroot/"
    click AppConfig "https://github.com/thiagopaivamed/RastreadorPrecos/blob/master/RastreadorPrecos/appsettings.json"
    click Startup "https://github.com/thiagopaivamed/RastreadorPrecos/blob/master/RastreadorPrecos/Startup.cs"
    click DB "https://github.com/thiagopaivamed/RastreadorPrecos/blob/master/sql.txt"

    %% Legend
    subgraph Legend
        Client["Client Component"]:::client
        MVC["MVC Component"]:::mvc
        DataAccess["Data Access Component"]:::data
        DatabaseComp["Database"]:::database
        ConfigComp["Configuration"]:::config
    end
```
