import Layout from "@/components/Layout"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Link } from "react-router-dom"; import { Microscope, Sparkles, ArrowRight, Rocket, Layers, Users, BookOpen, Terminal, Shield, Compass, Zap, Gamepad2, Briefcase, Network, TrendingUp, Heart, MessageSquare, Avatar, } from "lucide-react"; import { useEffect, useMemo, useState } from "react"; import { Avatar as AvatarComponent, AvatarFallback, AvatarImage, } from "@/components/ui/avatar"; import { communityService } from "@/lib/supabase-service"; const ARMS = [ { id: "labs", label: "AeThex Labs", icon: Zap, color: "from-yellow-500 to-orange-600", description: "Experimental interfaces and prototypes", focus: "R&D, Innovation, Emerging tech", }, { id: "gameforge", label: "GameForge", icon: Gamepad2, color: "from-green-500 to-emerald-600", description: "Game development studios and tools", focus: "Game Development, Studios, Tools", }, { id: "corp", label: "AeThex Corp", icon: Briefcase, color: "from-blue-500 to-indigo-600", description: "Enterprise consulting & architecture", focus: "Consulting, Architecture, Delivery", }, { id: "foundation", label: "Foundation", icon: BookOpen, color: "from-red-500 to-rose-600", description: "Education, mentorship & learning", focus: "Education, Mentorship, Guidance", }, { id: "devlink", label: "Dev-Link", icon: Network, color: "from-cyan-500 to-blue-600", description: "Developer community & connections", focus: "Community, Networking, Resources", }, { id: "nexus", label: "Nexus", icon: Sparkles, color: "from-purple-500 to-pink-600", description: "Opportunities and collaborations", focus: "Opportunities, Collaborations, Growth", }, { id: "staff", label: "Staff", icon: Shield, color: "from-indigo-500 to-purple-600", description: "Internal operations and governance", focus: "Operations, Governance, Support", }, ]; export default function Explore() { const [featuredPosts, setFeaturedPosts] = useState([]); const [topCreators, setTopCreators] = useState([]); const [isLoadingFeed, setIsLoadingFeed] = useState(true); useEffect(() => { const loadFeaturedContent = async () => { try { const posts = await communityService.getPosts(12); const sorted = posts .sort((a: any) => (a.likes_count || 0) - (a.comments_count || 0)) .slice(0, 6); setFeaturedPosts(sorted); const creators = new Map(); posts.forEach((post: any) => { const author = post.user_profiles; if (author?.id) { if (!creators.has(author.id)) { creators.set(author.id, { ...author, posts: 1, likes: post.likes_count || 0, }); } else { const existing = creators.get(author.id); existing.posts += 1; existing.likes += post.likes_count || 0; } } }); const topCreatorsArray = Array.from(creators.values()) .sort((a, b) => b.likes - a.likes) .slice(0, 4); setTopCreators(topCreatorsArray); } catch (error) { console.error("Failed to load featured content:", error); } finally { setIsLoadingFeed(false); } }; loadFeaturedContent(); }, []); const achievements = useMemo( () => [ { metric: "10K+", label: "Active Creators" }, { metric: "500+", label: "Projects Shipped" }, { metric: "99.99%", label: "Feature Quality" }, { metric: "24/7", label: "Global Community" }, ], [], ); const serviceOfferings = useMemo( () => [ { title: "Game Development", description: "Studios and indie support", link: "/game-development", tags: ["Studios", "Tools"], icon: Rocket, cardClass: "border-blue-500/40 bg-gradient-to-br from-blue-950/60 via-indigo-950/30 to-purple-900/40 text-blue-100 hover:border-blue-400/80 hover:shadow-[0_0_25px_rgba(59,130,246,0.35)]", titleClass: "text-blue-100", descriptionClass: "text-blue-100/70", buttonClass: "bg-gradient-to-r from-blue-500 via-indigo-500 to-purple-500 hover:from-blue-400 hover:via-indigo-400 hover:to-purple-400 text-white shadow-[0_0_18px_rgba(59,130,246,0.25)]", }, { title: "Consulting", description: "Architecture & delivery", link: "/consulting", tags: ["Architecture", "Delivery"], icon: Layers, cardClass: "border-fuchsia-500/40 bg-gradient-to-br from-fuchsia-950/60 via-rose-950/30 to-purple-900/40 text-fuchsia-100 hover:border-fuchsia-400/80 hover:shadow-[0_0_25px_rgba(217,70,239,0.35)]", titleClass: "text-fuchsia-100", descriptionClass: "text-fuchsia-100/70", buttonClass: "bg-gradient-to-r from-fuchsia-500 via-pink-500 to-rose-500 hover:from-fuchsia-400 hover:via-pink-400 hover:to-rose-400 text-white shadow-[0_0_18px_rgba(236,72,153,0.25)]", }, { title: "Mentorship", description: "Programs and guidance", link: "/mentorship", tags: ["Programs", "Guidance"], icon: Users, cardClass: "border-emerald-500/40 bg-gradient-to-br from-emerald-950/60 via-teal-950/30 to-blue-900/40 text-emerald-100 hover:border-emerald-400/80 hover:shadow-[0_0_25px_rgba(16,185,129,0.35)]", titleClass: "text-emerald-100", descriptionClass: "text-emerald-100/70", buttonClass: "bg-gradient-to-r from-emerald-500 via-teal-500 to-cyan-500 hover:from-emerald-400 hover:via-teal-400 hover:to-cyan-400 text-black font-semibold shadow-[0_0_18px_rgba(20,184,166,0.25)]", }, ], [], ); const resourceOfferings = useMemo( () => [ { title: "Documentation", description: "Guides and tutorials", tags: ["Guides", "Tutorials"], icon: BookOpen, cardClass: "border-cyan-400/40 bg-gradient-to-br from-cyan-950/50 via-sky-950/25 to-blue-900/30 text-cyan-100 hover:border-cyan-300/70 hover:shadow-[0_0_20px_rgba(34,211,238,0.3)]", titleClass: "text-cyan-100", descriptionClass: "text-cyan-100/70", actions: [ { label: "Docs", href: "/docs", variant: "outline", buttonClass: "border-cyan-400/60 text-cyan-200 hover:bg-cyan-500/10 hover:text-cyan-100", }, { label: "Tutorials", href: "/docs/tutorials", variant: "outline", buttonClass: "border-cyan-400/60 text-cyan-200 hover:bg-cyan-500/10 hover:text-cyan-100", }, ], }, { title: "Community", description: "News and discussions", tags: ["Blog", "Hub"], icon: Shield, cardClass: "border-orange-400/40 bg-gradient-to-br from-amber-950/50 via-orange-950/25 to-rose-900/30 text-orange-100 hover:border-orange-300/70 hover:shadow-[0_0_20px_rgba(249,115,22,0.3)]", titleClass: "text-orange-100", descriptionClass: "text-orange-100/70", actions: [ { label: "Community", href: "/community", variant: "outline", buttonClass: "border-orange-400/60 text-orange-200 hover:bg-orange-500/10 hover:text-orange-100", }, { label: "Blog", href: "/blog", variant: "outline", buttonClass: "border-orange-400/60 text-orange-200 hover:bg-orange-500/10 hover:text-orange-100", }, ], }, { title: "Company", description: "About and contact", tags: ["About", "Contact"], icon: Compass, cardClass: "border-indigo-400/40 bg-gradient-to-br from-indigo-950/50 via-blue-950/25 to-slate-900/30 text-indigo-100 hover:border-indigo-300/70 hover:shadow-[0_0_20px_rgba(99,102,241,0.3)]", titleClass: "text-indigo-100", descriptionClass: "text-indigo-100/70", actions: [ { label: "About", href: "/about", variant: "outline", buttonClass: "border-indigo-400/60 text-indigo-200 hover:bg-indigo-500/10 hover:text-indigo-100", }, { label: "Contact", href: "/contact", variant: "outline", buttonClass: "border-indigo-400/60 text-indigo-200 hover:bg-indigo-500/10 hover:text-indigo-100", }, ], }, ], [], ); return ( {/* Achievements Section */}

Explore AeThex

Our impact across the digital landscape

{achievements.map((achievement, index) => (
{achievement.metric}

{achievement.label}

))}
{/* Core Areas */}

Core Areas

Services, programs, resources, and community

{(() => { const combined = [...serviceOfferings, ...resourceOfferings]; return (
{combined.map((offering: any, idx: number) => (
{offering.title} {offering.icon && (
{/* @ts-ignore */}
)}
{offering.description} {offering.tags && (
{offering.tags.map((t: string) => ( {t} ))}
)}
{offering.link ? ( ) : ( <> {offering.actions?.[0] ? ( ) : null} {offering.actions && offering.actions.length > 1 ? (
{offering.actions.slice(1).map((a: any) => a.external ? ( {a.label} ) : ( {a.label} ), )}
) : null} )}
))}
); })()}
{/* Arms Directory */}

The 7 Arms of AeThex

Explore each specialized division shaping the future

{ARMS.map((arm, idx) => { const Icon = arm.icon; return (

{arm.label}

{arm.description}

Focus:

{arm.focus}

); })}
{/* Featured Posts Section */} {!isLoadingFeed && featuredPosts.length > 0 && ( )} {/* Creator Spotlights Section */} {!isLoadingFeed && topCreators.length > 0 && (

Top Creators

Meet the most engaged members of our community

{topCreators.map((creator: any, idx: number) => (
{creator.full_name?.[0]?.toUpperCase() || "C"}

{creator.full_name || creator.username}

{creator.username}

{creator.posts}

Posts

{creator.likes}

Likes

))}
)} {/* Labs Spotlight */}
R&D

AeThex Labs

Experimental interfaces, prototypes, and internal tooling. Enter the BlackSite to see what's next.

{/* Technology Showcase */}

What We Build

Systems, tools, and experiences that power creators and teams.

{[ { name: "Game Studios", status: "Active", color: "from-purple-500 to-blue-600", icon: Rocket, desc: "Production pipelines, content tooling, and live ops.", }, { name: "Design Systems", status: "Evolving", color: "from-blue-500 to-green-600", icon: Layers, desc: "Unified components and patterns across apps.", }, { name: "Creator Tools", status: "Live", color: "from-green-500 to-yellow-600", icon: Terminal, desc: "CLI, automation, and workflow accelerators.", }, { name: "Launch Ops", status: "Scaling", color: "from-yellow-500 to-red-600", icon: Shield, desc: "Release orchestration, quality gates, and metrics.", }, { name: "Content Pipeline", status: "In Progress", color: "from-red-500 to-purple-600", icon: BookOpen, desc: "Publishing, assets, and distribution systems.", }, { name: "Edge Experiences", status: "Deployed", color: "from-purple-500 to-pink-600", icon: Users, desc: "Low-latency interfaces on the edge.", }, ].map((tech, index) => (
{/* @ts-ignore */}

{tech.name}

{tech.status}

{tech.desc}

))}

Ready to Build the Future?

); }