{
  "schema_version": 1,
  "diagram_type": "architecture",
  "meta": {
    "title": "Переназначение: требуемый поток",
    "quality_profile": "showcase",
    "viewBox": [
      1100,
      620
    ],
    "repository": {
      "url": "https://github.com/krus210/freelance-marketplace",
      "revision": "7a6f26a63b8fc24355f30ee026a0fb8f047a3965"
    }
  },
  "components": [
    {
      "id": "gateway",
      "type": "backend",
      "label": "api-gateway",
      "sublabel": "Вход HTTP",
      "pos": [
        60,
        100
      ],
      "size": [
        230,
        80
      ],
      "sources": [
        {
          "path": "services/api-gateway/handler/http.go",
          "line": 72,
          "label": "Код в task_3"
        }
      ]
    },
    {
      "id": "task",
      "type": "backend",
      "label": "task-service",
      "sublabel": "Состояние задания",
      "pos": [
        410,
        100
      ],
      "size": [
        230,
        80
      ],
      "sources": [
        {
          "path": "services/task-service/usecase/task.go",
          "line": 91,
          "label": "Код в task_3"
        }
      ]
    },
    {
      "id": "bus",
      "type": "messagebus",
      "label": "NATS",
      "sublabel": "События через outbox",
      "pos": [
        760,
        100
      ],
      "size": [
        230,
        80
      ],
      "sources": [
        {
          "path": "services/task-service/infra/outbox.go",
          "line": 1,
          "label": "Код в task_3"
        }
      ]
    },
    {
      "id": "matching",
      "type": "backend",
      "label": "matching-service",
      "sublabel": "Следующий исполнитель",
      "pos": [
        760,
        390
      ],
      "size": [
        230,
        80
      ],
      "sources": [
        {
          "path": "services/matching-service/usecase/matching.go",
          "line": 96,
          "label": "Код в task_3"
        }
      ]
    },
    {
      "id": "notify",
      "type": "backend",
      "label": "notification-service",
      "sublabel": "Оффер и уведомление",
      "pos": [
        410,
        390
      ],
      "size": [
        230,
        80
      ],
      "sources": [
        {
          "path": "services/notification-service/usecase/notification.go",
          "line": 47,
          "label": "Код в task_3"
        }
      ]
    }
  ],
  "connections": [
    {
      "from": "gateway",
      "to": "task",
      "label": "gRPC: отказ"
    },
    {
      "from": "task",
      "to": "bus",
      "label": "offer.declined"
    },
    {
      "from": "bus",
      "to": "matching",
      "label": "подписка",
      "labelDy": 75
    },
    {
      "from": "matching",
      "to": "notify",
      "label": "match.found / NATS"
    }
  ],
  "cards": [
    {
      "dot": "amber",
      "title": "Требование",
      "items": [
        "До трёх переназначений после первого подбора.",
        "Статус failed принадлежит task-service."
      ]
    }
  ]
}