# aleixdel2007-lgtm/proyecto1erp architecture

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

- Interactive diagram: https://gitdiagram.com/aleixdel2007-lgtm/proyecto1erp
- Repository: https://github.com/aleixdel2007-lgtm/proyecto1erp

## Overview

This is a Java/Spring ERP for a digital videogame shop, spanning storefront sales and customer libraries as well as game publishing, inventory procurement, and employee administration. The principal customer journey is browsing the store, placing a basket order, completing payment, and receiving a license in their library. The graph preserves these distinct stages and the collaborator publishing and supplier-replenishment branches. README content was empty; several connections are inferred from module roles and are dashed because the excerpts do not show their calls.

Main entry points: [`src/main/java/dao`](https://github.com/aleixdel2007-lgtm/proyecto1erp/tree/master/src/main/java/dao) (Data access), [`src/main/java/service/implement/VideojuegoServiceImpl.java`](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/VideojuegoServiceImpl.java) (Catalog management), [`src/main/java/service/implement/CompraClavesServiceImpl.java`](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/CompraClavesServiceImpl.java) (Supplier procurement), [`src/main/java/controller/ControllerTienda.java`](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerTienda.java) (Storefront)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sales["Store and sales"]
  node_storefront["Storefront"]
  node_basket["Basket"]
  node_orders["Orders"]
  node_payment["Payment"]
  node_library["Game library"]
  node_ratings["Ratings"]
end

subgraph group_catalog["Catalog and publishing"]
  node_catalog["Game catalog<br/>[Videojuego.java]"]
  node_game_admin["Catalog management"]
  node_collaborator["Collaborator publishing"]
  node_game_assets["Game media and versions"]
end

subgraph group_supply["Inventory and supply"]
  node_procurement["Supplier procurement"]
  node_license_stock["License inventory"]
  node_supplier_orders["Procurement orders<br/>[Compra.java]"]
end

subgraph group_admin["Identity and administration"]
  node_accounts["Accounts and roles<br/>[Cliente.java]"]
  node_staff["Staff administration"]
  node_auth["Login and security"]
end

subgraph group_persistence["Persistence"]
  node_dao["Data access"]
  node_database[("Application database")]
end

node_customer(("Customer"))

node_customer -.->|"browses"| node_storefront
node_storefront -.->|"shows games"| node_catalog
node_customer -.->|"adds games"| node_basket
node_basket -.->|"creates order"| node_orders
node_orders -.->|"requests payment"| node_payment
node_payment -.->|"assigns licenses"| node_license_stock
node_customer -.->|"views purchases"| node_library
node_customer -.->|"submits rating"| node_ratings
node_collaborator -->|"publishes games"| node_game_admin
node_game_admin -->|"stores media"| node_game_assets
node_game_admin -.->|"manages games"| node_catalog
node_procurement -->|"manages orders"| node_supplier_orders
node_procurement -->|"mints received keys"| node_license_stock
node_staff -.->|"administers staff"| node_accounts
node_customer -.->|"signs in"| node_auth
node_auth -.->|"authenticates"| node_accounts
node_storefront -.->|"loads catalog"| node_dao
node_basket -.->|"persists basket"| node_dao
node_orders -.->|"persists orders"| node_dao
node_payment -->|"updates purchases"| node_dao
node_procurement -->|"persists procurement"| node_dao
node_game_admin -->|"persists catalog"| node_dao
node_dao -.->|"reads and writes"| node_database

click node_storefront "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerTienda.java"
click node_basket "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/CestaServiceImpl.java"
click node_orders "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/PedidoServiceImpl.java"
click node_payment "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/PagoServiceImpl.java"
click node_library "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/BibliotecaServiceImpl.java"
click node_ratings "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/ValoracionServiceImpl.java"
click node_catalog "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/catalogo/Videojuego.java"
click node_game_admin "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/VideojuegoServiceImpl.java"
click node_collaborator "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerColaboradorJuegos.java"
click node_game_assets "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/catalogo/ImagenVideojuego.java"
click node_procurement "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/CompraClavesServiceImpl.java"
click node_license_stock "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/ClaveLicenciaServiceImpl.java"
click node_supplier_orders "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/aprovisionamiento/Compra.java"
click node_accounts "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/seguridad/Cliente.java"
click node_staff "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerEmpleado.java"
click node_auth "https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerLogin.java"
click node_dao "https://github.com/aleixdel2007-lgtm/proyecto1erp/tree/master/src/main/java/dao"

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_storefront,node_basket,node_orders,node_payment,node_library,node_ratings toneBlue
class node_catalog,node_game_admin,node_collaborator,node_game_assets toneAmber
class node_procurement,node_license_stock,node_supplier_orders toneMint
class node_accounts,node_staff,node_auth toneRose
class node_dao,node_database,node_customer toneIndigo
```

## Components

### Store and sales

- [Storefront](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerTienda.java): `src/main/java/controller/ControllerTienda.java`
- [Basket](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/CestaServiceImpl.java): `src/main/java/service/implement/CestaServiceImpl.java`
- [Orders](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/PedidoServiceImpl.java): `src/main/java/service/implement/PedidoServiceImpl.java`
- [Payment](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/PagoServiceImpl.java): `src/main/java/service/implement/PagoServiceImpl.java`
- [Game library](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/BibliotecaServiceImpl.java): `src/main/java/service/implement/BibliotecaServiceImpl.java`
- [Ratings](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/ValoracionServiceImpl.java): `src/main/java/service/implement/ValoracionServiceImpl.java`

### Catalog and publishing

- [Game catalog](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/catalogo/Videojuego.java): `src/main/java/model/catalogo/Videojuego.java`
- [Catalog management](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/VideojuegoServiceImpl.java): `src/main/java/service/implement/VideojuegoServiceImpl.java`
- [Collaborator publishing](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerColaboradorJuegos.java): `src/main/java/controller/ControllerColaboradorJuegos.java`
- [Game media and versions](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/catalogo/ImagenVideojuego.java): `src/main/java/model/catalogo/ImagenVideojuego.java`

### Inventory and supply

- [Supplier procurement](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/CompraClavesServiceImpl.java): `src/main/java/service/implement/CompraClavesServiceImpl.java`
- [License inventory](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/service/implement/ClaveLicenciaServiceImpl.java): `src/main/java/service/implement/ClaveLicenciaServiceImpl.java`
- [Procurement orders](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/aprovisionamiento/Compra.java): `src/main/java/model/aprovisionamiento/Compra.java`

### Identity and administration

- [Accounts and roles](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/model/seguridad/Cliente.java): `src/main/java/model/seguridad/Cliente.java`
- [Staff administration](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerEmpleado.java): `src/main/java/controller/ControllerEmpleado.java`
- [Login and security](https://github.com/aleixdel2007-lgtm/proyecto1erp/blob/master/src/main/java/controller/ControllerLogin.java): `src/main/java/controller/ControllerLogin.java`

### Persistence

- [Data access](https://github.com/aleixdel2007-lgtm/proyecto1erp/tree/master/src/main/java/dao): `src/main/java/dao`
- **Application database**

### Other components

- **Customer**

## Connections

- Customer → Storefront: browses
- Storefront → Game catalog: shows games (evidence: `src/main/java/controller/ControllerTienda.java`)
- Customer → Basket: adds games
- Basket → Orders: creates order
- Orders → Payment: requests payment
- Payment → License inventory: assigns licenses
- Customer → Game library: views purchases
- Customer → Ratings: submits rating
- Collaborator publishing → Catalog management: publishes games (evidence: `src/main/java/controller/ControllerColaboradorJuegos.java`)
- Catalog management → Game media and versions: stores media (evidence: `src/main/java/service/implement/VideojuegoServiceImpl.java`)
- Catalog management → Game catalog: manages games (evidence: `src/main/java/service/implement/VideojuegoServiceImpl.java`)
- Supplier procurement → Procurement orders: manages orders (evidence: `src/main/java/service/implement/CompraClavesServiceImpl.java`)
- Supplier procurement → License inventory: mints received keys (evidence: `src/main/java/service/implement/CompraClavesServiceImpl.java`)
- Staff administration → Accounts and roles: administers staff
- Customer → Login and security: signs in
- Login and security → Accounts and roles: authenticates (evidence: `src/main/java/controller/ControllerLogin.java`)
- Storefront → Data access: loads catalog
- Basket → Data access: persists basket
- Orders → Data access: persists orders
- Payment → Data access: updates purchases (evidence: `src/main/java/service/implement/PagoServiceImpl.java`)
- Supplier procurement → Data access: persists procurement (evidence: `src/main/java/service/implement/CompraClavesServiceImpl.java`)
- Catalog management → Data access: persists catalog (evidence: `src/main/java/service/implement/VideojuegoServiceImpl.java`)
- Data access → Application database: reads and writes
