import React, { useState, useEffect } from 'react'; import { BarChart, Bar, LineChart, Line, PieChart, Pie, Cell, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'; import { AlertTriangle, Bell, Calendar, CheckCircle, ChevronDown, Clipboard, FileText, Globe, Home, Info, LifeBuoy, LogOut, Menu, MessageSquare, PieChart as PieChartIcon, Settings, ShoppingBag, Sliders, Truck, User, Users, X } from 'lucide-react'; // Mock data for demonstrations const carbonData = [ { name: 'Jan', emissions: 4000 }, { name: 'Feb', emissions: 3800 }, { name: 'Mar', emissions: 4200 }, { name: 'Apr', emissions: 3900 }, { name: 'May', emissions: 3600 }, { name: 'Jun', emissions: 3200 }, { name: 'Jul', emissions: 3000 }, { name: 'Aug', emissions: 2800 }, { name: 'Sep', emissions: 2600 }, { name: 'Oct', emissions: 2400 }, { name: 'Nov', emissions: 2200 }, { name: 'Dec', emissions: 2000 }, ]; const complianceData = [ { name: 'Completed', value: 75 }, { name: 'In Progress', value: 15 }, { name: 'At Risk', value: 10 }, ]; const COLORS = ['#2E7D32', '#FFC107', '#F44336']; const regulatoryUpdates = [ { id: 1, title: 'EU Corporate Sustainability Reporting Directive Update', date: '2023-11-15', priority: 'High', read: false }, { id: 2, title: 'Carbon Border Adjustment Mechanism Phase 2', date: '2023-12-01', priority: 'Medium', read: true }, { id: 3, title: 'SEC Climate Disclosure Rule Changes', date: '2023-11-28', priority: 'High', read: false }, { id: 4, title: 'UK Modern Slavery Act Reporting Requirements', date: '2023-12-10', priority: 'Medium', read: true }, ]; const upcomingDeadlines = [ { id: 1, title: 'Annual Sustainability Report', date: '2023-12-31', daysLeft: 45 }, { id: 2, title: 'Carbon Emissions Disclosure', date: '2023-12-15', daysLeft: 29 }, { id: 3, title: 'Supplier Code of Conduct Renewal', date: '2023-11-30', daysLeft: 14 }, ]; const supplierRiskData = [ { name: 'Low Risk', value: 60 }, { name: 'Medium Risk', value: 30 }, { name: 'High Risk', value: 10 }, ]; const supplierRiskCOLORS = ['#4CAF50', '#FFC107', '#F44336']; const App = () => { const [activeModule, setActiveModule] = useState('dashboard'); const [sidebarOpen, setSidebarOpen] = useState(true); const [notifications, setNotifications] = useState(regulatoryUpdates.filter(update => !update.read).length); const [userRole, setUserRole] = useState('ESG Director'); const [showNotifications, setShowNotifications] = useState(false); const [showUserMenu, setShowUserMenu] = useState(false); // Mock authentication state const [isAuthenticated, setIsAuthenticated] = useState(true); const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const handleLogin = (e) => { e.preventDefault(); if (username && password) { setIsAuthenticated(true); } }; const handleLogout = () => { setIsAuthenticated(false); setUsername(''); setPassword(''); }; const toggleSidebar = () => { setSidebarOpen(!sidebarOpen); }; const markAllAsRead = () => { setNotifications(0); setShowNotifications(false); }; if (!isAuthenticated) { return (

ESG Navigator

Your comprehensive ESG compliance platform

setUsername(e.target.value)} className="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="your.email@company.com" required />
setPassword(e.target.value)} className="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-500 focus:border-green-500" placeholder="••••••••" required />
Forgot password?

