# hugomrj/mimbre architecture

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

- Interactive diagram: https://gitdiagram.com/hugomrj/mimbre
- Repository: https://github.com/hugomrj/mimbre

## Overview

This is a Micronaut business-management application. Users maintain clients, products, categories and suppliers, then register purchases to increase inventory and sales to validate and reduce stock; they can also inspect dashboard data. The graph shows API/UI entry points, domain services and persistence boundaries. The README mainly documents the framework and run/package commands, not product capabilities. Relationships are limited to calls or dependencies visible in excerpts and the SOURCE INDEX; unsampled modules are represented only where the tree or index supports them.

Main entry points: [`src/main/java/com/app/venta/service/VentaService.java`](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/service/VentaService.java) (Sale processing), [`src/main/java/com/app/compra/service/CompraService.java`](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/service/CompraService.java) (Purchase processing), [`src/main/java/com/app/dashboard/controller/DashboardApiController.java`](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/dashboard/controller/DashboardApiController.java) (Dashboard data API), [`src/main/java/com/app/producto/repository/ProductoRepository.java`](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto/repository/ProductoRepository.java) (Product records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
end

subgraph group_catalog["Catalog and parties"]
  node_client_endpoints["Client endpoints"]
  node_client_service["Client management"]
  node_client_store[("Client records")]
  node_product_endpoints["Product endpoints"]
  node_product_service["Product management"]
  node_product_store[("Product records")]
  node_category_endpoints["Category endpoints"]
  node_category_service["Category management"]
  node_category_store[("Category records")]
  node_supplier_ui["Supplier screens"]
  node_supplier_service["Supplier management"]
  node_supplier_store[("Supplier records")]
end

subgraph group_transactions["Purchases and sales"]
  node_purchase_ui["Purchase screens"]
  node_purchase_service["Purchase processing<br/>[CompraService.java]"]
  node_purchase_store[("Purchase records")]
  node_purchase_lines[("Purchase lines")]
  node_sale_ui["Sales screens"]
  node_sale_api["Sales endpoints"]
  node_sale_service["Sale processing<br/>[VentaService.java]"]
  node_sale_store[("Sale records")]
  node_sale_lines[("Sale lines")]
end

subgraph group_insight["Dashboard"]
  node_dashboard_api["Dashboard data API"]
  node_dashboard_ui["Dashboard screens"]
end

node_user(("User"))

node_user -->|"manages clients"| node_client_endpoints
node_client_endpoints -->|"delegates to"| node_client_service
node_client_service -->|"reads and writes"| node_client_store
node_user -->|"manages products"| node_product_endpoints
node_product_endpoints -->|"delegates to"| node_product_service
node_product_service -->|"reads and writes"| node_product_store
node_user -->|"manages categories"| node_category_endpoints
node_category_endpoints -->|"delegates to"| node_category_service
node_category_service -->|"reads and writes"| node_category_store
node_category_service -->|"checks product usage"| node_product_store
node_user -->|"manages suppliers"| node_supplier_ui
node_supplier_ui -->|"delegates to"| node_supplier_service
node_supplier_service -->|"reads and writes"| node_supplier_store
node_supplier_service -->|"checks purchase usage"| node_purchase_store
node_user -->|"records purchases"| node_purchase_ui
node_purchase_ui -->|"delegates to"| node_purchase_service
node_purchase_service -->|"reads and writes"| node_purchase_store
node_purchase_service -->|"reads and writes"| node_purchase_lines
node_purchase_service -->|"updates inventory"| node_product_store
node_purchase_service -->|"resolves supplier"| node_supplier_store
node_user -->|"records sales"| node_sale_ui
node_sale_ui -->|"delegates to"| node_sale_service
node_user -->|"submits sales"| node_sale_api
node_sale_api -->|"delegates to"| node_sale_service
node_sale_service -->|"reads and writes"| node_sale_store
node_sale_service -->|"reads and writes"| node_sale_lines
node_sale_service -->|"checks and updates stock"| node_product_store
node_sale_service -->|"resolves client"| node_client_store
node_user -->|"requests overview"| node_dashboard_api
node_dashboard_api -->|"requests client data"| node_client_service
node_dashboard_api -->|"requests product data"| node_product_service
node_dashboard_api -->|"requests sales data"| node_sale_service
node_user -->|"opens dashboard"| node_dashboard_ui

click node_client_endpoints "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/cliente/controller/ClienteController.java"
click node_client_service "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/cliente/service/ClienteService.java"
click node_client_store "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/cliente/repository/ClienteRepository.java"
click node_product_endpoints "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto/controller/ProductoController.java"
click node_product_service "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto/service/ProductoService.java"
click node_product_store "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto/repository/ProductoRepository.java"
click node_category_endpoints "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto_categoria/controller/ProductoCategoriaController.java"
click node_category_service "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto_categoria/service/ProductoCategoriaService.java"
click node_category_store "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto_categoria/repository/ProductoCategoriaRepository.java"
click node_supplier_ui "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/proveedor/ProveedorUiController.java"
click node_supplier_service "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/proveedor/ProveedorService.java"
click node_supplier_store "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/proveedor/ProveedorRepository.java"
click node_purchase_ui "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/controller/CompraUiController.java"
click node_purchase_service "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/service/CompraService.java"
click node_purchase_store "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/repository/CompraRepository.java"
click node_purchase_lines "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/repository/CompraDetalleRepository.java"
click node_sale_ui "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/controller/VentaUiController.java"
click node_sale_api "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/controller/VentaController.java"
click node_sale_service "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/service/VentaService.java"
click node_sale_store "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/repository/VentaRepository.java"
click node_sale_lines "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/repository/VentaDetalleRepository.java"
click node_dashboard_api "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/dashboard/controller/DashboardApiController.java"
click node_dashboard_ui "https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/dashboard/controller/DashboardUiController.java"

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_endpoints,node_client_service,node_client_store,node_product_endpoints,node_product_service,node_product_store,node_category_endpoints,node_category_service,node_category_store,node_supplier_ui,node_supplier_service,node_supplier_store toneAmber
class node_purchase_ui,node_purchase_service,node_purchase_store,node_purchase_lines,node_sale_ui,node_sale_api,node_sale_service,node_sale_store,node_sale_lines toneMint
class node_dashboard_api,node_dashboard_ui toneRose
class node_user toneBlue
```

## Components

### Catalog and parties

- [Client endpoints](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/cliente/controller/ClienteController.java): `src/main/java/com/app/cliente/controller/ClienteController.java`
- [Client management](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/cliente/service/ClienteService.java): `src/main/java/com/app/cliente/service/ClienteService.java`
- [Client records](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/cliente/repository/ClienteRepository.java): `src/main/java/com/app/cliente/repository/ClienteRepository.java`
- [Product endpoints](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto/controller/ProductoController.java): `src/main/java/com/app/producto/controller/ProductoController.java`
- [Product management](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto/service/ProductoService.java): `src/main/java/com/app/producto/service/ProductoService.java`
- [Product records](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto/repository/ProductoRepository.java): `src/main/java/com/app/producto/repository/ProductoRepository.java`
- [Category endpoints](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto_categoria/controller/ProductoCategoriaController.java): `src/main/java/com/app/producto_categoria/controller/ProductoCategoriaController.java`
- [Category management](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto_categoria/service/ProductoCategoriaService.java): `src/main/java/com/app/producto_categoria/service/ProductoCategoriaService.java`
- [Category records](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/producto_categoria/repository/ProductoCategoriaRepository.java): `src/main/java/com/app/producto_categoria/repository/ProductoCategoriaRepository.java`
- [Supplier screens](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/proveedor/ProveedorUiController.java): `src/main/java/com/app/proveedor/ProveedorUiController.java`
- [Supplier management](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/proveedor/ProveedorService.java): `src/main/java/com/app/proveedor/ProveedorService.java`
- [Supplier records](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/proveedor/ProveedorRepository.java): `src/main/java/com/app/proveedor/ProveedorRepository.java`

### Purchases and sales

- [Purchase screens](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/controller/CompraUiController.java): `src/main/java/com/app/compra/controller/CompraUiController.java`
- [Purchase processing](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/service/CompraService.java): `src/main/java/com/app/compra/service/CompraService.java`
- [Purchase records](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/repository/CompraRepository.java): `src/main/java/com/app/compra/repository/CompraRepository.java`
- [Purchase lines](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/compra/repository/CompraDetalleRepository.java): `src/main/java/com/app/compra/repository/CompraDetalleRepository.java`
- [Sales screens](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/controller/VentaUiController.java): `src/main/java/com/app/venta/controller/VentaUiController.java`
- [Sales endpoints](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/controller/VentaController.java): `src/main/java/com/app/venta/controller/VentaController.java`
- [Sale processing](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/service/VentaService.java): `src/main/java/com/app/venta/service/VentaService.java`
- [Sale records](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/repository/VentaRepository.java): `src/main/java/com/app/venta/repository/VentaRepository.java`
- [Sale lines](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/venta/repository/VentaDetalleRepository.java): `src/main/java/com/app/venta/repository/VentaDetalleRepository.java`

### Dashboard

- [Dashboard data API](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/dashboard/controller/DashboardApiController.java): `src/main/java/com/app/dashboard/controller/DashboardApiController.java`
- [Dashboard screens](https://github.com/hugomrj/mimbre/blob/main/src/main/java/com/app/dashboard/controller/DashboardUiController.java): `src/main/java/com/app/dashboard/controller/DashboardUiController.java`

### Other components

- **User**

## Connections

- User → Client endpoints: manages clients (evidence: `src/main/java/com/app/cliente/controller/ClienteController.java`)
- Client endpoints → Client management: delegates to (evidence: `src/main/java/com/app/cliente/controller/ClienteController.java`)
- Client management → Client records: reads and writes (evidence: `src/main/java/com/app/cliente/service/ClienteService.java`)
- User → Product endpoints: manages products (evidence: `src/main/java/com/app/producto/controller/ProductoController.java`)
- Product endpoints → Product management: delegates to (evidence: `src/main/java/com/app/producto/controller/ProductoController.java`)
- Product management → Product records: reads and writes (evidence: `src/main/java/com/app/producto/service/ProductoService.java`)
- User → Category endpoints: manages categories (evidence: `src/main/java/com/app/producto_categoria/controller/ProductoCategoriaController.java`)
- Category endpoints → Category management: delegates to (evidence: `src/main/java/com/app/producto_categoria/controller/ProductoCategoriaController.java`)
- Category management → Category records: reads and writes (evidence: `src/main/java/com/app/producto_categoria/service/ProductoCategoriaService.java`)
- Category management → Product records: checks product usage (evidence: `src/main/java/com/app/producto_categoria/service/ProductoCategoriaService.java`)
- User → Supplier screens: manages suppliers (evidence: `src/main/java/com/app/proveedor/ProveedorUiController.java`)
- Supplier screens → Supplier management: delegates to (evidence: `src/main/java/com/app/proveedor/ProveedorUiController.java`)
- Supplier management → Supplier records: reads and writes (evidence: `src/main/java/com/app/proveedor/ProveedorService.java`)
- Supplier management → Purchase records: checks purchase usage (evidence: `src/main/java/com/app/proveedor/ProveedorService.java`)
- User → Purchase screens: records purchases (evidence: `src/main/java/com/app/compra/controller/CompraUiController.java`)
- Purchase screens → Purchase processing: delegates to (evidence: `src/main/java/com/app/compra/controller/CompraUiController.java`)
- Purchase processing → Purchase records: reads and writes (evidence: `src/main/java/com/app/compra/service/CompraService.java`)
- Purchase processing → Purchase lines: reads and writes (evidence: `src/main/java/com/app/compra/service/CompraService.java`)
- Purchase processing → Product records: updates inventory (evidence: `src/main/java/com/app/compra/service/CompraService.java`)
- Purchase processing → Supplier records: resolves supplier (evidence: `src/main/java/com/app/compra/service/CompraService.java`)
- User → Sales screens: records sales (evidence: `src/main/java/com/app/venta/controller/VentaUiController.java`)
- Sales screens → Sale processing: delegates to (evidence: `src/main/java/com/app/venta/controller/VentaUiController.java`)
- User → Sales endpoints: submits sales (evidence: `src/main/java/com/app/venta/controller/VentaController.java`)
- Sales endpoints → Sale processing: delegates to (evidence: `src/main/java/com/app/venta/controller/VentaController.java`)
- Sale processing → Sale records: reads and writes (evidence: `src/main/java/com/app/venta/service/VentaService.java`)
- Sale processing → Sale lines: reads and writes (evidence: `src/main/java/com/app/venta/service/VentaService.java`)
- Sale processing → Product records: checks and updates stock (evidence: `src/main/java/com/app/venta/service/VentaService.java`)
- Sale processing → Client records: resolves client (evidence: `src/main/java/com/app/venta/service/VentaService.java`)
- User → Dashboard data API: requests overview (evidence: `src/main/java/com/app/dashboard/controller/DashboardApiController.java`)
- Dashboard data API → Client management: requests client data (evidence: `src/main/java/com/app/dashboard/controller/DashboardApiController.java`)
- Dashboard data API → Product management: requests product data (evidence: `src/main/java/com/app/dashboard/controller/DashboardApiController.java`)
- Dashboard data API → Sale processing: requests sales data (evidence: `src/main/java/com/app/dashboard/controller/DashboardApiController.java`)
- User → Dashboard screens: opens dashboard (evidence: `src/main/java/com/app/dashboard/controller/DashboardUiController.java`)
