import Image from "next/image"; import Link from "next/link"; import { getTranslations } from "next-intl/server"; import { cached } from "@/lib/cache"; import { formatDate } from "@/lib/format-date"; import { prisma } from "@/lib/prisma"; import { siteSettings } from "@/lib/services/site-settings"; export const revalidate = 120; async function getHotelData() { const hotelName = await siteSettings.get("hotel_name", "Hotel"); const [online, users, rooms, articles] = await Promise.all([ cached("online_count", 10_000, () => prisma.user.count({ where: { online: "1" } }), ).catch(() => 0), cached("total_users", 30_000, () => prisma.user.count()).catch(() => 0), cached("total_rooms", 30_000, () => prisma.rooms.count()).catch(() => 0), prisma.websiteArticles .findMany({ orderBy: { createdAt: "desc" }, take: 3 }) .catch(() => []), ]); return { hotelName, online, users, rooms, articles }; } export default async function Home() { const t = await getTranslations("header"); const { hotelName, online, users, rooms, articles } = await getHotelData(); return (
{/* ── 1. Lobby — full-width hero with depth ── */}
{online.toLocaleString()} online now

Your story starts{" "} here
at {hotelName}

{t("tagline")}

Join for free arrow Enter hotel
Frank

Hey there! 👋

Ready for an adventure? Create your account and let's go!

{/* ── 2. Hotel stats — reimagined as service pillars ── */}
{[ { value: online.toLocaleString(), label: "Guests online", detail: "Exploring right now", }, { value: users.toLocaleString(), label: "Total citizens", detail: "And counting", }, { value: rooms.toLocaleString(), label: "Rooms built", detail: "Waiting to be explored", }, { value: "∞", label: "Adventures await", detail: "New experiences daily", }, ].map((stat) => (
{stat.value}
{stat.label}
{stat.detail}
))}
{/* ── 3. Experiences — what makes the hotel special ── */}

Everything{" "} {hotelName} {" "} has to offer

From styling your avatar to building empires — it all happens here

{[ { icon: "/assets/images/icons/star.gif", title: "Avatar studio", desc: "Mix, match and stand out with thousands of outfits, accessories and effects.", }, { icon: "/assets/images/icons/catalog.png", title: "Furniture catalog", desc: "Deck out your room with an ever-growing collection of furniture and decor.", }, { icon: "/assets/images/icons/navigation/community.png", title: "Community hub", desc: "Meet people from around the world, join groups and make lifelong friends.", }, { icon: "/assets/images/icons/navigation/bb.png", title: "Battle & play", desc: "Compete in snowstorm, battleball, and weekly events with rewards.", }, ].map((item) => (

{item.title}

{item.desc}

))}
{/* ── 4. Bulletin — latest articles ── */} {articles.length > 0 && (

Hotel bulletin

Stay up to date with the latest from {hotelName}

Browse all articles arrow
{articles.map((a, i) => (
{a.image ? ( ) : (
)}
{i === 0 && (

{a.title}

{formatDate(a.createdAt, "date", "")}

)}
{i > 0 && (

{a.title}

{formatDate(a.createdAt, "date", "")}

)} ))}
Browse all articles →
)} {/* ── 5. Final CTA — doors are open ── */}

The doors are open

{hotelName} is free, forever. Come see what makes this place special — your first room is waiting.

Claim your room arrow Take a look around
); }