"use client"; import { useState } from "react"; import Link from "next/link"; /* ------------------------------------------------------------------ */ /* README content (rendered as simple markdown-ish HTML) */ /* ------------------------------------------------------------------ */ const README_LINES = [ { tag: "h1", text: "betterNAS" }, { tag: "p", text: "betterNAS is a self-hostable WebDAV stack for mounting NAS exports in Finder.", }, { tag: "p", text: "The default product shape is:" }, { tag: "ul", items: [ "node-service serves the real files from the NAS over WebDAV", "control-server owns auth, nodes, exports, grants, and mount profile issuance", "web control plane lets the user manage the NAS and get mount instructions", "macOS client starts as native Finder WebDAV mounting, with a thin helper later", ], }, { tag: "p", text: "For now, the whole stack should be able to run on the user's NAS device.", }, { tag: "h2", text: "Current repo shape" }, { tag: "ul", items: [ "apps/node-agent - NAS-side Go runtime and WebDAV server", "apps/control-plane - Go backend for auth, registry, and mount profile issuance", "apps/web - Next.js web control plane", "apps/nextcloud-app - optional Nextcloud adapter, not the product center", "packages/contracts - canonical shared contracts", "infra/docker - self-hosted local stack", ], }, { tag: "h2", text: "Verify" }, { tag: "code", text: "pnpm verify" }, { tag: "h2", text: "Current end-to-end slice" }, { tag: "ol", items: [ "Boot the stack with pnpm stack:up", "Verify it with pnpm stack:verify", "Get the WebDAV mount profile from the control plane", "Mount it in Finder with the issued credentials", ], }, { tag: "h2", text: "Product boundary" }, { tag: "p", text: "The default betterNAS product is self-hosted and WebDAV-first. Nextcloud remains optional and secondary.", }, ] as const; /* ------------------------------------------------------------------ */ /* Icons */ /* ------------------------------------------------------------------ */ function GithubIcon({ className }: { className?: string }) { return ( ); } function ClockIcon() { return ( ); } function SharedIcon() { return ( ); } function LibraryIcon() { return ( ); } function AppIcon() { return ( ); } function DesktopIcon() { return ( ); } function DownloadIcon() { return ( ); } function DocumentsIcon() { return ( ); } function FolderIcon({ className }: { className?: string }) { return ( ); } function CloudIcon() { return ( ); } function HomeIcon() { return ( ); } function NetworkIcon() { return ( ); } function AirdropIcon() { return ( ); } /* ------------------------------------------------------------------ */ /* README modal (Quick Look style) */ /* ------------------------------------------------------------------ */ function ReadmeModal({ onClose }: { onClose: () => void }) { return (
e.stopPropagation()} > {/* titlebar */}
README.md
{/* body */}
{README_LINES.map((block, i) => { if (block.tag === "h1") return (

{block.text}

); if (block.tag === "h2") return (

{block.text}

); if (block.tag === "p") return (

{block.text}

); if (block.tag === "code") return (
                    {block.text}
                  
); if (block.tag === "ul") return (
    {block.items.map((item, j) => (
  • {item.split(" - ")[0]} {item.includes(" - ") && ( {" "} - {item.split(" - ").slice(1).join(" - ")} )}
  • ))}
); if (block.tag === "ol") return (
    {block.items.map((item, j) => (
  1. {item}
  2. ))}
); return null; })}
); } /* ------------------------------------------------------------------ */ /* Finder sidebar item */ /* ------------------------------------------------------------------ */ function SidebarItem({ icon, label, active, accent, onClick, }: { icon: React.ReactNode; label: string; active?: boolean; accent?: string; onClick?: () => void; }) { return ( ); } /* ------------------------------------------------------------------ */ /* Finder file grid item (folder) */ /* ------------------------------------------------------------------ */ function GridFolder({ name, itemCount, onClick, }: { name: string; itemCount?: number; onClick?: () => void; }) { return ( ); } /* ------------------------------------------------------------------ */ /* Finder file grid item (file) */ /* ------------------------------------------------------------------ */ function GridFile({ name, meta, onClick, }: { name: string; meta?: string; onClick?: () => void; }) { return ( ); } /* ------------------------------------------------------------------ */ /* Main page */ /* ------------------------------------------------------------------ */ export default function LandingPage() { const [readmeOpen, setReadmeOpen] = useState(false); const [selectedSidebar, setSelectedSidebar] = useState("DAV"); return (
{/* ---- header ---- */}
Sign in
{/* ---- finder ---- */}
{/* titlebar */}
DAV
{/* forward/back placeholders */}
{/* content area */}
{/* ---- sidebar ---- */}
{/* Favorites */}

Favorites

} label="Recents" /> } label="Shared" /> } label="Library" /> } label="Applications" /> } label="Desktop" /> } label="Downloads" /> } label="Documents" /> } label="GitHub" /> {/* Locations */}

Locations

} label="rathi" /> } label="hari-macbook-pro" /> } label="DAV" active={selectedSidebar === "DAV"} accent="text-[#65a2f8]" onClick={() => setSelectedSidebar("DAV")} /> } label="AirDrop" />
{/* ---- file grid ---- */}
{/* toolbar */}
DAV / exports
{/* files */}
setReadmeOpen(true)} />
{/* statusbar */}
5 folders, 1 file 847 GB available
{/* ---- readme modal ---- */} {readmeOpen && setReadmeOpen(false)} />}
); }