Matt 683a65c1fd
All checks were successful
Build and Push Docker Images / docker (push) Successful in 2m15s
Implement Modern Maritime admin panel design with Monaco background
🎨 Complete UI redesign of admin panel with professional color scheme:

## New Modern Maritime Color Palette
- Deep Sea Blue (#1D2939) - Sidebar background
- Sail White (#F8F9FA) - Main background
- Maritime Teal (#008B8B) - Primary accent
- Sea Green (#1E8449) - Success/environmental theme
- Muted Gold (#D68910) - Revenue highlights
- Royal Purple (#884EA0) - Brand accent
- Off-White (#EAECEF) - Text on dark backgrounds

## Admin Panel Features
-  JWT-based authentication system
-  Protected routes with middleware
-  Elegant sidebar navigation with Puffin logo
-  Dashboard with stat cards (Orders, CO₂, Revenue, Fulfillment)
-  Monaco harbor image background on login page
-  Responsive glassmorphism design
-  WCAG AA contrast compliance

## New Files
- app/admin/ - Admin pages (login, dashboard, orders)
- app/api/admin/ - Auth API routes (login, logout, verify)
- components/admin/ - AdminSidebar component
- lib/auth.ts - JWT authentication utilities
- public/monaco_high_res.jpg - Luxury background image

## Updated
- tailwind.config.js - Custom maritime color palette
- package.json - Added jsonwebtoken dependency
- app/layout.tsx - RootLayoutClient integration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 09:35:43 +01:00

120 lines
4.4 KiB
TypeScript

'use client';
import { motion } from 'framer-motion';
import { DollarSign, Package, Leaf, TrendingUp } from 'lucide-react';
export default function AdminDashboard() {
// Placeholder data - will be replaced with real API data
const stats = [
{
title: 'Total Orders',
value: '0',
icon: <Package size={24} />,
trend: { value: 0, isPositive: true },
gradient: 'bg-gradient-to-br from-royal-purple to-purple-600',
bgColor: 'bg-royal-purple',
},
{
title: 'Total CO₂ Offset',
value: '0 tons',
icon: <Leaf size={24} />,
trend: { value: 0, isPositive: true },
gradient: 'bg-gradient-to-br from-sea-green to-green-600',
bgColor: 'bg-sea-green',
},
{
title: 'Total Revenue',
value: '$0',
icon: <DollarSign size={24} />,
trend: { value: 0, isPositive: true },
gradient: 'bg-gradient-to-br from-muted-gold to-orange-600',
bgColor: 'bg-muted-gold',
},
{
title: 'Fulfillment Rate',
value: '0%',
icon: <TrendingUp size={24} />,
trend: { value: 0, isPositive: true },
gradient: 'bg-gradient-to-br from-maritime-teal to-teal-600',
bgColor: 'bg-maritime-teal',
},
];
return (
<div className="space-y-8">
{/* Header */}
<div>
<h1 className="text-3xl font-bold text-deep-sea-blue mb-2">Dashboard</h1>
<p className="text-deep-sea-blue/70 font-medium">Welcome to the Puffin Offset Admin Portal</p>
</div>
{/* Stats Grid */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
{stats.map((stat, index) => (
<motion.div
key={stat.title}
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: index * 0.1 }}
className="bg-white border border-light-gray-border rounded-xl p-6 hover:shadow-lg transition-shadow"
>
<div className="flex items-center justify-between mb-4">
<div className={stat.gradient + " w-12 h-12 rounded-lg flex items-center justify-center text-white shadow-md"}>
{stat.icon}
</div>
{stat.trend && (
<span className={`text-sm font-semibold ${stat.trend.isPositive ? 'text-sea-green' : 'text-red-600'}`}>
{stat.trend.isPositive ? '+' : '-'}{stat.trend.value}%
</span>
)}
</div>
<h3 className="text-sm font-medium text-deep-sea-blue/60 mb-1">{stat.title}</h3>
<p className="text-2xl font-bold text-deep-sea-blue">{stat.value}</p>
</motion.div>
))}
</div>
{/* Placeholder for Charts */}
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.5 }}
className="bg-white border border-light-gray-border rounded-xl p-6"
>
<h2 className="text-xl font-bold text-deep-sea-blue mb-4">Orders Timeline</h2>
<div className="h-64 flex items-center justify-center text-deep-sea-blue/60 font-medium">
Chart will be implemented in Phase 3
</div>
</motion.div>
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.6 }}
className="bg-white border border-light-gray-border rounded-xl p-6"
>
<h2 className="text-xl font-bold text-deep-sea-blue mb-4">Status Distribution</h2>
<div className="h-64 flex items-center justify-center text-deep-sea-blue/60 font-medium">
Chart will be implemented in Phase 3
</div>
</motion.div>
</div>
{/* Info Card */}
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.7 }}
className="bg-maritime-teal/10 border border-maritime-teal/30 rounded-xl p-6"
>
<h3 className="text-lg font-bold text-deep-sea-blue mb-2">🎉 Admin Center Active!</h3>
<p className="text-deep-sea-blue/80">
Phase 1 (Foundation) is complete. Dashboard, authentication, and navigation are now functional.
Phase 2 will add backend APIs and real data integration.
</p>
</motion.div>
</div>
);
}