# gs1/gs1_digitallink_resolver_ce architecture

> Architecture diagram of the GitHub repository gs1/gs1_digitallink_resolver_ce, 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/gs1/gs1_digitallink_resolver_ce
- Repository: https://github.com/gs1/gs1_digitallink_resolver_ce

## Overview

GS1 Resolver CE maps GS1 Digital Link identifiers to contextually appropriate web resources. Consumers request a product link or linkset; the web service interprets the identifier, retrieves stored link data, negotiates link type, language, context and media type, then redirects or returns linkset data. Operators use a separate data-entry API to create, merge, delete and batch-manage those records. The README documents the proxy and single document database; source excerpts are partial, so some internal service wiring is represented only where supported.

Main entry points: [`web_server/src/web_namespace.py`](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_namespace.py) (Resolver routes), [`web_server/src/web_logic.py`](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_logic.py) (Resolution logic), [`frontend_proxy_server/nginx.conf`](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/frontend_proxy_server/nginx.conf) (Frontend proxy), [`data_entry_server/src/data_entry_namespace.py`](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/data_entry_namespace.py) (Entry routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Data entry"]
  node_data_app["Entry API app<br/>[__init__.py]"]
  node_data_routes["Entry routes"]
  node_data_logic["Entry operations"]
  node_entry_models["Request models<br/>[request_models.py]"]
  node_entry_db["Entry database access<br/>[data_entry_db.py]"]
  node_gs1_toolkit_entry["GS1 link toolkit"]
end

subgraph group_resolve["Resolution"]
  node_web_app["Resolver app<br/>[__init__.py]"]
  node_web_routes["Resolver routes<br/>[web_namespace.py]"]
  node_web_logic["Resolution logic<br/>[web_logic.py]"]
  node_gs1_toolkit_web["GS1 link toolkit"]
  node_web_encoder["GS1 syntax encoder<br/>[gs1encoder.mjs]"]
  node_resolver_description["Resolver description<br/>[gs1resolver.json]"]
end

subgraph group_storage["Document storage"]
  node_web_db_access["Resolver database access<br/>[web_db.py]"]
  node_mongo[("Document database")]
end

subgraph group_edge["Edge routing"]
  node_proxy["Frontend proxy<br/>[nginx.conf]"]
end

node_consumer(("Consumer"))
node_operator(("Data operator"))

node_operator -.->|"submits records"| node_proxy
node_proxy -.->|"routes entry requests"| node_data_app
node_operator -->|"manages records"| node_data_app
node_data_app -->|"serves API"| node_data_routes
node_data_routes -->|"validates payloads"| node_entry_models
node_data_routes -->|"dispatches operations"| node_data_logic
node_data_logic -->|"reads and writes"| node_entry_db
node_entry_db -->|"accesses documents"| node_mongo
node_consumer -.->|"requests identifier"| node_proxy
node_proxy -.->|"routes resolver requests"| node_web_app
node_consumer -->|"requests resource"| node_web_app
node_web_app -->|"serves routes"| node_web_routes
node_web_routes -->|"processes resolution"| node_web_logic
node_web_routes -->|"serves description"| node_resolver_description
node_web_logic -->|"looks up links"| node_web_db_access
node_web_db_access -->|"reads documents"| node_mongo
node_web_logic -->|"handles link syntax"| node_gs1_toolkit_web
node_web_logic -.->|"compresses identifiers"| node_web_encoder
node_web_encoder -.->|"uses toolkit"| node_gs1_toolkit_web
node_web_routes -->|"redirects or returns linkset"| node_consumer

click node_data_app "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/__init__.py"
click node_data_routes "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/data_entry_namespace.py"
click node_data_logic "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/data_entry_logic.py"
click node_entry_models "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/models/request_models.py"
click node_entry_db "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/data_entry_db.py"
click node_gs1_toolkit_entry "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/gs1-digitallink-toolkit/GS1DigitalLinkToolkit.js"
click node_web_app "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/__init__.py"
click node_web_routes "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_namespace.py"
click node_web_logic "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_logic.py"
click node_gs1_toolkit_web "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/gs1-digitallink-toolkit/GS1DigitalLinkToolkit.js"
click node_web_encoder "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/gs1-digitallink-toolkit/gs1encoder.mjs"
click node_resolver_description "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/public/gs1resolver.json"
click node_web_db_access "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_db.py"
click node_proxy "https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/frontend_proxy_server/nginx.conf"

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_data_app,node_data_routes,node_data_logic,node_entry_models,node_entry_db,node_gs1_toolkit_entry toneBlue
class node_web_app,node_web_routes,node_web_logic,node_gs1_toolkit_web,node_web_encoder,node_resolver_description toneAmber
class node_web_db_access,node_mongo toneMint
class node_proxy toneRose
class node_consumer,node_operator toneIndigo
```

## Components

### Data entry

- [Entry API app](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/__init__.py): `data_entry_server/src/__init__.py`
- [Entry routes](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/data_entry_namespace.py): `data_entry_server/src/data_entry_namespace.py`
- [Entry operations](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/data_entry_logic.py): `data_entry_server/src/data_entry_logic.py`
- [Request models](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/models/request_models.py): `data_entry_server/src/models/request_models.py`
- [Entry database access](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/data_entry_db.py): `data_entry_server/src/data_entry_db.py`
- [GS1 link toolkit](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/data_entry_server/src/gs1-digitallink-toolkit/GS1DigitalLinkToolkit.js): `data_entry_server/src/gs1-digitallink-toolkit/GS1DigitalLinkToolkit.js`

### Resolution

- [Resolver app](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/__init__.py): `web_server/src/__init__.py`
- [Resolver routes](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_namespace.py): `web_server/src/web_namespace.py`
- [Resolution logic](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_logic.py): `web_server/src/web_logic.py`
- [GS1 link toolkit](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/gs1-digitallink-toolkit/GS1DigitalLinkToolkit.js): `web_server/src/gs1-digitallink-toolkit/GS1DigitalLinkToolkit.js`
- [GS1 syntax encoder](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/gs1-digitallink-toolkit/gs1encoder.mjs): `web_server/src/gs1-digitallink-toolkit/gs1encoder.mjs`
- [Resolver description](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/public/gs1resolver.json): `web_server/src/public/gs1resolver.json`

### Document storage

- [Resolver database access](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/web_server/src/web_db.py): `web_server/src/web_db.py`
- **Document database**

### Edge routing

- [Frontend proxy](https://github.com/gs1/gs1_digitallink_resolver_ce/blob/master/frontend_proxy_server/nginx.conf): `frontend_proxy_server/nginx.conf`

### Other components

- **Consumer**
- **Data operator**

## Connections

- Data operator → Frontend proxy: submits records
- Frontend proxy → Entry API app: routes entry requests
- Data operator → Entry API app: manages records
- Entry API app → Entry routes: serves API
- Entry routes → Request models: validates payloads
- Entry routes → Entry operations: dispatches operations
- Entry operations → Entry database access: reads and writes
- Entry database access → Document database: accesses documents
- Consumer → Frontend proxy: requests identifier
- Frontend proxy → Resolver app: routes resolver requests
- Consumer → Resolver app: requests resource
- Resolver app → Resolver routes: serves routes
- Resolver routes → Resolution logic: processes resolution
- Resolver routes → Resolver description: serves description
- Resolution logic → Resolver database access: looks up links
- Resolver database access → Document database: reads documents
- Resolution logic → GS1 link toolkit: handles link syntax
- Resolution logic → GS1 syntax encoder: compresses identifiers
- GS1 syntax encoder → GS1 link toolkit: uses toolkit
- Resolver routes → Consumer: redirects or returns linkset
