Initial commit: Port Nimara CRM (Layers 0-4)
Some checks failed
Build & Push Docker Images / build-and-push (push) Has been cancelled
Build & Push Docker Images / deploy (push) Has been cancelled
Build & Push Docker Images / lint (push) Has been cancelled

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>
This commit is contained in:
2026-03-26 11:52:51 +01:00
commit 67d7e6e3d5
572 changed files with 86496 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
import { type LucideIcon } from 'lucide-react';
import Link from 'next/link';
import { cn } from '@/lib/utils';
interface PortalCardProps {
title: string;
value: number | string;
description?: string;
icon: LucideIcon;
href?: string;
className?: string;
}
export function PortalCard({
title,
value,
description,
icon: Icon,
href,
className,
}: PortalCardProps) {
const content = (
<div
className={cn(
'bg-white rounded-lg border p-6 flex items-start gap-4',
href && 'hover:border-[#1e2844] hover:shadow-sm transition-all cursor-pointer',
className,
)}
>
<div className="p-2 rounded-lg bg-[#1e2844]/8">
<Icon className="h-5 w-5 text-[#1e2844]" />
</div>
<div className="flex-1 min-w-0">
<p className="text-sm text-gray-500">{title}</p>
<p className="text-2xl font-semibold text-gray-900 mt-0.5">{value}</p>
{description && (
<p className="text-xs text-gray-400 mt-1">{description}</p>
)}
</div>
</div>
);
if (href) {
return <Link href={href as any}>{content}</Link>;
}
return content;
}

View File

@@ -0,0 +1,59 @@
'use client';
import { useRouter } from 'next/navigation';
import { LogOut } from 'lucide-react';
import { Button } from '@/components/ui/button';
interface PortalHeaderProps {
portName: string;
portLogoUrl?: string | null;
clientName: string;
}
export function PortalHeader({ portName, portLogoUrl, clientName }: PortalHeaderProps) {
const router = useRouter();
async function handleLogout() {
await fetch('/api/portal/auth/logout', { method: 'POST' });
router.push('/portal/login' as any);
}
return (
<header className="border-b bg-white sticky top-0 z-10">
<div className="max-w-5xl mx-auto px-4 sm:px-6 h-16 flex items-center justify-between">
<div className="flex items-center gap-3">
{portLogoUrl ? (
<img
src={portLogoUrl}
alt={portName}
className="h-8 w-auto object-contain"
/>
) : (
<div className="h-8 w-8 rounded bg-[#1e2844] flex items-center justify-center">
<span className="text-white text-xs font-bold">
{portName.charAt(0).toUpperCase()}
</span>
</div>
)}
<div>
<p className="text-sm font-semibold text-gray-900">{portName}</p>
<p className="text-xs text-gray-500">Client Portal</p>
</div>
</div>
<div className="flex items-center gap-4">
<span className="text-sm text-gray-600 hidden sm:block">{clientName}</span>
<Button
variant="ghost"
size="sm"
onClick={handleLogout}
className="text-gray-500 hover:text-gray-900"
>
<LogOut className="h-4 w-4 mr-1" />
<span className="hidden sm:inline">Sign out</span>
</Button>
</div>
</div>
</header>
);
}

View File

@@ -0,0 +1,45 @@
'use client';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import { LayoutDashboard, Anchor, FileText, Receipt } from 'lucide-react';
import { cn } from '@/lib/utils';
const navItems = [
{ label: 'Dashboard', href: '/portal/dashboard', icon: LayoutDashboard },
{ label: 'Interests', href: '/portal/interests', icon: Anchor },
{ label: 'Documents', href: '/portal/documents', icon: FileText },
{ label: 'Invoices', href: '/portal/invoices', icon: Receipt },
];
export function PortalNav() {
const pathname = usePathname();
return (
<nav className="border-b bg-white">
<div className="max-w-5xl mx-auto px-4 sm:px-6">
<div className="flex gap-1 -mb-px overflow-x-auto">
{navItems.map((item) => {
const Icon = item.icon;
const isActive = pathname === item.href || pathname.startsWith(item.href + '/');
return (
<Link
key={item.href}
href={item.href as any}
className={cn(
'flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors whitespace-nowrap',
isActive
? 'border-[#1e2844] text-[#1e2844]'
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300',
)}
>
<Icon className="h-4 w-4" />
{item.label}
</Link>
);
})}
</div>
</div>
</nav>
);
}