@startuml
'https://plantuml.com/component-diagram

'TODO:
'improve reliability (don't lost items)
'chaos monkey (cpu, network, connections)
'improve map: add delete, logs, icons
'factory node
'next tile factory
'custom level for each title

package "Local" {
  [LocalMachine]
  component A [
  ]
}

package "Map" {
  [MAP]

  database "Map File" {
  }
  component A [
  1. Store node MAP in filesystem.
  2. Get nodes update from frontend.
  3. Serve frontend.

  1. Create new nodes.
  2. Store nodes ip addresses/state.
  3. Serve adjusted_nodes endpoint.
  ]
}

LocalMachine <--> MAP : working with map

package "Mine" {
  [MINE]
}

package "AdjNextMine" {
  [MINE2]
}

MINE --> MAP : Send Internal State
MINE <-- MAP : Get Adj Nodes

MINE --> MINE2 : Send Item

@enduml