nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Next.js App Router root layout. Composes all providers: ThemeProvider, SidebarProvider, Harness, LiveRegion portal, and font loading. The outermost wrapper of the entire application. Architecture doc: "Root layout with MukokoThemeProvider".
View the full component source code below.
"use client"
import * as React from "react"
import { cn } from "@/lib/utils"
// L8 ASSURANCE — wired into the root layout
// import { initRum } from "@/lib/assurance/nyuchi-rum"
// import { getErrorTracker } from "@/lib/assurance/nyuchi-error-tracker"
// import { initPerfProbe } from "@/lib/assurance/nyuchi-perf-probe"
// import { initFundiReporter } from "@/lib/fundi/nyuchi-fundi-reporter"
/* ═══════════════════════════════════════════════════════════════
NYUCHI ROOT LAYOUT — Layer 7 App Shell
The outermost wrapper. Composes all providers.
═══════════════════════════════════════════════════════════════ */
interface NyuchiRootLayoutProps {
/** Font class names to apply to body (e.g. noto serif, sans, mono) */
fontClasses?: string
/** Default theme */
defaultTheme?: "light" | "dark" | "system"
/** Default locale */
defaultLocale?: string
/** Enable CouchDB sync */
enableSync?: boolean
/** Enable service worker */
enableServiceWorker?: boolean
children: React.ReactNode
className?: string
}
export function NyuchiRootLayout({
fontClasses = "", defaultTheme = "system", defaultLocale = "en",
enableSync = false, enableServiceWorker = false,
children, className,
}: NyuchiRootLayoutProps) {
// Register service worker for offline support
React.useEffect(() => {
if (enableServiceWorker && "serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js").catch(() => {})
}
}, [enableServiceWorker])
// L8 ASSURANCE: Initialize observability on mount
// React.useEffect(() => {
// initRum({ sampleRate: 0.1 })
// initPerfProbe({ sampleRate: 0.1, trackComponents: true })
// const tracker = getErrorTracker({
// onCritical: (error) => {
// const reporter = initFundiReporter({ fundiEndpoint: "/api/fundi" })
// reporter.report({
// component: error.componentName || "unknown",
// layer: error.layer || 0,
// severity: error.severity,
// errorType: "render",
// source: "error-tracker",
// title: error.message,
// description: error.stack || error.message,
// portalUrl: error.portalUrl,
// blastRadius: error.blastRadius,
// })
// }
// })
// window.addEventListener("error", (e) => tracker.track(e.error))
// window.addEventListener("unhandledrejection", (e) => tracker.track(new Error(String(e.reason))))
// }, [])
return (
<html lang={defaultLocale} suppressHydrationWarning>
<body data-slot="nyuchi-root-layout" data-portal="https://design.nyuchi.com/components/nyuchi-root-layout"
className={cn("min-h-screen bg-background text-foreground antialiased", fontClasses, className)}>
{/* ThemeProvider wraps everything */}
{/* <NyuchiThemeProvider defaultTheme={defaultTheme}> */}
{/* <SidebarProvider> */}
{/* <LiveRegionPortal /> */}
{/* <NyuchiConnectivityBar /> */}
{/* <NyuchiToastProvider> */}
{children}
{/* </NyuchiToastProvider> */}
{/* </SidebarProvider> */}
{/* </NyuchiThemeProvider> */}
</body>
</html>
)
}
export type { NyuchiRootLayoutProps }
npx shadcn@latest add https://mzizi.dev/api/v1/ui/nyuchi-root-layoutFetch this component's metadata and source code from the registry API.
/api/v1/ui/nyuchi-root-layout