{
  "meta": {
    "owner": "mai",
    "description": "Posimai 開発インフラ構成",
    "updated": "2026-03-29",
    "version": "1"
  },
  "nodes": [
    {
      "id": "windows-pc",
      "label": "Windows PC",
      "type": "device",
      "description": "メイン開発機。Claude Code / VS Code / Git",
      "status": "active"
    },
    {
      "id": "iphone",
      "label": "iPhone",
      "type": "device",
      "description": "PWA テスト・モバイル確認",
      "status": "active"
    },
    {
      "id": "synology",
      "label": "Synology NAS",
      "type": "device",
      "description": "ローカルストレージ・Gitea ホスト",
      "status": "active"
    },
    {
      "id": "vps-hetzner",
      "label": "VPS (Hetzner)",
      "type": "server",
      "description": "Posimai API 本番サーバー。Docker コンテナで運用",
      "url": "https://api.soar-enrich.com",
      "status": "active"
    },
    {
      "id": "tailscale",
      "label": "Tailscale",
      "type": "network",
      "description": "デバイス間 VPN メッシュ。PC / iPhone / Synology / VPS を接続",
      "url": "https://tailscale.com",
      "status": "active"
    },
    {
      "id": "cloudflare",
      "label": "Cloudflare",
      "type": "network",
      "description": "DNS 管理。api.soar-enrich.com 等のドメインを管理",
      "status": "active"
    },
    {
      "id": "github",
      "label": "GitHub",
      "type": "cloud",
      "description": "ソースコード管理。push で Vercel 自動デプロイをトリガー",
      "url": "https://github.com/posimai",
      "status": "active"
    },
    {
      "id": "vercel",
      "label": "Vercel",
      "type": "cloud",
      "description": "全 posimai-* アプリのホスティング・自動デプロイ",
      "url": "https://vercel.com",
      "status": "active"
    },
    {
      "id": "stripe",
      "label": "Stripe",
      "type": "cloud",
      "description": "決済処理。共同開発者と共有",
      "url": "https://stripe.com",
      "status": "active"
    },
    {
      "id": "gitea",
      "label": "Gitea",
      "type": "service",
      "description": "ローカル Git バックアップ。Synology 上で Docker 動作",
      "url": "http://100.76.7.3:3000",
      "status": "active"
    },
    {
      "id": "docker",
      "label": "Docker",
      "type": "service",
      "description": "VPS 上のコンテナランタイム。Posimai API コンテナを管理",
      "status": "active"
    },
    {
      "id": "posimai-api",
      "label": "Posimai API",
      "type": "service",
      "description": "server.js。認証・記事・TTS・ジャーナル API を提供",
      "url": "https://api.soar-enrich.com",
      "status": "active"
    },
    {
      "id": "posimai-apps",
      "label": "Posimai Apps",
      "type": "app",
      "description": "25+ の posimai-* PWA 群。Vercel でホスト",
      "url": "https://posimai-dashboard.vercel.app",
      "status": "active"
    }
  ],
  "edges": [
    { "from": "windows-pc", "to": "tailscale", "type": "connects", "label": "VPN" },
    { "from": "iphone", "to": "tailscale", "type": "connects", "label": "VPN" },
    { "from": "synology", "to": "tailscale", "type": "connects", "label": "VPN" },
    { "from": "vps-hetzner", "to": "tailscale", "type": "connects", "label": "VPN" },
    { "from": "windows-pc", "to": "gitea", "type": "push", "label": "git push" },
    { "from": "windows-pc", "to": "github", "type": "push", "label": "git push" },
    { "from": "github", "to": "vercel", "type": "trigger", "label": "auto deploy" },
    { "from": "vercel", "to": "posimai-apps", "type": "hosts" },
    { "from": "gitea", "to": "synology", "type": "runs-on" },
    { "from": "docker", "to": "vps-hetzner", "type": "runs-on" },
    { "from": "posimai-api", "to": "docker", "type": "runs-on", "label": "container" },
    { "from": "posimai-apps", "to": "posimai-api", "type": "calls", "label": "API" },
    { "from": "cloudflare", "to": "vps-hetzner", "type": "dns", "label": "DNS" },
    { "from": "posimai-apps", "to": "stripe", "type": "calls", "label": "payment" }
  ]
}
