e.stopPropagation()}
>
{/* Close Button */}
{/* Documentation Content */}
📚 System Documentation
Complete guide on how the RAG Document Analysis System works
{/* Quick Links */}
🚀 Quick Start
Upload CSV/Excel file with training data
Wait for analysis (automatic, 100% FREE)
View dashboard with insights and charts
Click pie chart to see theme details
Download PDF report for official use
{/* System Overview */}
📋 System Overview
This is an AI-powered Training Data Analysis System designed for disaster management training programs.
It analyzes CSV/Excel files containing training records and generates comprehensive insights, gap analysis,
and professional PDF reports.
{/* Key Features */}
✨ Key Features
{[
{ icon: '📊', title: 'Interactive Charts', desc: 'Click pie chart to see theme-wise state details' },
{ icon: '📈', title: 'Real-time Analysis', desc: 'Instant insights from your training data' },
{ icon: '📄', title: 'PDF Reports', desc: 'Government-format professional reports' },
{ icon: '🆓', title: '100% FREE', desc: 'No API keys or subscriptions needed' },
{ icon: '⚡', title: 'Fast Processing', desc: 'Analyze thousands of records in seconds' },
{ icon: '🎯', title: 'Gap Analysis', desc: 'Identify underserved states and themes' }
].map((feature, idx) => (
{feature.icon}
{feature.title}
{feature.desc}
))}
{/* How It Works */}
🔄 How It Works
{[
{ step: '1', title: 'File Upload', desc: 'Drag & drop or select CSV/Excel file' },
{ step: '2', title: 'Data Parsing', desc: 'System extracts training records from file' },
{ step: '3', title: 'AI Analysis', desc: 'Local analysis calculates metrics and insights' },
{ step: '4', title: 'Dashboard Display', desc: 'Interactive charts and insights shown' },
{ step: '5', title: 'PDF Generation', desc: 'Professional report created automatically' }
].map((item, idx) => (
{item.step}
{item.title}
{item.desc}
))}
{/* Dashboard Guide */}
🎯 Dashboard Guide
📊 Interactive Pie Chart
Click any theme to see detailed breakdown
Popup shows states covered for that disaster type
Each state displays training count badge
Data is theme-specific (Flood shows only flood-affected states)
📍 State Coverage Chart
Shows top 8 states by training count
Sorted from highest to lowest
Hover to see exact numbers
⚠️ Gap Analysis
Underserved States: States with less than 5 trainings
Underserved Themes: Disaster types needing more coverage
Critical Gaps: Important areas requiring immediate attention
{/* Technical Details */}
⚙️ Technical Details
Frontend
React 18
Vite
Recharts
Lucide Icons
Backend
Node.js
Express
PDFKit
CSV Parser
{/* Support */}
💡 Need Help?
Check the HOW_IT_WORKS.md file in the project root for detailed technical documentation.
💡 Insight: This disaster theme has been covered across multiple states, indicating comprehensive training coverage for {selectedTheme.theme.toLowerCase()} preparedness.
)}
{/* Rest of the dashboard content remains the same... */}
{/* Top Stats - Horizontal */}