import {
IconActivity as Activity,
IconCheck as Check,
IconCloud as Cloud,
IconCopy as Copy,
IconDatabase as Database,
IconFileCode as FileCode,
IconFolder as Folder,
IconFolderOpen as FolderOpen,
IconWorld as Globe,
IconStack2 as Layers,
IconServer as Server,
IconTerminal2 as Terminal,
IconBolt as Zap,
} from '@tabler/icons-react';
import { motion, useInView } from 'framer-motion';
import { useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import logoIcon from '../assets/logo-icon.svg';
// Clean command box with prominent copy button
export function CommandBox({
command,
description,
delay = 0,
}: {
command: string;
description?: string;
delay?: number;
}) {
const [copied, setCopied] = useState(false);
const handleCopy = async () => {
await navigator.clipboard.writeText(command);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
};
return (
{description && {description}
}
$
{command}
{copied ? (
<>
Copied!
>
) : (
<>
Copy
>
)}
);
}
// Step number indicator
function StepNumber({ number, color }: { number: number; color: 'teal' | 'magenta' }) {
return (
{number}
);
}
// Create Visual: Project scaffolding animation
function CreateVisual() {
const ref = useRef(null);
const isInView = useInView(ref, { once: true, margin: '-50px' });
const structure = [
{ name: 'my-app/', icon: FolderOpen, level: 0, delay: 0.2 },
{ name: 'src/', icon: Folder, level: 1, delay: 0.3 },
{ name: 'supabase/', icon: Folder, level: 1, delay: 0.4 },
{ name: 'k8s/', icon: Folder, level: 1, delay: 0.5 },
{ name: 'docker-compose.yml', icon: Layers, level: 1, delay: 0.6 },
{ name: 'package.json', icon: FileCode, level: 1, delay: 0.7 },
];
return (
{/* Behind-card glow */}
{/* Glowing top edge */}
{/* Spotlight from above */}
{/* Particle dots */}
{/* Terminal header */}
{/* Command */}
$
vibecarbon create
{/* File structure */}
{structure.map((item) => (
{item.name}
))}
{/* Bottom-pins the success line when the card is stretched to the
shared row height (lg subgrid) — collapses to nothing when the
card is its natural height (mobile). */}
{/* Success */}
Project created successfully
);
}
// Build Visual: Dev environment running
function BuildVisual() {
const ref = useRef(null);
const isInView = useInView(ref, { once: true, margin: '-50px' });
const services = [
{ name: 'Vite', port: '5173', status: 'ready', icon: Zap, color: 'text-secondary-accent' },
{ name: 'API', port: '3000', status: 'ready', icon: Server, color: 'text-primary' },
{ name: 'Supabase', port: '8000', status: 'ready', icon: Database, color: 'text-green-400' },
{ name: 'Studio', port: '3001', status: 'ready', icon: Globe, color: 'text-blue-400' },
];
return (
{/* Behind-card glow */}
{/* Glowing top edge */}
{/* Spotlight from above */}
{/* Particle dots */}
{/* Header */}
{services.map((service, index) => (
{service.name}
))}
{/* Bottom-pins the footer when the card is stretched to the shared
row height (lg subgrid); no-op at natural height (mobile). */}
{/* Hot reload indicator */}
Hot reload active at localhost:5173
);
}
// Deploy Visual: Production infrastructure
function DeployVisual() {
const ref = useRef(null);
const isInView = useInView(ref, { once: true, margin: '-50px' });
return (
{/* Behind-card glow */}
{/* Glowing top edge */}
{/* Spotlight from above */}
{/* Particle dots */}
{/* Header */}
Production Infrastructure
Kubernetes
{/* Infrastructure diagram */}
{/* Load Balancer */}
Load Balancer
{/* Connection line */}
{/* App Pods */}
{[1, 2, 3].map((i) => (
))}
{/* Connection line */}
{/* Database */}
PostgreSQL HA
{/* Bottom-pins the status bar when the card is stretched to the
shared row height (lg subgrid); no-op at natural height (mobile). */}
{/* Status bar */}
Autoscaling: Active
High availability: Ready
All systems operational
);
}
// Workflow step column
function WorkflowStep({
step,
title,
subtitle,
command,
visual,
color,
}: {
step: number;
title: string;
subtitle: string;
command: string;
visual: React.ReactNode;
color: 'teal' | 'magenta';
}) {
const ref = useRef(null);
const isInView = useInView(ref, { once: true, margin: '-100px' });
const delay = (step - 1) * 0.12;
return (
{title}
{subtitle}
{visual}
);
}
export function WorkflowSection() {
const { t } = useTranslation();
return (
{/* Section header */}
{t('landing.workflow.headline')}
{t('landing.workflow.subheading')}
{/* Steps — 3 columns on desktop (subgrid rows keep title/copy/command/visual
aligned across columns), stacked on mobile */}
}
color="teal"
/>
}
color="magenta"
/>
}
color="teal"
/>
);
}