Claude commited on
Commit
c3db2dd
Β·
unverified Β·
1 Parent(s): 4c2ca9c

docs(readme): replace minimal architecture diagram with comprehensive version

Browse files

Full architecture diagram now shows:
- IIIF server connections (info.json, tiles, derivatives, full images)
- Frontend internals (OpenSeadragon, region overlays, pages)
- Backend internals (ingestion, AI pipeline, response parser, master writer)
- AI providers (auto-detected, multi-provider)
- Export generators (IIIF 3.0, METS, ALTO, ZIP)
- Local storage (JSON only, no images)
- Complete 8-step pipeline flow per page (ingest β†’ detect β†’ fetch β†’
AI β†’ parse β†’ scale β†’ write β†’ review β†’ export)

https://claude.ai/code/session_01UB4he7RdRPHLvNjky4X8Sw

Files changed (1) hide show
  1. README.md +89 -19
README.md CHANGED
@@ -33,25 +33,95 @@ IIIF Studio ingests images from any [IIIF](https://iiif.io/)-compliant server, a
33
  ## Architecture
34
 
35
  ```
36
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
37
- β”‚ IIIF Image Servers β”‚ Gallica, BnF, Bodleian, ...
38
- β”‚ (origin β€” images stay here)β”‚
39
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
40
- β”‚ IIIF Image API
41
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
42
- β”‚ β”‚ β”‚
43
- β”Œβ”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”
44
- β”‚Backendβ”‚ β”‚Viewer β”‚ β”‚Tiled β”‚
45
- β”‚ (AI) β”‚ β”‚displayβ”‚ β”‚ zoom β”‚
46
- β”‚ bytes β”‚ β”‚ β”‚ β”‚ β”‚
47
- β”‚in RAM β”‚ β”‚ β”‚ β”‚ β”‚
48
- β””β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜
49
- β”‚
50
- β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
51
- β”‚ Local storage β”‚ JSON only (~5 KB/page)
52
- β”‚ master.json + ai_raw.jsonβ”‚ No images on disk
53
- β”‚ + SQLite metadata β”‚
54
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ```
56
 
57
  ### Tech stack
 
33
  ## Architecture
34
 
35
  ```
36
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
37
+ β”‚ IIIF IMAGE SERVERS β”‚
38
+ β”‚ Gallica Β· BnF Β· Bodleian Β· Europeana Β· ... β”‚
39
+ β”‚ (origin β€” images are never copied) β”‚
40
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
41
+ β”‚ β”‚ β”‚
42
+ β”‚ info.json β”‚ /full/!1500,1500/ β”‚ /full/max/
43
+ β”‚ + tiles β”‚ 0/default.jpg β”‚ 0/default.jpg
44
+ β”‚ β”‚ (1500px for AI) β”‚
45
+ β”‚ β”‚ β”‚
46
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
47
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
48
+ β”‚ FRONTEND (SPA) β”‚ β”‚ BACKEND (API) β”‚ β”‚ EXPORT GENERATORS β”‚
49
+ β”‚ React + Vite β”‚ β”‚ FastAPI β”‚ β”‚ β”‚
50
+ β”‚ β”‚ β”‚ β”‚ β”‚ IIIF Manifest 3.0 β”‚
51
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ (with Image Service refs) β”‚
52
+ β”‚ β”‚ OpenSeadragon β”‚ β”‚ β”‚ β”‚ Ingestion β”‚ β”‚ β”‚ β”‚
53
+ β”‚ β”‚ IIIF tiled zoom β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ METS XML β”‚
54
+ β”‚ β”‚ (info.json β†’ β”‚ β”‚ β”‚ β”‚ manifest URL β”‚ β”‚ β”‚ (IIIF URLs, not file paths) β”‚
55
+ β”‚ β”‚ deep zoom) β”‚ β”‚ β”‚ β”‚ β†’ detect svc β”‚ β”‚ β”‚ β”‚
56
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β†’ store meta β”‚ β”‚ β”‚ ALTO XML β”‚
57
+ β”‚ β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ (text geometry per page) β”‚
58
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
59
+ β”‚ β”‚ Region overlays β”‚ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚ β”‚ ZIP bundle β”‚
60
+ β”‚ β”‚ (bbox from β”‚ β”‚ β”‚ β”‚ AI Pipeline β”‚β”‚ β”‚ (manifest + METS + ALTO) β”‚
61
+ β”‚ β”‚ master.json, β”‚ β”‚ β”‚ β”‚ β”‚β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
62
+ β”‚ β”‚ scaled to β”‚ β”‚ β”‚ β”‚ fetch 1500pxβ”‚β”‚
63
+ β”‚ β”‚ canvas coords) β”‚ β”‚ β”‚ β”‚ in memory β”‚β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
64
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚β”‚ β”‚ β”‚
65
+ β”‚ β”‚ β”‚ β”‚ β–Ό β”‚β”‚ β”‚ AI PROVIDERS β”‚
66
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ β”‚ β”‚ send bytes β”‚β”œβ”€β”€β”€β”€β”€β”€β”€β–Ίβ”‚ β”‚
67
+ β”‚ β”‚ Pages β”‚ β”‚ β”‚ β”‚ to AI β”‚β”‚ β”‚ Google Gemini β”‚
68
+ β”‚ β”‚ Home Β· Reader β”‚ β”‚ β”‚ β”‚ οΏ½οΏ½οΏ½ ││◄───────│ Vertex AI β”‚
69
+ β”‚ β”‚ Editor Β· Admin β”‚ β”‚ β”‚ β”‚ β–Ό β”‚β”‚ JSON β”‚ Mistral AI β”‚
70
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ discard img β”‚β”‚ β”‚ β”‚
71
+ β”‚ β”‚ β”‚ β”‚ β”‚ keep JSON β”‚β”‚ β”‚ (auto-detected from β”‚
72
+ β”‚ β”‚ REST API β”‚ β”‚ β”‚ scale bbox β”‚β”‚ β”‚ environment vars) β”‚
73
+ β”‚ β”‚ /api/v1/* β”‚ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
74
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚
75
+ β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
76
+ β”‚ β”‚ β”‚ Response β”‚β”‚
77
+ β”‚ β”‚ β”‚ Parser β”‚β”‚
78
+ └────────────── β”‚ β”‚β”‚
79
+ β”‚ β”‚ raw JSON β”‚β”‚
80
+ β”‚ β”‚ β†’ layout β”‚β”‚
81
+ β”‚ β”‚ β†’ OCR β”‚β”‚
82
+ β”‚ β”‚ β†’ regions β”‚β”‚
83
+ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
84
+ β”‚ β”‚ β”‚
85
+ β”‚ β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
86
+ β”‚ β”‚ Master β”‚β”‚
87
+ β”‚ β”‚ Writer β”‚β”‚
88
+ β”‚ β”‚ β”‚β”‚
89
+ β”‚ β”‚ ai_raw.json β”‚β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
90
+ β”‚ β”‚ master.json β”‚β”‚ β”‚ β”‚
91
+ β”‚ β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β”‚ LOCAL STORAGE β”‚
92
+ β”‚ β”‚ β”‚ β”‚ β”‚
93
+ β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ SQLite (corpus, pages, β”‚
94
+ β”‚ β”‚ manuscripts, jobs, models) β”‚
95
+ └──────────────► β”‚
96
+ β”‚ data/corpora/{slug}/pages/ β”‚
97
+ β”‚ {folio}/master.json β”‚
98
+ β”‚ {folio}/ai_raw.json β”‚
99
+ β”‚ {folio}/alto.xml β”‚
100
+ β”‚ β”‚
101
+ β”‚ ~5 KB per page (JSON only) β”‚
102
+ β”‚ NO image binaries β”‚
103
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
104
+
105
+ PIPELINE FLOW (per page):
106
+
107
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
108
+ β”‚ 1.INGEST │───►│ 2.DETECT │───►│ 3.FETCH │───►│ 4.AI │───►│ 5.PARSE β”‚
109
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
110
+ β”‚ manifest β”‚ β”‚ IIIF svc β”‚ β”‚ 1500px β”‚ β”‚ send β”‚ β”‚ layout β”‚
111
+ β”‚ URL β”‚ β”‚ URL + β”‚ β”‚ JPEG in β”‚ β”‚ image + β”‚ β”‚ regions β”‚
112
+ β”‚ β”‚ β”‚ canvas β”‚ β”‚ memory β”‚ β”‚ prompt β”‚ β”‚ OCR β”‚
113
+ β”‚ β”‚ β”‚ dims β”‚ β”‚ (discard β”‚ β”‚ to β”‚ β”‚ bbox β”‚
114
+ β”‚ β”‚ β”‚ β”‚ β”‚ after) β”‚ β”‚ provider β”‚ β”‚ β”‚
115
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
116
+ β”‚
117
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”
118
+ β”‚ 8.EXPORT │◄───│ 7.REVIEW │◄───│ 6.WRITE │◄──────────────────│ 5b.SCALE β”‚
119
+ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
120
+ β”‚ IIIF 3.0 β”‚ β”‚ human β”‚ β”‚ ai_raw + β”‚ β”‚ bbox β”‚
121
+ β”‚ ALTO XML β”‚ β”‚ correct β”‚ β”‚ master β”‚ β”‚ deriv β†’ β”‚
122
+ β”‚ METS XML β”‚ β”‚ validate β”‚ β”‚ .json β”‚ β”‚ canvas β”‚
123
+ β”‚ ZIP β”‚ β”‚ version β”‚ β”‚ + ALTO β”‚ β”‚ coords β”‚
124
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
125
  ```
126
 
127
  ### Tech stack