feat: Swiss-compliant launch — Impressum/AGB/Contact, support panel, DSG exports, cookie banner
Legal (Swiss minimum, no individual named):
- Impressum page (UWG Art. 3 lit. s) — provider, contact via support panel,
no email required, jurisdiction = Switzerland
- AGB page — subscription terms, payment, cancellation, suspension on payment
fail, 14-day money-back, AI-processing-per-tier disclosure, Swiss law +
Swiss venue, modeled after typical Schweizer SaaS terms
- Privacy: Stripe added as subprocessor with full data-flow disclosure
Support panel replaces email contact entirely:
- @bmm/db: support_status enum + support_tickets + support_messages tables,
migration applied to prod DB
- @bmm/api: support routes (user create/list/view/reply, admin list/view/reply
/set-status), public /v1/contact for logged-out visitors with per-IP rate
limit of 3 submissions/day to prevent spam-flood
- Web: /settings/support (list + new), /settings/support/[id] (conversation),
/admin/support, /admin/support/[id]
- Public /contact form with email collection for guest tickets
Data rights (DSG Art. 25 / GDPR Art. 15+20):
- /v1/account/export returns user-scoped JSON of profile, org, servers,
builds, audit, support tickets and messages — excludes hashes, encrypted
secrets, other-user data
- /settings/account: download button + deletion-via-ticket workflow
Production-readiness gaps closed:
- org.suspended now blocks /v1/servers POST and /v1/servers/preview (402);
webhook flagged this state but enforcement was missing
- Cookie banner: minimal, essential-cookies-only disclosure (Swiss DSG +
GDPR compliant without dark-pattern consent UI), mounts on both layouts
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:12:06 +02:00
|
|
|
import { CookieBanner } from '@/components/cookie-banner';
|
2026-05-19 00:32:53 +02:00
|
|
|
import { Logo } from '@/components/logo';
|
2026-05-23 00:19:31 +02:00
|
|
|
import { MobileActionBar } from '@/components/mobile-action-bar';
|
2026-05-27 12:20:25 +02:00
|
|
|
import { PulseLink } from '@/components/pulse';
|
2026-05-25 17:46:36 +02:00
|
|
|
import { UserMenu } from '@/components/user-menu';
|
2026-05-21 23:25:26 +02:00
|
|
|
import { FileClock, LayoutGrid, Package, Server, Settings } from 'lucide-react';
|
|
|
|
|
import Link from 'next/link';
|
2026-05-19 00:32:53 +02:00
|
|
|
|
|
|
|
|
export default function DashboardLayout({ children }: { children: React.ReactNode }) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex min-h-screen flex-col">
|
|
|
|
|
<header className="sticky top-0 z-50 border-b border-[--color-border] bg-[--color-bg]/85 backdrop-blur-md">
|
2026-05-21 23:25:26 +02:00
|
|
|
<div className="mx-auto flex h-12 max-w-7xl items-center justify-between gap-2 px-4 sm:px-6">
|
|
|
|
|
<div className="flex min-w-0 items-center gap-2 sm:gap-6">
|
2026-05-19 00:32:53 +02:00
|
|
|
<Logo />
|
2026-05-25 23:15:44 +02:00
|
|
|
{/* Desktop nav — on mobile this is hidden and destinations live
|
|
|
|
|
in the bottom MobileActionBar tab-bar instead. */}
|
|
|
|
|
<nav className="hidden items-center gap-0.5 sm:flex sm:gap-1">
|
2026-05-19 00:32:53 +02:00
|
|
|
<NavLink href="/dashboard" icon={<LayoutGrid size={13} />}>
|
|
|
|
|
Overview
|
|
|
|
|
</NavLink>
|
|
|
|
|
<NavLink href="/servers" icon={<Server size={13} />}>
|
|
|
|
|
Servers
|
|
|
|
|
</NavLink>
|
2026-05-20 17:18:58 +02:00
|
|
|
<NavLink href="/templates" icon={<Package size={13} />}>
|
|
|
|
|
Marketplace
|
|
|
|
|
</NavLink>
|
2026-05-19 00:32:53 +02:00
|
|
|
<NavLink href="/audit" icon={<FileClock size={13} />}>
|
|
|
|
|
Audit
|
|
|
|
|
</NavLink>
|
|
|
|
|
<NavLink href="/settings" icon={<Settings size={13} />}>
|
|
|
|
|
Settings
|
|
|
|
|
</NavLink>
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
2026-05-25 17:46:36 +02:00
|
|
|
<div className="flex items-center gap-1 sm:gap-2">
|
2026-05-27 12:20:25 +02:00
|
|
|
<PulseLink
|
2026-05-25 17:46:36 +02:00
|
|
|
href="/servers/new"
|
|
|
|
|
className="hidden h-7 items-center gap-1.5 rounded-md bg-[--color-accent] px-2.5 text-[12px] font-medium text-white transition-colors duration-200 hover:bg-[#5557e8] sm:inline-flex"
|
|
|
|
|
>
|
|
|
|
|
+ New server
|
2026-05-27 12:20:25 +02:00
|
|
|
</PulseLink>
|
2026-05-25 17:46:36 +02:00
|
|
|
<UserMenu />
|
|
|
|
|
</div>
|
2026-05-19 00:32:53 +02:00
|
|
|
</div>
|
|
|
|
|
</header>
|
2026-05-23 00:19:31 +02:00
|
|
|
<main className="flex-1 bg-[--color-bg] pb-20 sm:pb-0">{children}</main>
|
|
|
|
|
<MobileActionBar />
|
feat: Swiss-compliant launch — Impressum/AGB/Contact, support panel, DSG exports, cookie banner
Legal (Swiss minimum, no individual named):
- Impressum page (UWG Art. 3 lit. s) — provider, contact via support panel,
no email required, jurisdiction = Switzerland
- AGB page — subscription terms, payment, cancellation, suspension on payment
fail, 14-day money-back, AI-processing-per-tier disclosure, Swiss law +
Swiss venue, modeled after typical Schweizer SaaS terms
- Privacy: Stripe added as subprocessor with full data-flow disclosure
Support panel replaces email contact entirely:
- @bmm/db: support_status enum + support_tickets + support_messages tables,
migration applied to prod DB
- @bmm/api: support routes (user create/list/view/reply, admin list/view/reply
/set-status), public /v1/contact for logged-out visitors with per-IP rate
limit of 3 submissions/day to prevent spam-flood
- Web: /settings/support (list + new), /settings/support/[id] (conversation),
/admin/support, /admin/support/[id]
- Public /contact form with email collection for guest tickets
Data rights (DSG Art. 25 / GDPR Art. 15+20):
- /v1/account/export returns user-scoped JSON of profile, org, servers,
builds, audit, support tickets and messages — excludes hashes, encrypted
secrets, other-user data
- /settings/account: download button + deletion-via-ticket workflow
Production-readiness gaps closed:
- org.suspended now blocks /v1/servers POST and /v1/servers/preview (402);
webhook flagged this state but enforcement was missing
- Cookie banner: minimal, essential-cookies-only disclosure (Swiss DSG +
GDPR compliant without dark-pattern consent UI), mounts on both layouts
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:12:06 +02:00
|
|
|
<CookieBanner />
|
2026-05-19 00:32:53 +02:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function NavLink({
|
|
|
|
|
href,
|
|
|
|
|
children,
|
|
|
|
|
icon,
|
|
|
|
|
}: {
|
|
|
|
|
href: string;
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
icon: React.ReactNode;
|
|
|
|
|
}) {
|
|
|
|
|
return (
|
|
|
|
|
<Link
|
|
|
|
|
href={href}
|
|
|
|
|
className="inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-[12.5px] text-[--color-fg-muted] transition-colors hover:bg-[--color-bg-subtle] hover:text-[--color-fg]"
|
|
|
|
|
>
|
|
|
|
|
{icon}
|
2026-05-21 23:25:26 +02:00
|
|
|
<span className="hidden sm:inline">{children}</span>
|
2026-05-19 00:32:53 +02:00
|
|
|
</Link>
|
|
|
|
|
);
|
|
|
|
|
}
|