import { Link } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { ArrowRight, BookOpen, Container, Database, GitBranch, LayoutTemplate, Rocket, ShieldCheck, Zap, } from 'lucide-react'; import { listProjects, listTemplates } from '@/lib/api-client'; import { DocsBrowser } from '@/features/docs/DocsBrowser'; import { useAuthSession } from '@/lib/use-auth-session'; import { useDemoMode } from '@/lib/demo-mode'; import { useBranding } from '@/lib/use-branding'; import { BrandWordmark } from '@/shared/components'; import { demoProjects, demoTemplates } from '@/lib/demo-data'; const features = [ { icon: Rocket, title: 'Git-push deploys', text: 'Connect a repository and ship. Builds, rollouts, and rollbacks are handled for you.' }, { icon: Database, title: 'Managed databases', text: 'Provision PostgreSQL, MySQL, Redis and more — with backups and connection management.' }, { icon: ShieldCheck, title: 'High availability', text: 'Failover policies, health checks, and alerting keep services alive across nodes.' }, { icon: GitBranch, title: 'Preview environments', text: 'Every branch gets an isolated environment with its own URL.' }, { icon: LayoutTemplate, title: 'Template catalog', text: 'One-click deploys for popular self-hosted apps and community templates.' }, { icon: Zap, title: 'Autoscaling', text: 'Metric-driven scaling policies adapt replicas to real load.' }, ]; export function LandingPage() { const isDemoMode = useDemoMode(); const { logoUrl, productName } = useBranding(); const sessionQuery = useAuthSession({ enabled: !isDemoMode }); const signedIn = !isDemoMode && Boolean(sessionQuery.data); const demo = isDemoMode ? '?demo=1' : ''; const projectsQuery = useQuery({ queryKey: ['landing-projects'], queryFn: () => listProjects(), staleTime: 60_000, enabled: !isDemoMode }); const templatesQuery = useQuery({ queryKey: ['landing-templates'], queryFn: () => listTemplates(), staleTime: 60_000, enabled: !isDemoMode }); const projects = isDemoMode ? demoProjects : (projectsQuery.data ?? []); const templates = (isDemoMode ? demoTemplates : (templatesQuery.data ?? [])).slice(0, 12); return (
{productName}

self-hosted PaaS

Deploy containers like it's{' '} your own cloud

Containr turns any Docker host into a full deployment platform — git-push builds, managed databases, preview environments, HA failover, and a searchable knowledge base.

{isDemoMode ? 'Explore the live demo' : 'Browse projects'} Read the docs
{projects.length > 0 ? (
sum + (p.stats?.running_services ?? 0), 0)} /> sum + (p.stats?.deployment_count ?? 0), 0)} />
) : null}

Everything a deployment platform needs

One install, one dashboard, full control over your own infrastructure.

{features.map((feature) => (

{feature.title}

{feature.text}

))}

Template catalog

Production-ready presets — deploy in one click from the console.

Browse all
{templates.map((template) => (
{template.logo ? ( ) : ( )} {template.name}

{template.description}

{template.category || 'app'} ))} {templates.length === 0 && !templatesQuery.isPending ? (

Template catalog is empty — sign in to add your own.

) : null}

Documentation

Guides and references — synced from GitHub, cached locally, always available.

Containr — self-hosted container platform
Projects Templates {!isDemoMode ? Admin : null}
); } function Stat({ label, value }: { label: string; value: number }) { return (

{value}

{label}

); }