<mxfile host="lab.iigtn.com" modified="2026-04-26T13:00:00.000Z" agent="iigtn-platform" version="24.0.0">
  <diagram name="hojokin-db Architecture" id="hojokin-arch">
    <mxGraphModel dx="1600" dy="1200" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1300" pageHeight="1180" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />

        <!-- Title -->
        <mxCell id="title" value="hojokin-db — 配信フロー / 自動更新フロー" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;fontStyle=1;" vertex="1" parent="1">
          <mxGeometry x="400" y="20" width="500" height="30" as="geometry" />
        </mxCell>

        <!-- ============================================== -->
        <!-- Layer A: visitor flow (top) -->
        <!-- ============================================== -->
        <mxCell id="lyrA" value="A. 訪問者の閲覧フロー" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#cccccc;dashed=1;fontSize=12;fontStyle=2;align=left;verticalAlign=top;spacing=8;" vertex="1" parent="1">
          <mxGeometry x="40" y="80" width="640" height="280" as="geometry" />
        </mxCell>

        <mxCell id="user" value="🌐 訪問者&#xa;hojokin.iigtn.com" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666;fontSize=11;" vertex="1" parent="1">
          <mxGeometry x="80" y="130" width="160" height="50" as="geometry" />
        </mxCell>

        <mxCell id="dns" value="Squarespace DNS&#xa;CNAME → CloudFront" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff8e1;strokeColor=#ffa726;fontSize=10;" vertex="1" parent="1">
          <mxGeometry x="80" y="220" width="160" height="50" as="geometry" />
        </mxCell>

        <mxCell id="cf" value="CloudFront&#xa;(OAC)" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#8C4FFF;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=11;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.cloudfront;" vertex="1" parent="1">
          <mxGeometry x="320" y="160" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="acm" value="ACM&#xa;us-east-1" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#DD344C;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.certificate_manager_3;" vertex="1" parent="1">
          <mxGeometry x="471" y="280" width="58" height="58" as="geometry" />
        </mxCell>

        <mxCell id="s3" value="S3 (private)&#xa;静的サイト + /data/*.json" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#7AA116;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.s3;" vertex="1" parent="1">
          <mxGeometry x="540" y="160" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="aedge1" value="① DNS" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="user" target="dns">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="aedge2" value="② HTTPS" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="dns" target="cf">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="aedge3" value="TLS" style="endArrow=classic;dashed=1;html=1;fontSize=10;" edge="1" parent="1" source="acm" target="cf">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="aedge4" value="③ OAC sigv4" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="cf" target="s3">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- ============================================== -->
        <!-- Layer B: crawler -->
        <!-- ============================================== -->
        <mxCell id="lyrB" value="B. 毎日 02:00 JST — クロール &amp; AI 整形" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#cccccc;dashed=1;fontSize=12;fontStyle=2;align=left;verticalAlign=top;spacing=8;" vertex="1" parent="1">
          <mxGeometry x="40" y="400" width="640" height="380" as="geometry" />
        </mxCell>

        <mxCell id="eb1" value="EventBridge&#xa;cron 02:00 JST" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#E7157B;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.eventbridge;" vertex="1" parent="1">
          <mxGeometry x="80" y="460" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="lambda" value="Lambda (Python 3.13)&#xa;hojokin-db-crawler" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#ED7100;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.lambda;" vertex="1" parent="1">
          <mxGeometry x="280" y="460" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="bedrock" value="Bedrock&#xa;Claude Sonnet 4.6" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#01A88D;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.bedrock;" vertex="1" parent="1">
          <mxGeometry x="480" y="460" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="srcs" value="一次ソース&#xa;J-Net21 / ミラサポplus / 自治体" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e3f2fd;strokeColor=#1565c0;fontSize=10;" vertex="1" parent="1">
          <mxGeometry x="240" y="660" width="240" height="60" as="geometry" />
        </mxCell>

        <mxCell id="ddb" value="DynamoDB&#xa;subsidies + GSI ×3" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#3334B9;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.dynamodb;" vertex="1" parent="1">
          <mxGeometry x="540" y="640" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="bedge1" value="① 起動" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="eb1" target="lambda">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="bedge2" value="② HTTP fetch" style="endArrow=classic;dashed=1;html=1;fontSize=10;" edge="1" parent="1" source="lambda" target="srcs">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="bedge3" value="③ HTML→構造化" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="lambda" target="bedrock">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="bedge4" value="④ put_item" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="lambda" target="ddb">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- ============================================== -->
        <!-- Layer C: rebuild (right side) -->
        <!-- ============================================== -->
        <mxCell id="lyrC" value="C. 毎日 03:00 JST — サイト再ビルド" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#cccccc;dashed=1;fontSize=12;fontStyle=2;align=left;verticalAlign=top;spacing=8;" vertex="1" parent="1">
          <mxGeometry x="720" y="80" width="560" height="700" as="geometry" />
        </mxCell>

        <mxCell id="eb2" value="EventBridge&#xa;cron 03:00 JST" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#E7157B;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.eventbridge;" vertex="1" parent="1">
          <mxGeometry x="780" y="140" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="cb" value="CodeBuild&#xa;hojokin-db-site-build" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#D9A741;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.codebuild;" vertex="1" parent="1">
          <mxGeometry x="1080" y="140" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="github" value="GitHub&#xa;iigtn/hojokin-db" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#24292e;strokeColor=#000;fontColor=#fff;fontSize=10;" vertex="1" parent="1">
          <mxGeometry x="1100" y="340" width="160" height="50" as="geometry" />
        </mxCell>

        <mxCell id="ddb2" value="DynamoDB&#xa;(scan 全件)" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#3334B9;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.dynamodb;" vertex="1" parent="1">
          <mxGeometry x="780" y="340" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="s3b" value="S3&#xa;aws s3 sync" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#7AA116;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=10;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.s3;" vertex="1" parent="1">
          <mxGeometry x="930" y="340" width="78" height="78" as="geometry" />
        </mxCell>

        <mxCell id="cedge1" value="① 起動" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="eb2" target="cb">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="cedge2" value="② git clone" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="cb" target="github">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="cedge3" value="③ scan 全件" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="cb" target="ddb2">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="cedge4" value="④ next build &amp; aws s3 sync" style="endArrow=classic;html=1;fontSize=10;" edge="1" parent="1" source="cb" target="s3b">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- ============================================== -->
        <!-- Layer D: IaC (bottom, full width) -->
        <!-- ============================================== -->
        <mxCell id="lyrD" value="D. IaC — Terraform で 25 リソース全部" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fafafa;strokeColor=#cccccc;dashed=1;fontSize=12;fontStyle=2;align=left;verticalAlign=top;spacing=8;" vertex="1" parent="1">
          <mxGeometry x="40" y="820" width="1240" height="320" as="geometry" />
        </mxCell>

        <mxCell id="tfdesc" value="infra/&#xa;　acm.tf / s3_cloudfront.tf / dynamodb.tf / lambda_crawler.tf / codebuild.tf / providers.tf / variables.tf&#xa;&#xa;・aws-prod アカウント (XXXXXXXXXXXX) に 25 リソースを apply&#xa;・state は S3 backend + DynamoDB Lock&#xa;・Squarespace で *.iigtn.com の検証 CNAME を手動投入" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fffaf0;strokeColor=#b85c00;fontSize=12;align=left;verticalAlign=top;spacing=14;" vertex="1" parent="1">
          <mxGeometry x="80" y="880" width="1160" height="220" as="geometry" />
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