Don't have an account?{' '} Contact sales

); } return (
{/* Header */}
ESG Navigator
{showNotifications && (

Notifications

{regulatoryUpdates.filter(update => !update.read).map(update => (

{update.title}

{update.date} • {update.priority} Priority

))} {regulatoryUpdates.filter(update => !update.read).length === 0 && (
No new notifications
)}
)}
{showUserMenu && ( )}
{/* Sidebar */} {/* Main Content */}
{activeModule === 'dashboard' && (

ESG Dashboard

{/* Overview Cards */}

Compliance Score

87%

+5% from last quarter

Carbon Reduction

23%

Target: 30% by 2025

Supplier Compliance

72%

+12% from last quarter

{/* Charts Section */}

Carbon Emissions Trend

Compliance Status

`${name} ${(percent * 100).toFixed(0)}%`} > {complianceData.map((entry, index) => ( ))}
{/* Upcoming Deadlines & Updates */}

Upcoming Deadlines

{upcomingDeadlines.map(deadline => (

{deadline.title}

Due: {deadline.date}

{deadline.daysLeft} days left
))}

Regulatory Updates

{regulatoryUpdates.slice(0, 3).map(update => (

{update.title}

{update.date} • {update.priority} Priority

))}
)} {activeModule === 'regulatory' && (

Regulatory Intelligence Hub

{/* Regulatory Dashboard */}

Compliance Status

87%
Completed 75%
In Progress 15%
At Risk 10%

Regulatory Updates

New Updates
{regulatoryUpdates.filter(u => !u.read).length}
Reviewed
{regulatoryUpdates.filter(u => u.read).length}

Compliance Calendar

Upcoming (30 days)
3
Future (90 days)
8
{/* Regulatory Table */}

Applicable Regulations

Regulation Jurisdiction Status Deadline Risk Level Actions
EU Corporate Sustainability Reporting Directive
European Union
Compliant Dec 31, 2023 Low
Carbon Border Adjustment Mechanism
European Union
In Progress Dec 1, 2023 Medium
SEC Climate Disclosure Rule
United States
At Risk Nov 28, 2023 High
UK Modern Slavery Act
United Kingdom
Compliant Dec 10, 2023 Low
Showing 4 of 24 regulations
)} {activeModule === 'carbon' && (

Carbon Management Center

{/* Carbon Overview Cards */}

Total Emissions (tCO2e)

12,450

+5% from last year

Reduction Target

30%

23% achieved (7% remaining)

Carbon Intensity

0.87

-12% from last year
{/* Emissions Breakdown */}

Emissions Trend

Emissions by Scope

`${name} ${(percent * 100).toFixed(0)}%`} >
{/* Reduction Initiatives */}

Carbon Reduction Initiatives

Initiative Category Status Target Reduction Progress Actions
Renewable Energy Transition
Energy
Active 2,500 tCO2e
75%
Fleet Electrification
Transportation
Planning 1,800 tCO2e
10%
Supplier Engagement Program
Supply Chain
Active 3,200 tCO2e
45%
Energy Efficiency Upgrades
Facilities
Completed 950 tCO2e
100%
Showing 4 of 12 initiatives
)} {activeModule === 'supply' && (

Supply Chain Ethics Portal

{/* Supply Chain Overview Cards */}

Total Suppliers

248

+12 from last quarter

Assessment Completion

72%

178 of 248 suppliers assessed

High-Risk Suppliers

24

+3 from last quarter
{/* Supplier Risk Map */}

Supplier Risk Map

Interactive supplier risk map would be displayed here

Supplier Risk Profile

`${name} ${(percent * 100).toFixed(0)}%`} > {supplierRiskData.map((entry, index) => ( ))}
{/* Supplier Table */}

Supplier Directory

Supplier Category Location Risk Level Assessment Status Actions
Global Manufacturing Inc.
Manufacturing
China
High Completed
EcoPackaging Solutions
Packaging
United States
Low Completed
Textile Traders Ltd.
Textiles
Bangladesh
Medium In Progress
Tech Components Co.
Electronics
Taiwan
Medium Not Started
Showing 4 of 248 suppliers
)} {activeModule === 'reporting' && (

Report Generator

{/* Report Templates */}

GRI Standards

Global Reporting Initiative

Comprehensive sustainability reporting framework widely used globally.

Data Completion 78%

SASB Standards

Sustainability Accounting Standards Board

Industry-specific standards focused on financial materiality.

Data Completion 45%

TCFD Framework

Task Force on Climate-related Financial Disclosures

Climate-focused reporting framework for financial impacts.

Data Completion 32%
{/* Report Builder */}

GRI Report Builder

Report Sections

Output Format

)} {activeModule === 'experts' && (

Expert Marketplace

{/* Expert Categories */}

Regulatory Compliance

Experts in navigating complex ESG regulations across jurisdictions.

42 Experts Available

Carbon Strategy

Specialists in carbon accounting, reduction strategies, and net-zero planning.

38 Experts Available

Supply Chain Ethics

Consultants specializing in ethical sourcing and supply chain transparency.

27 Experts Available

Reporting & Disclosure

Professionals in sustainability reporting frameworks and investor communications.

35 Experts Available

{/* Featured Experts */}

Featured Experts

JD

Dr. Jane Davis

Carbon Strategy Specialist

{[...Array(5)].map((_, i) => ( ))}
(48 reviews)

Former EPA climate scientist with 15+ years experience in corporate carbon strategy and net-zero planning.

Carbon Accounting Net-Zero Strategy Science-Based Targets

Rate: $250/hr

MR

Michael Rodriguez

Regulatory Compliance Expert

{[...Array(5)].map((_, i) => ( ))}
(36 reviews)

Attorney specializing in environmental law and ESG regulations across US, EU, and Asia-Pacific markets.

EU CSRD SEC Climate Rules TCFD Alignment

Rate: $275/hr

SL

Sarah Lin

Supply Chain Transparency Advisor

{[...Array(5)].map((_, i) => ( ))}
(52 reviews)

Supply chain expert with background in ethical sourcing, human rights due diligence, and traceability systems.

Supplier Audits Human Rights Traceability

Rate: $225/hr

{/* Active Projects */}

Your Active Projects

TCFD Climate Risk Assessment

Started: Oct 15, 2023 • Due: Dec 10, 2023

MR
Michael Rodriguez
In Progress
Progress 65%

Supplier Code of Conduct Development

Started: Sep 28, 2023 • Due: Nov 30, 2023

SL
Sarah Lin
Review Needed
Progress 80%
)}
); }; export default App;