Add folder game, file browser UI, and automated tests.

Introduces a localStorage-backed messy-desktop challenge with sub-steps,
drag-and-drop and Places/Back navigation, IBM Plex Mono, and a /api/health
endpoint. Adds Vitest coverage for the API and level logic plus Playwright
smoke tests.

Made-with: Cursor
This commit is contained in:
2026-04-11 18:22:50 +12:00
parent 818da20af8
commit 1957e96363
21 changed files with 1429 additions and 53 deletions

View File

@@ -1,55 +1,9 @@
import { readFile } from "fs/promises";
import Image from "next/image";
import path from "path";
function parseBrief(raw: string): { title: string; paragraphs: string[] } {
const lines = raw.trimEnd().split("\n");
const title = (lines[0] ?? "").trim();
const body = lines.slice(1).join("\n").trim();
const paragraphs = body
.split(/\n\s*\n/)
.map((p) => p.replace(/\n/g, " ").trim())
.filter(Boolean);
return { title, paragraphs };
}
export default async function Home() {
const briefPath = path.join(process.cwd(), "Brief.md");
const raw = await readFile(briefPath, "utf-8");
const { title, paragraphs } = parseBrief(raw);
import { HomeHub } from "./home-hub";
export default function Home() {
return (
<main className="min-h-screen px-6 py-16">
<div className="mx-auto max-w-3xl space-y-10">
<header className="space-y-6 text-center">
<Image
src="/logo.png"
alt=""
width={611}
height={689}
className="mx-auto h-auto max-h-36 w-auto sm:max-h-44"
priority
/>
<h1 className="font-heading text-5xl tracking-tight text-white sm:text-6xl">
{title}
</h1>
</header>
<div className="space-y-6 text-lg leading-relaxed text-zinc-300 sm:text-xl">
{paragraphs.map((text, i) => (
<p
key={i}
className={
i === paragraphs.length - 1 && text.toLowerCase().includes("npm install")
? "rounded-lg border border-purple-400/20 bg-black/25 px-4 py-3 text-base text-zinc-300 sm:text-lg"
: undefined
}
>
{text}
</p>
))}
</div>
</div>
<HomeHub />
</main>
);
}