import type { ReactNode } from "react";
import {
siApple,
siDocker,
siGitea,
siGodaddy,
siHarbor,
siKubernetes,
siNginx,
} from "simple-icons";
import { BarChart3, Globe, Laptop, Rocket } from "lucide-react";
import { BrandIcon } from "@/components/BrandIcon";
import { Boundary, Connector, FlowNode } from "@/components/flow";
type Target = {
name: string;
detail: string;
icon: ReactNode;
accent: string;
};
/** Reached on their own host ports; they sit beside the cluster, not behind it. */
const direct: Target[] = [
{
name: "harbor",
detail: "harbor.tomchien.com:8080",
icon: ,
accent: `#${siHarbor.hex}`,
},
{
name: "gitea",
detail: "gitea.tomchien.com:3001",
icon: ,
accent: `#${siGitea.hex}`,
},
];
/** Applications running in the cluster, reached through ingress-nginx. */
const targets: Target[] = [
{
name: "it-cost-dev",
detail: "dev environment",
icon: ,
accent: "#fcd34d",
},
{
name: "it-cost-prod",
detail: "it-cost-prod.tomchien.com",
icon: ,
accent: "#6ee7b7",
},
{
name: "portal",
detail: "tomchien.com · this site",
icon: ,
accent: "#7dd3fc",
},
];
function TargetCard({ t }: { t: Target }) {
return (
{t.icon}
{t.name}
{t.detail}
);
}
export function RequestFlow() {
return (
}>
}
title="Visitor"
subtitle="Opens a hostname in the browser."
detail="*.tomchien.com"
className="w-full lg:max-w-xs"
/>
}
title="GoDaddy DNS"
subtitle="Records for tomchien.com point every hostname at the lab."
detail="host.tomchien.com → Mac mini"
className="w-full lg:max-w-xs"
/>
}
>
}
title="Nginx on the host"
subtitle="Edge reverse proxy: takes port 80 and forwards it to the cluster ingress."
detail="listen :80 → 127.0.0.1:8081"
className="lg:max-w-60"
/>
}
tone="border-sky-400/40"
className="min-w-0 flex-1"
>
}
title="ingress-nginx"
subtitle="LoadBalancer on 127.0.0.1. Routes each application hostname by its Host header."
detail="127.0.0.1 : 8081"
className="lg:max-w-56"
/>
5
Service → Pod
{targets.map((t) => (
-
))}
Direct on their own ports · not behind ingress-nginx
);
}