{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "Shelf · Rust + Python 혼합 서버",
    "quality_profile": "showcase",
    "viewBox": [
      1250,
      680
    ]
  },
  "components": [
    {
      "id": "reader",
      "type": "frontend",
      "label": "모바일 리더",
      "sublabel": "탭 · 스크롤 · 읽기 위치",
      "pos": [
        40,
        300
      ],
      "size": [
        200,
        80
      ]
    },
    {
      "id": "web",
      "type": "backend",
      "label": "Flask · Waitress",
      "sublabel": "인증 · ctypes C ABI",
      "pos": [
        350,
        300
      ],
      "size": [
        200,
        80
      ]
    },
    {
      "id": "zip",
      "type": "backend",
      "label": "Rust ZIP 캐시",
      "sublabel": "소유권 · 제한된 LRU",
      "pos": [
        680,
        300
      ],
      "size": [
        200,
        80
      ]
    },
    {
      "id": "media",
      "type": "database",
      "label": "NAS 이미지 원본",
      "sublabel": "폴더 · ZIP / CBZ",
      "pos": [
        1010,
        300
      ],
      "size": [
        200,
        80
      ]
    },
    {
      "id": "state",
      "type": "database",
      "label": "SQLite",
      "sublabel": "색인 · 즐겨찾기 · 책갈피",
      "pos": [
        350,
        80
      ],
      "size": [
        200,
        80
      ]
    },
    {
      "id": "pillow",
      "type": "backend",
      "label": "Pillow",
      "sublabel": "썸네일 · 포맷 변환",
      "pos": [
        680,
        520
      ],
      "size": [
        200,
        80
      ]
    },
    {
      "id": "thumbs",
      "type": "database",
      "label": "썸네일 캐시",
      "sublabel": "디스크 256 MiB",
      "pos": [
        1010,
        520
      ],
      "size": [
        200,
        80
      ]
    }
  ],
  "connections": [
    {
      "id": "http",
      "from": "reader",
      "to": "web",
      "label": "HTTP",
      "variant": "emphasis"
    },
    {
      "id": "read",
      "from": "web",
      "to": "zip",
      "label": "C ABI",
      "variant": "emphasis"
    },
    {
      "id": "zip-read",
      "from": "zip",
      "to": "media",
      "label": "파일 I/O",
      "variant": "emphasis"
    },
    {
      "id": "sql",
      "from": "web",
      "to": "state",
      "label": "SQL",
      "variant": "default"
    },
    {
      "id": "convert",
      "from": "zip",
      "to": "pillow",
      "label": "첫 이미지",
      "variant": "default",
      "labelDy": 24
    },
    {
      "id": "thumb-save",
      "from": "pillow",
      "to": "thumbs",
      "label": "WebP 저장",
      "variant": "default"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Python에 남긴 기능",
      "items": [
        "Flask 인증 · SQLite 색인/책갈피",
        "Pillow 썸네일 · 포맷 변환"
      ]
    },
    {
      "dot": "emerald",
      "title": "Rust가 맡는 경로",
      "items": [
        "ZIP 목차 보관 · 멤버 읽기",
        "결과를 Python에 복사한 뒤 해제"
      ]
    },
    {
      "dot": "amber",
      "title": "Blue / Green",
      "items": [
        "Blue: 기존 Python 계속 서비스",
        "Green: 별도 포트 · 데이터 사본"
      ]
    }
  ]
}