feat(db): mesh data model — meshes, members, invites, audit log
- pgSchema "mesh" with 4 tables isolating the peer mesh domain - Enums: visibility, transport, tier, role - audit_log is metadata-only (E2E encryption enforced at broker/client) - Cascade on mesh delete, soft-delete via archivedAt/revokedAt Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
69
apps/web/src/app/[locale]/dashboard/(user)/layout.tsx
Normal file
69
apps/web/src/app/[locale]/dashboard/(user)/layout.tsx
Normal file
@@ -0,0 +1,69 @@
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { Icons } from "@turbostarter/ui-web/icons";
|
||||
import { SidebarProvider } from "@turbostarter/ui-web/sidebar";
|
||||
|
||||
import { pathsConfig } from "~/config/paths";
|
||||
import { getSession } from "~/lib/auth/server";
|
||||
import { DashboardInset } from "~/modules/common/layout/dashboard/inset";
|
||||
import { DashboardSidebar } from "~/modules/common/layout/dashboard/sidebar";
|
||||
|
||||
/**
|
||||
* Dashboard sidebar menu configuration.
|
||||
*/
|
||||
const menu = [
|
||||
{
|
||||
label: "platform",
|
||||
items: [
|
||||
{
|
||||
title: "dashboard",
|
||||
href: pathsConfig.dashboard.user.index,
|
||||
icon: Icons.Home,
|
||||
},
|
||||
{
|
||||
title: "aiTools",
|
||||
href: pathsConfig.apps.chat.index,
|
||||
icon: Icons.Sparkles,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "manage",
|
||||
items: [
|
||||
{
|
||||
title: "settings",
|
||||
href: pathsConfig.dashboard.user.settings.index,
|
||||
icon: Icons.Settings,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "dev",
|
||||
items: [
|
||||
{
|
||||
title: "demos",
|
||||
href: pathsConfig.demo.index,
|
||||
icon: Icons.LayoutDashboard,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default async function DashboardLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const { user } = await getSession();
|
||||
|
||||
if (!user) {
|
||||
return redirect(pathsConfig.auth.login);
|
||||
}
|
||||
|
||||
return (
|
||||
<SidebarProvider>
|
||||
<DashboardSidebar user={user} menu={menu} />
|
||||
<DashboardInset>{children}</DashboardInset>
|
||||
</SidebarProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user