# danielprats/perfoc_dvp architecture

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

- Interactive diagram: https://gitdiagram.com/danielprats/perfoc_dvp
- Repository: https://github.com/danielprats/perfoc_dvp

## Overview

Perfoc is an Angular GIS application for viewing geographic layers and supporting location- and parcel-based procedures. The visible workflow starts in the application UI, passes map operations to the GIS map component, and uses GIS services and configured layer data; the tree also shows procedure, photo, and GeoPackage-import features. Source excerpts are partial, so links among those less-sampled features are omitted rather than inferred.

Main entry points: [`Perfoc/src/app/app.component.ts`](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/app.component.ts) (Application shell), [`Perfoc/src/app/shared/components/visor-gis/map.component.ts`](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/map.component.ts) (GIS map), [`Perfoc/src/app/shared/components/visor-gis/services/capes.service.ts`](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/services/capes.service.ts) (Layer service), [`Perfoc/src/app/padre-gis/padre-gis.component.ts`](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/padre-gis/padre-gis.component.ts) (GIS host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Application UI"]
  node_app["Application shell<br/>[app.component.ts]"]
  node_parent["GIS host"]
  node_mapdemo["Map demo"]
  node_procedure_demo["Procedure demo"]
end

subgraph group_mapping["Map and procedures"]
  node_map["GIS map<br/>[map.component.ts]"]
  node_mapviewer["Map viewer"]
  node_procedureviewer["Procedure viewer"]
  node_photo["Photo viewer"]
  node_functions["GIS actions"]
  node_import["GeoPackage import"]
  node_tools["Map tools"]
end

subgraph group_services["GIS services"]
  node_layers["Layer service<br/>[capes.service.ts]"]
  node_geometry["Geometry operations"]
  node_proxy["GIS proxy"]
  node_messages["GIS messages<br/>[message.service.ts]"]
  node_municipalities["Municipality lookup"]
  node_counties["County lookup"]
end

subgraph group_domain["GIS data"]
  node_memory[("In-memory GIS data")]
  node_models["GIS models<br/>[gisCapa.ts]"]
end

node_user(("GIS user"))
node_gis_sources["GIS layer sources"]

node_user -->|"uses"| node_parent
node_parent -->|"hosts"| node_app
node_app -->|"calls map"| node_map
node_app -->|"uses"| node_municipalities
node_app -->|"uses"| node_counties
node_map -->|"manages layers"| node_layers
node_map -->|"dispatches actions"| node_functions
node_map -->|"presents tools"| node_tools
node_layers -->|"uses geometry"| node_geometry
node_layers -.->|"requests layers"| node_gis_sources
node_memory -->|"logs"| node_messages
node_mapdemo -->|"shows"| node_mapviewer
node_procedure_demo -->|"shows"| node_procedureviewer

click node_app "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/app.component.ts"
click node_parent "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/padre-gis/padre-gis.component.ts"
click node_map "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/map.component.ts"
click node_mapviewer "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-mapa-gis/visor-mapa-gis.component.ts"
click node_procedureviewer "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-tramit-gis/visor-tramit-gis.component.ts"
click node_photo "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-foto-gis-component/visor-foto-gis-component.component.ts"
click node_mapdemo "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/demo-visor-mapa-gis/demo-visor-mapa-gis.component.ts"
click node_procedure_demo "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/demo-visor-tramit-gis/demo-visor-tramit-gis.component.ts"
click node_functions "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/funcions/llista-funcions-gis.ts"
click node_import "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/subComponents/import-geo-package/import-geo-package.component.ts"
click node_tools "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/subComponents/tools-gis/tools-gis.component.ts"
click node_layers "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/services/capes.service.ts"
click node_geometry "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/services/aritmetica-gis.service.ts"
click node_proxy "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/services/proxy-gis.service.ts"
click node_memory "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/in-memory-data.service.ts"
click node_models "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/model/gis/gisCapa.ts"
click node_messages "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/message.service.ts"
click node_municipalities "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/municipis.service.ts"
click node_counties "https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/comarques.service.ts"

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_app,node_parent,node_mapdemo,node_procedure_demo,node_user toneBlue
class node_map,node_mapviewer,node_procedureviewer,node_photo,node_functions,node_import,node_tools toneAmber
class node_layers,node_geometry,node_proxy,node_messages,node_municipalities,node_counties toneMint
class node_memory,node_models toneRose
class node_gis_sources toneIndigo
```

## Components

### Application UI

- [Application shell](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/app.component.ts): `Perfoc/src/app/app.component.ts`
- [GIS host](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/padre-gis/padre-gis.component.ts): `Perfoc/src/app/padre-gis/padre-gis.component.ts`
- [Map demo](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/demo-visor-mapa-gis/demo-visor-mapa-gis.component.ts): `Perfoc/src/app/demo-visor-mapa-gis/demo-visor-mapa-gis.component.ts`
- [Procedure demo](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/demo-visor-tramit-gis/demo-visor-tramit-gis.component.ts): `Perfoc/src/app/demo-visor-tramit-gis/demo-visor-tramit-gis.component.ts`

### Map and procedures

- [GIS map](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/map.component.ts): `Perfoc/src/app/shared/components/visor-gis/map.component.ts`
- [Map viewer](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-mapa-gis/visor-mapa-gis.component.ts): `Perfoc/src/app/shared/components/visor-mapa-gis/visor-mapa-gis.component.ts`
- [Procedure viewer](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-tramit-gis/visor-tramit-gis.component.ts): `Perfoc/src/app/shared/components/visor-tramit-gis/visor-tramit-gis.component.ts`
- [Photo viewer](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-foto-gis-component/visor-foto-gis-component.component.ts): `Perfoc/src/app/shared/components/visor-foto-gis-component/visor-foto-gis-component.component.ts`
- [GIS actions](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/funcions/llista-funcions-gis.ts): `Perfoc/src/app/shared/components/visor-gis/funcions/llista-funcions-gis.ts`
- [GeoPackage import](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/subComponents/import-geo-package/import-geo-package.component.ts): `Perfoc/src/app/shared/components/visor-gis/subComponents/import-geo-package/import-geo-package.component.ts`
- [Map tools](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/subComponents/tools-gis/tools-gis.component.ts): `Perfoc/src/app/shared/components/visor-gis/subComponents/tools-gis/tools-gis.component.ts`

### GIS services

- [Layer service](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/services/capes.service.ts): `Perfoc/src/app/shared/components/visor-gis/services/capes.service.ts`
- [Geometry operations](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/services/aritmetica-gis.service.ts): `Perfoc/src/app/shared/components/visor-gis/services/aritmetica-gis.service.ts`
- [GIS proxy](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/shared/components/visor-gis/services/proxy-gis.service.ts): `Perfoc/src/app/shared/components/visor-gis/services/proxy-gis.service.ts`
- [GIS messages](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/message.service.ts): `Perfoc/src/app/core/services/gis/message.service.ts`
- [Municipality lookup](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/municipis.service.ts): `Perfoc/src/app/core/services/gis/municipis.service.ts`
- [County lookup](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/comarques.service.ts): `Perfoc/src/app/core/services/gis/comarques.service.ts`

### GIS data

- [In-memory GIS data](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/services/gis/in-memory-data.service.ts): `Perfoc/src/app/core/services/gis/in-memory-data.service.ts`
- [GIS models](https://github.com/danielprats/perfoc_dvp/blob/main/Perfoc/src/app/core/model/gis/gisCapa.ts): `Perfoc/src/app/core/model/gis/gisCapa.ts`

### Other components

- **GIS user**
- **GIS layer sources**

## Connections

- GIS user → GIS host: uses
- GIS host → Application shell: hosts
- Application shell → GIS map: calls map
- Application shell → Municipality lookup: uses
- Application shell → County lookup: uses
- GIS map → Layer service: manages layers
- GIS map → GIS actions: dispatches actions
- GIS map → Map tools: presents tools
- Layer service → Geometry operations: uses geometry
- Layer service → GIS layer sources: requests layers
- In-memory GIS data → GIS messages: logs
- Map demo → Map viewer: shows
- Procedure demo → Procedure viewer: shows
