import { ActivityFeed } from "@/components/feed/activity-feed" import { XPLeaderboard } from "@/components/gamification/xp-leaderboard" import { Button } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" import Link from "next/link" import { Trophy, Music, MapPin, Calendar, ChevronRight, Star, Youtube, Route } from "lucide-react" import { getApiUrl } from "@/lib/api-config" interface Show { id: number slug?: string date: string venue?: { id: number name: string slug?: string city?: string state?: string } tour?: { id: number name: string slug?: string } } interface Song { id: number title: string slug?: string performance_count?: number avg_rating?: number } async function getRecentShows(): Promise { try { const res = await fetch(`${getApiUrl()}/shows/recent?limit=8`, { cache: 'no-store', next: { revalidate: 60 } }) if (!res.ok) return [] return res.json() } catch (e) { console.error('Failed to fetch recent shows:', e) return [] } } async function getTopSongs(): Promise { try { const res = await fetch(`${getApiUrl()}/stats/top-songs?limit=5`, { cache: 'no-store', next: { revalidate: 300 } }) if (!res.ok) return [] return res.json() } catch (e) { console.error('Failed to fetch top songs:', e) return [] } } export default async function Home() { const [recentShows, topSongs] = await Promise.all([ getRecentShows(), getTopSongs() ]) return (
{/* Hero Section */}

Elmeg

A comprehensive community-driven archive for Goose history.
Discover shows, share ratings, and explore the music together.

{/* Recent Shows */}

Recent Shows

View all shows
{recentShows.length > 0 ? (
{recentShows.map((show) => (
{new Date(show.date).toLocaleDateString('en-US', { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' })}
{show.venue && (
{show.venue.name}
)} {show.venue?.city && (
{show.venue.city}{show.venue.state ? `, ${show.venue.state}` : ''}
)} {show.tour && (
{show.tour.name}
)}
))}
) : (

No shows yet. Check back soon!

)}
{/* Top Songs */}

Top Songs

All songs
{topSongs.length > 0 ? (
    {topSongs.map((song, idx) => (
  • {idx + 1}
    {song.title}
    {song.performance_count && (
    {song.performance_count} performances
    )}
  • ))}
) : (
No songs yet
)}
{/* Activity Feed */}

Recent Activity

View all
{/* XP Leaderboard */}
{/* Quick Links */}

Shows

Browse the complete archive

Venues

Find your favorite spots

Songs

Explore the catalog

Top Performances

Highest rated jams

Leaderboards

Top rated everything

Tours

Browse by tour

Videos

Watch full shows and songs

) }