# axelc2code/ark-system architecture

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

- Interactive diagram: https://gitdiagram.com/axelc2code/ark-system
- Repository: https://github.com/axelc2code/ark-system

## Overview

##### Project type and purpose
- From the README and file‐tree, this is a desktop WinForms application written in C#.
- Its purpose (“inventory management system”) is to let users register products, sort them, assign categories, and compute stock per category.

##### File structure
- Top level:
- T2_FP_G7.sln – Visual Studio solution
- LICENSE, README.md – documentation
- G7_GestionInventario/ – the VS C# project
- Inside G7_GestionInventario:
- Program.cs – application entry point, launches the main form
- G7_frmPrincipal.* – the WinForms UI layer (Designer, code-behind, resources)
- Clases/ – domain entities: G7_Producto.cs, G7_Categoria.cs
- Logica/ – business‐logic layer: G7_Inventario.cs (and a deprecated manager)
- Properties/ & Recursos/ – assemblies info, resources, settings, .resx files
- App.config – application configuration

##### Key insights from README
- Desktop client (WinForms)
- No separate web server or microservice—purely a monolithic client app
- Emphasis on product registration, advanced sorting, category stock calculations

- UI Layer: WinForms form (G7_frmPrincipal)
- Business‐Logic Layer: G7_Inventario class (inventory manager)
- Domain Model: G7_Producto, G7_Categoria
- Configuration/Persistence: App.config + in‐memory or file‐based storage
- .NET Framework runtime (external dependency)
b. Relationships & interactions
- UI binds to domain objects via business‐logic APIs
c. Architectural patterns & principles
- Layered Architecture (Presentation → Business Logic → Domain)
- Separation of Concerns: UI code in forms, logic in a separate class, entities in their own namespace
- Single Responsibility: each folder holds a single type of component (Clases vs Logica)
d. Technologies & frameworks
- C# with .NET WinForms
- Visual Studio solution/project system (.csproj, .sln)
- .resx resource management
- App.config for settings

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Layer
    subgraph "Presentation Layer"
        direction TB
        Program["Program.cs"]:::frontend
        UIForm["G7_frmPrincipal.cs / Designer / resx"]:::frontend
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        direction TB
        InventoryManager["Inventory Manager (G7_Inventario)"]:::logic
        ArchivedManager["G7_GestorInventario (deprecated)"]:::logic
    end

    %% Domain Model
    subgraph "Domain Model"
        direction TB
        Product["G7_Producto.cs"]:::domain
        Category["G7_Categoria.cs"]:::domain
    end

    %% Configuration & Persistence
    subgraph "Configuration & Persistence"
        direction TB
        AppConfig["App.config"]:::config
        Settings["Settings.settings"]:::config
        SettingsDesigner["Settings.Designer.cs"]:::config
    end

    %% Resources
    subgraph "Resources"
        direction TB
        ResourcesResx["Resources.resx"]:::resources
        RecursosDir["Recursos"]:::resources
    end

    %% Project & Solution Files
    subgraph "Project & Solution"
        direction TB
        Solution["T2_FP_G7.sln"]:::external
        ProjectFile["G7_GestionInventario.csproj"]:::external
        License["LICENSE"]:::external
        Readme["README.md"]:::external
    end

    %% External Dependencies
    DotNet[".NET Framework Runtime"]:::external

    %% Connections
    Program -->|"launches"| UIForm
    UIForm -->|"invokes methods on"| InventoryManager
    InventoryManager -->|"uses"| Product
    InventoryManager -->|"uses"| Category
    InventoryManager -->|"loads/saves"| AppConfig
    InventoryManager -->|"loads/saves"| Settings
    InventoryManager -->|"loads/saves"| SettingsDesigner

    UIForm -->|"binds to"| Product
    UIForm -->|"binds to"| Category

    DotNet --- Program
    DotNet --- InventoryManager
    DotNet --- UIForm
    DotNet --- Product
    DotNet --- Category

    %% Click Events
    click Program "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/Program.cs"
    click UIForm "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/G7_frmPrincipal.cs"
    click UIForm "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/G7_frmPrincipal.Designer.cs"
    click UIForm "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/G7_frmPrincipal.resx"
    click InventoryManager "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/Logica/G7_Inventario.cs"
    click ArchivedManager "https://github.com/axelc2code/ark-system/tree/main/G7_GestionInventario/Logica/G7_GestorInventario(deprecated)"
    click Product "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/Clases/G7_Producto.cs"
    click Category "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/Clases/G7_Categoria.cs"
    click AppConfig "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/App.config"
    click Settings "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/Properties/Settings.settings"
    click SettingsDesigner "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/Properties/Settings.Designer.cs"
    click ResourcesResx "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/Properties/Resources.resx"
    click RecursosDir "https://github.com/axelc2code/ark-system/tree/main/G7_GestionInventario/Recursos"
    click Solution "https://github.com/axelc2code/ark-system/blob/main/T2_FP_G7.sln"
    click ProjectFile "https://github.com/axelc2code/ark-system/blob/main/G7_GestionInventario/G7_GestionInventario.csproj"
    click License "https://github.com/axelc2code/ark-system/tree/main/LICENSE"
    click Readme "https://github.com/axelc2code/ark-system/blob/main/README.md"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,color:#004085;
    classDef logic fill:#d4edda,stroke:#155724,color:#155724;
    classDef domain fill:#fff3cd,stroke:#856404,color:#856404;
    classDef config fill:#e2e3e5,stroke:#383d41,color:#383d41;
    classDef resources fill:#f5c6cb,stroke:#721c24,color:#721c24;
    classDef external fill:#d6d8db,stroke:#1b1e21,color:#1b1e21;
```
