digraph g {
	graph [fontname = "Helvetica Neue", dpi=300, fontsize=13];
	graph [compound = true];
	node [fontname = "Helvetica Neue", fontsize=13];
	edge [fontname = "Helvetica Neue", fontsize=11];
	node [shape=record];	

	client1 [shape=record,label="Phoenix Client (Commit)"];
	client2 [shape=record,label="Phoenix Client (Edge)"];

	subgraph cluster_0 {
		style="filled";
		color="#F0EBD6";

		node [shape=record, style=filled, color="#89DB92"];

		edge_nginx [rotate=90, label="nginx", color="#79B9EB"];
		edge_god [label="God", color="#79B9EB"];

		edge_p4webapi [label="p4_web_api"];
		edge_projectservices [label="project_services"];
		edge_phoenixservices [label="phoenix_services"];
		edge_phoenixupdater [label="phoenix_updater"];
		edge_p4d [label="P4D"];		

		subgraph cluster_1 {
			color="#79B9EB";
			edge_projectservices_db [label="project_services DB"];
			edge_phoenixservices_db [label="phoenix_services DB"];
			label="PostgreSQL";
		}

		edge_phoenixservices -> edge_phoenixupdater;

		edge_projectservices -> edge_projectservices_db;
		edge_phoenixservices -> edge_phoenixservices_db;

		edge_p4webapi -> edge_p4d;

		edge_nginx -> edge_p4webapi;
		edge_nginx -> edge_projectservices;
		edge_nginx -> edge_phoenixservices;
		edge_nginx -> edge_phoenixupdater;

		edge_projectservices -> edge_p4webapi;
		edge_phoenixservices -> edge_projectservices;
		edge_phoenixservices -> edge_p4webapi;

		label="Edge Node";
	}

	subgraph cluster_3 {
		style="filled";
		color="#F0EBD6";

		node [shape=record, style=filled, color="#89DB92"];
		nginx [rotate=90, label="nginx", color="#79B9EB"];
		god [label="God", color="#79B9EB"];

		p4webapi [label="p4_web_api"];
		projectservices [label="project_services"];
		phoenixservices [label="phoenix_services"];
		notificationservices [label="notification_services"];
		edge_phoenixupdater [label="phoenix_updater"];
		p4d [label="P4D"];		

		subgraph cluster_4 {
			color="#79B9EB";
			projectservices_db [label="project_services DB"];
			phoenixservices_db [label="phoenix_services DB"];
			notificationservices_db [label="notification_services DB"];
			label="PostgreSQL";
		}

		subgraph cluster_5 {
			color="#79B9EB";
			notification_queue [label="notification services queue"];
			label="Redis";		
		}

		notificationservices -> notification_queue;
		notificationservices -> phoenixservices;
		phoenixservices -> edge_phoenixupdater;

		projectservices -> projectservices_db;
		phoenixservices -> phoenixservices_db;
		notificationservices -> notificationservices_db;

		p4webapi -> p4d;
		p4d -> notificationservices [label="Triggers"];

		nginx -> p4webapi;
		nginx -> projectservices;
		nginx -> phoenixservices;
		nginx -> notificationservices;
		nginx -> edge_phoenixupdater;

		projectservices -> p4webapi;
		phoenixservices -> projectservices;
		phoenixservices -> p4webapi;


		label="Commit Node"
	}

	notificationservices -> edge_phoenixservices;

	client1 -> nginx [minlen=2];
	client1 -> p4d;

	client2 -> edge_nginx;
	client2 -> edge_p4d;

	edge_p4d -> p4d;
}