feat: scaffold PulseNode dashboard (M1)
Next.js 16 + TypeScript + Tailwind v4 app with a YAML-driven config system: schema validation (zod), .env interpolation, and a widget registry rendering bookmark/search/group widgets. CSS custom properties (--pn-*) drive theming and are overridable from config.yml's theme.variables. Config load errors surface as a readable error page instead of crashing the app. Hot reload, docker/system/http collectors, and the WebSocket push layer land in later milestones per the approved plan.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { configStore, ConfigError } from "@/lib/config/loader";
|
||||
import { Dashboard } from "@/components/layout/Dashboard";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default function Home() {
|
||||
let config;
|
||||
try {
|
||||
config = configStore.get();
|
||||
} catch (err) {
|
||||
const message = err instanceof ConfigError ? err.message : "Unknown configuration error";
|
||||
return (
|
||||
<main className="mx-auto flex max-w-2xl flex-col gap-4 px-6 py-16">
|
||||
<h1 className="text-lg font-semibold text-status-down">Configuration Error</h1>
|
||||
<pre className="rounded-[var(--radius-widget)] border border-status-down bg-surface p-4 text-sm whitespace-pre-wrap text-fg">
|
||||
{message}
|
||||
</pre>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
return <Dashboard config={config} />;
|
||||
}
|
||||
Reference in New Issue
Block a user