2026-04-29 13:55:37 +02:00
|
|
|
import type { Metadata, Viewport } from 'next';
|
2026-05-01 16:37:40 +02:00
|
|
|
import Script from 'next/script';
|
2026-04-29 13:59:03 +02:00
|
|
|
import { headers } from 'next/headers';
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
import { Inter, JetBrains_Mono } from 'next/font/google';
|
2026-05-12 22:47:18 +02:00
|
|
|
import { NextIntlClientProvider } from 'next-intl';
|
|
|
|
|
import { getLocale, getMessages } from 'next-intl/server';
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
import { Toaster } from 'sonner';
|
2026-04-29 13:59:03 +02:00
|
|
|
import { classifyFormFactor } from '@/lib/form-factor';
|
2026-05-03 16:15:47 +02:00
|
|
|
import { ReactGrabViewportSync } from '@/components/dev/react-grab-viewport-sync';
|
2026-05-20 15:54:10 +02:00
|
|
|
import { resolveAuthShellBranding } from '@/lib/email/auth-shell-branding';
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
import './globals.css';
|
|
|
|
|
|
|
|
|
|
const inter = Inter({
|
|
|
|
|
subsets: ['latin'],
|
|
|
|
|
variable: '--font-sans',
|
|
|
|
|
display: 'swap',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const jetbrainsMono = JetBrains_Mono({
|
|
|
|
|
subsets: ['latin'],
|
|
|
|
|
variable: '--font-mono',
|
|
|
|
|
display: 'swap',
|
|
|
|
|
});
|
|
|
|
|
|
2026-04-29 13:55:37 +02:00
|
|
|
export const viewport: Viewport = {
|
|
|
|
|
width: 'device-width',
|
|
|
|
|
initialScale: 1,
|
|
|
|
|
viewportFit: 'cover',
|
|
|
|
|
themeColor: '#1e2844',
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-20 15:54:10 +02:00
|
|
|
/**
|
|
|
|
|
* Resolve the browser tab title from the first-port `branding_app_name`
|
|
|
|
|
* setting so a tenant's deploy sees their own brand in the title bar
|
|
|
|
|
* (and in `Cmd+T` browser history). Falls back to a generic label when
|
|
|
|
|
* the DB hasn't been seeded yet (e.g. fresh `pnpm dev` against an empty
|
|
|
|
|
* database during onboarding).
|
|
|
|
|
*/
|
|
|
|
|
export async function generateMetadata(): Promise<Metadata> {
|
|
|
|
|
const branding = await resolveAuthShellBranding();
|
|
|
|
|
const appName = branding?.appName?.trim() || 'CRM';
|
|
|
|
|
return {
|
|
|
|
|
title: {
|
|
|
|
|
default: appName,
|
|
|
|
|
template: `%s | ${appName}`,
|
|
|
|
|
},
|
|
|
|
|
description: `${appName} — marina management system`,
|
|
|
|
|
appleWebApp: {
|
|
|
|
|
capable: true,
|
|
|
|
|
statusBarStyle: 'black-translucent',
|
|
|
|
|
title: appName,
|
|
|
|
|
},
|
|
|
|
|
icons: {
|
|
|
|
|
icon: [
|
|
|
|
|
{ url: '/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
|
|
|
{ url: '/icon-512.png', sizes: '512x512', type: 'image/png' },
|
|
|
|
|
],
|
|
|
|
|
apple: '/apple-touch-icon.png',
|
|
|
|
|
},
|
|
|
|
|
manifest: '/manifest.json',
|
|
|
|
|
};
|
|
|
|
|
}
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
|
2026-04-29 13:59:03 +02:00
|
|
|
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
|
|
|
|
const headerList = await headers();
|
|
|
|
|
const formFactor = classifyFormFactor(headerList.get('user-agent'));
|
2026-05-12 22:47:18 +02:00
|
|
|
const locale = await getLocale();
|
|
|
|
|
const messages = await getMessages();
|
2026-04-29 13:59:03 +02:00
|
|
|
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
return (
|
2026-05-12 22:47:18 +02:00
|
|
|
<html lang={locale} suppressHydrationWarning>
|
2026-05-01 16:37:40 +02:00
|
|
|
<head>
|
|
|
|
|
{process.env.NODE_ENV === 'development' && (
|
|
|
|
|
<Script
|
|
|
|
|
src="//unpkg.com/react-grab/dist/index.global.js"
|
|
|
|
|
crossOrigin="anonymous"
|
|
|
|
|
strategy="beforeInteractive"
|
|
|
|
|
/>
|
|
|
|
|
)}
|
|
|
|
|
</head>
|
2026-04-29 13:59:03 +02:00
|
|
|
<body
|
|
|
|
|
data-form-factor={formFactor}
|
|
|
|
|
className={`${inter.variable} ${jetbrainsMono.variable} font-sans antialiased`}
|
|
|
|
|
>
|
2026-05-12 22:47:18 +02:00
|
|
|
<NextIntlClientProvider locale={locale} messages={messages}>
|
|
|
|
|
{children}
|
|
|
|
|
</NextIntlClientProvider>
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
<Toaster richColors position="top-right" />
|
2026-05-03 16:15:47 +02:00
|
|
|
{process.env.NODE_ENV === 'development' && <ReactGrabViewportSync />}
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|