import type { Metadata } from "next"; import { Layers, Globe, Server, Database } from "lucide-react"; import { ArchitectureDiagram } from "@/components/docs/architecture-diagram"; import { Card, CardContent, CardHeader, CardTitle, CardDescription, } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; export const metadata: Metadata = { title: "System Overview", }; const services = [ { icon: Globe, title: "Next.js (Vercel)", badge: "Frontend", badgeVariant: "secondary" as const, items: [ "All UI rendering (SSR + client)", "Authentication via Supabase", "WHOIS lookups (whoiser library)", "Domain availability checks (IANA RDAP)", "Dashboard, notifications, settings pages", "Proxies DNS queries to the Go service", ], }, { icon: Server, title: "Go Microservice (VPS)", badge: "DNS API", badgeVariant: "outline" as const, items: [ "DNS record lookups via miekg/dns (UDP/TCP, not DoH)", "Query specific or authoritative nameservers directly", "DNSSEC validation", "DNS propagation checking across multiple resolvers", "Scheduled monitoring (native cron, no serverless time limits)", "Change detection (diff DNS snapshots, notify on changes)", ], }, { icon: Database, title: "Supabase", badge: "Database & Auth", badgeVariant: "secondary" as const, items: [ "Managed Postgres database", "Auth (OAuth + email/password + magic link)", "Row Level Security (RLS) for data isolation", ], }, ]; const tradeoffs = [ { concern: "Frontend hosting, SSR, auth", solution: "Vercel (serverless, zero-ops)", }, { concern: "DNS resolution, monitoring", solution: "Go on VPS (persistent process, no cold starts)", }, { concern: "Database, auth state", solution: "Supabase (managed Postgres)", }, ]; const goAdvantages = [ "Direct UDP/TCP DNS queries — faster, no middleman", "Can query authoritative nameservers directly", "Supports DNSSEC validation, AXFR, propagation checks", "No cold starts, consistent latency", "No Vercel function timeout limits for monitoring jobs", ]; export default function ArchitectureOverviewPage() { return (
{/* Page header */}

System Overview

VectorDNS uses a hybrid architecture: a Next.js frontend on Vercel and a Go DNS microservice on a VPS, backed by Supabase for auth and storage.

{/* Architecture diagram */}

Architecture Diagram

{/* Services */}

What Each Service Handles

{services.map((service) => (
{service.badge}
{service.title}
    {service.items.map((item) => (
  • {item}
  • ))}
))}
{/* Why hybrid */}

Why Hybrid?

{tradeoffs.map(({ concern, solution }) => (
{concern} {solution}
))}
{/* Communication */}

Communication

Next.js API routes call the Go service over HTTPS. The Go service URL is configured via{" "} GO_DNS_API_URL {" "} and requests are authenticated with a shared API key via{" "} GO_DNS_API_KEY .

              Next.js API route → HTTPS → Go DNS API → UDP/TCP → DNS resolvers
            
{/* Why Go over DoH */}

Why Go Over DoH?

VectorDNS uses a custom Go microservice for DNS resolution instead of DNS-over-HTTPS providers like Cloudflare's Tangerine.
    {goAdvantages.map((item) => (
  • {item}
  • ))}
); }