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';
|
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',
|
|
|
|
|
};
|
|
|
|
|
|
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
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: {
|
|
|
|
|
default: 'Port Nimara CRM',
|
|
|
|
|
template: '%s | Port Nimara CRM',
|
|
|
|
|
},
|
|
|
|
|
description: 'Marina management system for Port Nimara',
|
2026-04-29 13:55:37 +02:00
|
|
|
appleWebApp: {
|
|
|
|
|
capable: true,
|
|
|
|
|
statusBarStyle: 'black-translucent',
|
|
|
|
|
title: 'Port Nimara',
|
|
|
|
|
},
|
|
|
|
|
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',
|
|
|
|
|
},
|
fix(ux): popover collision padding, PWA manifest, webhook toasts, portal toast, dashboard error boundary, GDPR poll backoff, empty-state CTA
Grab-bag of UX gaps from audit-pass-#2 + #3. Each one is a small,
focused fix; bundled because they touch different surfaces.
- Popover: collisionPadding={16} + responsive
w-[min(calc(100vw-2rem),18rem)] so popovers stop clipping past the
viewport on iPhone 12 portrait.
- public/manifest.json (was missing) + manifest reference in
layout.tsx — PWA installability now works; icons (192/512/512-
maskable) were already present.
- Admin webhooks page: 4 silent `// ignore` catches in load/delete/
toggle/regenerate replaced with toast.error / toast.success. Users
no longer see a stale list with no feedback when an op fails.
- Portal document-download button: blocking alert() → toast.error().
- src/app/(dashboard)/error.tsx: branded error boundary with retry +
back-to-dashboard, replacing Next.js's default uncaught-error UI.
- GDPR export modal: refetchInterval was a flat 5s while the modal was
open. Switched to a function that only polls (every 15s) when a job
is actually pending/building; settled exports stop polling entirely.
- client-yachts-tab empty state gains a CTA wired to the existing
Add-yacht dialog, instead of just saying "No yachts".
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 14:59:27 +02:00
|
|
|
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>
|
|
|
|
|
);
|
|
|
|
|
}
|