# piagsand/eurocards architecture

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

- Interactive diagram: https://gitdiagram.com/piagsand/eurocards
- Repository: https://github.com/piagsand/eurocards

## Overview

This is a browser-based Euro 2024 Topps card-collection manager. Collectors add and track missing, owned, and duplicate cards, then import/export collection data or print/export it as PDF. The README documents the user-facing capabilities, but the browser implementation was not excerpted, so links among its components are based on that documentation; the separate Word-document API is evidenced by its source excerpt.

Main entry points: [`assets/js/scripts.js`](https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js) (Collection management), [`index.html`](https://github.com/piagsand/eurocards/blob/main/index.html) (Collection interface), [`api/generateDocs.py`](https://github.com/piagsand/eurocards/blob/main/api/generateDocs.py) (Word document handler), [`assets/libs/jsPDF-1.3.2/jspdf.js`](https://github.com/piagsand/eurocards/blob/main/assets/libs/jsPDF-1.3.2/jspdf.js) (PDF export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_webapp["Collection app"]
  node_interface["Collection interface<br/>[index.html]"]
  node_manager["Collection management<br/>[scripts.js]"]
  node_missing["Missing cards<br/>[scripts.js]"]
  node_owned["Owned cards<br/>[scripts.js]"]
  node_duplicates["Duplicate cards<br/>[scripts.js]"]
  node_catalog["Card data<br/>[cards.json]"]
end

subgraph group_outputs["Data and output"]
  node_jsonfiles["Collection JSON"]
  node_pdf["PDF export<br/>[jspdf.js]"]
  node_print["Print output<br/>[index.html]"]
end

subgraph group_api["Document API"]
  node_docapi["Word document handler<br/>[generateDocs.py]"]
  node_docx["Word document"]
end

node_collector(("Collector"))

node_collector -->|"uses"| node_interface
node_interface -->|"submits cards"| node_manager
node_manager -->|"tracks"| node_missing
node_manager -->|"tracks"| node_owned
node_manager -->|"tracks"| node_duplicates
node_manager -->|"imports and exports"| node_jsonfiles
node_interface -->|"exports PDF"| node_pdf
node_interface -->|"prints collection"| node_print
node_docapi -->|"generates"| node_docx

click node_interface "https://github.com/piagsand/eurocards/blob/main/index.html"
click node_manager "https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js"
click node_missing "https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js"
click node_owned "https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js"
click node_duplicates "https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js"
click node_catalog "https://github.com/piagsand/eurocards/blob/main/api/cards.json"
click node_pdf "https://github.com/piagsand/eurocards/blob/main/assets/libs/jsPDF-1.3.2/jspdf.js"
click node_print "https://github.com/piagsand/eurocards/blob/main/index.html"
click node_docapi "https://github.com/piagsand/eurocards/blob/main/api/generateDocs.py"

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_interface,node_manager,node_missing,node_owned,node_duplicates,node_catalog toneBlue
class node_jsonfiles,node_pdf,node_print toneAmber
class node_docapi,node_docx toneMint
class node_collector toneIndigo
```

## Components

### Collection app

- [Collection interface](https://github.com/piagsand/eurocards/blob/main/index.html): `index.html`
- [Collection management](https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js): `assets/js/scripts.js`
- [Missing cards](https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js): `assets/js/scripts.js`
- [Owned cards](https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js): `assets/js/scripts.js`
- [Duplicate cards](https://github.com/piagsand/eurocards/blob/main/assets/js/scripts.js): `assets/js/scripts.js`
- [Card data](https://github.com/piagsand/eurocards/blob/main/api/cards.json): `api/cards.json`

### Data and output

- **Collection JSON**
- [PDF export](https://github.com/piagsand/eurocards/blob/main/assets/libs/jsPDF-1.3.2/jspdf.js): `assets/libs/jsPDF-1.3.2/jspdf.js`
- [Print output](https://github.com/piagsand/eurocards/blob/main/index.html): `index.html`

### Document API

- [Word document handler](https://github.com/piagsand/eurocards/blob/main/api/generateDocs.py): `api/generateDocs.py`
- **Word document**

### Other components

- **Collector**

## Connections

- Collector → Collection interface: uses (evidence: `README.md`)
- Collection interface → Collection management: submits cards (evidence: `README.md`)
- Collection management → Missing cards: tracks (evidence: `README.md`)
- Collection management → Owned cards: tracks (evidence: `README.md`)
- Collection management → Duplicate cards: tracks (evidence: `README.md`)
- Collection management → Collection JSON: imports and exports (evidence: `README.md`)
- Collection interface → PDF export: exports PDF (evidence: `README.md`)
- Collection interface → Print output: prints collection (evidence: `README.md`)
- Word document handler → Word document: generates (evidence: `api/generateDocs.py`)
