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';
|
|
|
|
|
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}`,
|
|
|
|
|
},
|
chore(autonomous-session): consolidate uncommitted work from prior session
Bundles the prior autonomous-session output that was sitting unstaged:
- Em-dash sweep across src/ + tests/ (en-dash/em-dash to hyphen, ~2280 instances)
- country-flag-icons rollout (CountryFlag component, replaces emoji glyphs that
never rendered on Windows; lazy-loads the 3x2 SVG index as a single chunk
after the per-subpath dynamic-import approach silently failed in webpack)
- Admin IA Phase 1+2: 7-domain regroup, 41 to 38 pages, /admin/berths index,
redirects (ocr to ai, reports to dashboard, invitations to users),
docs/admin-ia-proposal.md
- Per-template email tester (registry + endpoint + UI on Email admin page)
- Cancel-document mode picker (delete-from-Documenso vs keep-for-audit)
- Dashboard PDF report: 25 widgets, SVG charts, date-range picker, 11 resolvers
- Customize-widgets per-region sortables at xl+ (charts/rails/feed); single
flat sortable below xl when the layout stacks; per-viewport saved orders
- Audit doc updates capturing each shipped item
- Lint fixes: react-compiler immutability in DonutChart (reduce instead of
let-reassign), set-state-in-effect disables in CountryFlag and
UploadForSigning preview-bytes effect, unused 'confirm' destructures in
interest contract + reservation tabs, unescaped apostrophe in test-template
card copy
2026-05-23 00:52:59 +02:00
|
|
|
description: `${appName} - marina management system`,
|
2026-05-20 15:54:10 +02:00
|
|
|
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'));
|
|
|
|
|
|
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 (
|
chore(audit-drain): rip out next-intl, RTL lint, sweeps, polish
Drain the long-tail audit queue captured in alpha-uat-master.md.
- next-intl ripped out (zero useTranslations callers ever existed):
package.json, next.config.ts plugin wrap, src/i18n/, messages/, and
the layout NextIntlClientProvider all gone; <html lang="en"> hardcoded.
- RTL lint nudge added: warn-only no-restricted-syntax on physical
Tailwind utilities (ml-/mr-/pl-/pr-/text-left/text-right/border-l/
border-r/rounded-l-/rounded-r-) inside JSX className literals.
Existing ~1,000 sites grandfathered; new code trends toward logical.
- Icon-only button accessibility lint: jsx-a11y/control-has-associated-
label enabled at warn; 4 empty <th>/<td> action placeholders gain
sr-only labels.
- Currency: SUPPORTED_CURRENCIES drops the hardcoded English labels;
new currencyLabel(code, locale?) helper resolves via Intl.DisplayNames.
CurrencySelect + settings-manager migrated.
- Date locale sweep: 7 surfaces flip from toLocaleString('en-GB'|'en-US')
to toLocaleString(undefined, ...) so dates honour runtime locale.
- Dialog/Sheet width: 10 document/EOI/entity-form dialogs gain a
lg:max-w-4xl or lg:max-w-5xl step so wide desktops get breathing room.
- PaymentsSection collapsed-bar: slim one-line bar showing
"Payments - Not received yet" or "Payments - \$X received - N payments
- Expand"; per-interest collapse state persists in localStorage; the
RecordPayment flow auto-expands.
- muted-foreground opacity sweep: 10 text-bearing
text-muted-foreground/{60,70,80} hits dropped to plain
text-muted-foreground for AA contrast on muted bg. Icon-only
(aria-hidden) opacity hits left as-is.
- Micro-type bump: text-[10px] and text-[11px] -> text-xs (12px)
across 87 files in src/components + src/app. Pure mechanical sweep.
- Audit-doc cleanup: alpha-uat-master.md stale 2026-05-25 summary
rewritten with cumulative state through today. Items genuinely still
open are now a short long-tail list.
- New docs/marketing-site-followups.md: Umami Phase 4a/3/5, email
pixel E2E verification, and website-cutover work parked here so
they don't get lost in the CRM audit doc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 18:48:46 +02:00
|
|
|
<html lang="en" 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`}
|
|
|
|
|
>
|
chore(audit-drain): rip out next-intl, RTL lint, sweeps, polish
Drain the long-tail audit queue captured in alpha-uat-master.md.
- next-intl ripped out (zero useTranslations callers ever existed):
package.json, next.config.ts plugin wrap, src/i18n/, messages/, and
the layout NextIntlClientProvider all gone; <html lang="en"> hardcoded.
- RTL lint nudge added: warn-only no-restricted-syntax on physical
Tailwind utilities (ml-/mr-/pl-/pr-/text-left/text-right/border-l/
border-r/rounded-l-/rounded-r-) inside JSX className literals.
Existing ~1,000 sites grandfathered; new code trends toward logical.
- Icon-only button accessibility lint: jsx-a11y/control-has-associated-
label enabled at warn; 4 empty <th>/<td> action placeholders gain
sr-only labels.
- Currency: SUPPORTED_CURRENCIES drops the hardcoded English labels;
new currencyLabel(code, locale?) helper resolves via Intl.DisplayNames.
CurrencySelect + settings-manager migrated.
- Date locale sweep: 7 surfaces flip from toLocaleString('en-GB'|'en-US')
to toLocaleString(undefined, ...) so dates honour runtime locale.
- Dialog/Sheet width: 10 document/EOI/entity-form dialogs gain a
lg:max-w-4xl or lg:max-w-5xl step so wide desktops get breathing room.
- PaymentsSection collapsed-bar: slim one-line bar showing
"Payments - Not received yet" or "Payments - \$X received - N payments
- Expand"; per-interest collapse state persists in localStorage; the
RecordPayment flow auto-expands.
- muted-foreground opacity sweep: 10 text-bearing
text-muted-foreground/{60,70,80} hits dropped to plain
text-muted-foreground for AA contrast on muted bg. Icon-only
(aria-hidden) opacity hits left as-is.
- Micro-type bump: text-[10px] and text-[11px] -> text-xs (12px)
across 87 files in src/components + src/app. Pure mechanical sweep.
- Audit-doc cleanup: alpha-uat-master.md stale 2026-05-25 summary
rewritten with cumulative state through today. Items genuinely still
open are now a short long-tail list.
- New docs/marketing-site-followups.md: Umami Phase 4a/3/5, email
pixel E2E verification, and website-cutover work parked here so
they don't get lost in the CRM audit doc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 18:48:46 +02:00
|
|
|
{children}
|
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>
|
|
|
|
|
);
|
|
|
|
|
}
|