Skip to content

GakunGak/intelligence-dashboard

Repository files navigation

🌍 Global Threat Intelligence Dashboard

Next.js TypeScript Tailwind CSS Prisma License Status Tests Version

🚨 Real-time Global Threat Monitoring System - A comprehensive intelligence dashboard for tracking geopolitical risks, security threats, and political instability worldwide.

image

🎯 Project Overview

This advanced threat intelligence dashboard provides real-time monitoring and analysis of global security threats, political instability, and geopolitical risks. Built with cutting-edge technologies and featuring a beautiful glassmorphism design, it transforms raw intelligence data into actionable insights.

✨ Key Features

πŸ” Real-time Intelligence Collection

  • Automated RSS feed monitoring from 100+ global sources
  • Real-time threat level assessment and categorization
  • Advanced filtering by country, language, and threat level
  • Auto-refresh every 30 seconds for live monitoring

🌍 Interactive Continent Map

  • Box-based layout similar to Finviz for optimal data visualization
  • Color-coded threat levels (Low/Medium/High/Critical)
  • Expandable continent sections with detailed country analytics
  • Click-to-explore functionality for deep country analysis

πŸ“Š Comprehensive Country Analytics

  • Political stability indices and government assessments
  • Economic freedom metrics and market indicators
  • Security index calculations and corruption levels
  • Social unrest, terrorism risk, and cyber threat assessments
  • Geopolitical tension analysis and regional dynamics

πŸ“ˆ Advanced Data Visualization

  • Real-time activity logging without browser popups
  • Professional PDF report generation with executive summaries
  • Interactive threat level indicators and trend analysis
  • Comprehensive metrics dashboard with visual indicators

πŸ› οΈ Technology Stack

🎯 Core Framework

  • ⚑ Next.js 15 - React framework with App Router
  • πŸ“˜ TypeScript 5 - Type-safe development
  • 🎨 Tailwind CSS 4 - Utility-first styling
  • 🧩 shadcn/ui - Modern component library

πŸ—„οΈ Database & Backend

  • πŸ—„οΈ Prisma ORM - Type-safe database operations
  • πŸ’Ύ SQLite - Lightweight database solution
  • πŸ”„ Real-time Updates - WebSocket integration
  • πŸ“‘ RSS Processing - Automated intelligence collection

🎨 UI/UX Features

  • 🌈 Glassmorphism Design - Modern aesthetic with backdrop blur
  • πŸ“± Responsive Layout - Mobile-first design
  • 🎭 Dark Mode - Built-in theme switching
  • ⚑ Smooth Animations - Framer Motion transitions

πŸš€ Quick Start

# Clone the repository
git clone https://github.com/GakunGak/intelligence-dashboard
cd intelligence-dashboard

# Install dependencies
npm install

# Set up the database
npm run db:push

# (Optional) Seed sample intelligence reports for testing
npx tsx src/scripts/seed-reports.ts

# Start development server
npm run dev

Open http://localhost:3000 to view the dashboard.

πŸ§ͺ Testing the Installation

After starting the server, you can verify all functionality is working:

# Run comprehensive tests (requires server to be running)
bash test-fixes.sh

# Or test manually:
# 1. Search for "Ukraine" - should return multiple reports
# 2. Click any country on the threat map - opens detailed country view
# 3. Check "Intelligence Reports" tab in country views - shows relevant reports
# 4. Try different search terms and filters

πŸ“Š Features Deep Dive

πŸ” Intelligence Collection System

The dashboard automatically collects intelligence from:

  • 100+ RSS feeds covering global news sources
  • Regional coverage: North America, Europe, Asia, Middle East, Africa, South America, Oceania
  • Language filtering with 200+ supported languages
  • Real-time processing with automatic threat assessment

🌍 Continent-Based Threat Map

Threat Map

  • Europe: Germany, France, UK, Ukraine, Montenegro, Serbia, Italy, Spain, Netherlands, Belgium, Austria, Switzerland, Sweden, Norway, Finland, Denmark, Poland, Czech Republic, Hungary, Greece, Portugal
  • Asia: China, Japan, South Korea, North Korea, India, Pakistan, Russia, Afghanistan, Thailand, Vietnam, Philippines, Indonesia, Malaysia, Singapore, Bangladesh, Sri Lanka, Myanmar, Nepal, Kazakhstan, Uzbekistan, Mongolia
  • Middle East: Israel, Iran, Iraq, Saudi Arabia, Turkey, Syria, Lebanon, Jordan, Yemen, UAE
  • Africa: South Africa, Egypt, Nigeria, Kenya, Morocco, Tanzania, Ghana, Algeria, Libya, Ethiopia
  • Americas: United States, Canada, Mexico, Brazil, Argentina, Colombia, Venezuela, Chile, Peru
  • Oceania: Australia, New Zealand, Papua New Guinea, Fiji

πŸ“ˆ Country Metrics Dashboard

Each country includes comprehensive metrics:

Metric Description Range
πŸ›οΈ Political Stability Government coherence and democratic health 0-100%
πŸ’° Economic Freedom Market openness and trade freedom 0-100%
πŸ›‘οΈ Security Index Overall security capability 0-100%
🚫 Corruption Level Government transparency and corruption 0-100%
😀 Social Unrest Civil stability and protest risk 0-100%
πŸ’£ Terrorism Risk Terror threat assessment 0-100%
πŸ’» Cyber Threat Digital security risks 0-100%
🌍 Geopolitical Tension International relations stress 0-100%

πŸ“‹ Real-time Activity Logging

Activity Log

  • Non-blocking notifications - No browser alerts that interrupt workflow
  • Color-coded log levels - Info (blue), Success (green), Warning (yellow), Error (red)
  • Detailed information - Expandable entries with context and metadata
  • Auto-expansion - Activity log expands when new events occur
  • Persistent history - Maintains log of last 100 activities

πŸ”§ Recent Improvements & Fixes

Status

βœ… Fixed Issues

  • πŸ” Search Functionality: Fixed SQLite compatibility issues with case-insensitive search
  • 🌍 Country Integration: Intelligence reports now properly linked to country overview pages
  • πŸ“Š Data Consistency: All countries with available data show relevant intelligence reports
  • 🎯 User Experience: Removed all disruptive browser popups and alerts

πŸš€ Enhanced Features

  • πŸ§ͺ Comprehensive Testing: Added automated test suite for all major functionality
  • πŸ“± Search Performance: Optimized search to handle large datasets efficiently
  • πŸ—‚οΈ Country Analytics: Detailed country pages with metrics, reports, and analysis
  • πŸ”„ Real-time Updates: Improved data collection and display synchronization

πŸ“ˆ System Status

  • βœ… Search: Fully functional for all countries and threat types
  • βœ… Country Pages: All 11 supported countries with working intelligence reports
  • βœ… Threat Map: Interactive continent-based navigation with country details
  • βœ… Analytics: Real-time metrics and threat level assessments
  • βœ… Data Export: PDF reports and data export functionality operational

🎨 Design System

🌈 Color Scheme

  • Primary: Blue gradient backgrounds
  • Threat Levels: Green (Low) β†’ Yellow (Medium) β†’ Orange (High) β†’ Red (Critical)
  • Glassmorphism: Backdrop blur effects with semi-transparent layers
  • Dark Theme: Optimized for low-light environments

πŸ“ Layout Principles

  • Mobile-first responsive design
  • Card-based information architecture
  • Consistent spacing with 4px grid system
  • Smooth transitions and micro-interactions

πŸ”§ Configuration

Environment Variables

# Database
DATABASE_URL="file:./dev.db"

# Next.js
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"

# RSS Feeds (optional)
RSS_FEED_TIMEOUT=30000
INTELLIGENCE_COLLECTION_INTERVAL=30000

Database Schema

The application uses Prisma with the following main models:

  • IntelligenceReport - Collected intelligence data
  • DataSource - RSS feed configurations
  • ThreatTag - Categorization system
  • CountryMetrics - Country-specific analytics

πŸ“Š API Endpoints

Intelligence APIs

  • GET /api/intelligence/reports - Fetch collected reports
  • POST /api/intelligence/collect - Trigger intelligence collection
  • GET /api/intelligence/analytics - Get analytics data
  • GET /api/intelligence/export - Export data (JSON/CSV/XML)

Country APIs

  • GET /api/countries - Get all countries with metrics
  • GET /api/country/[id] - Get specific country details

RSS Management

  • POST /api/intelligence/seed-sources - Configure RSS feeds
  • GET /api/intelligence/sources - List configured sources

🎯 Usage Examples

Basic Intelligence Collection

// Collect intelligence from all configured sources
const response = await fetch('/api/intelligence/collect', {
  method: 'POST'
});
const data = await response.json();
console.log(`Collected ${data.reports.length} reports`);

Country Analysis

// Get detailed country analysis
const countryData = await fetch('/api/country/ua');
const { country, metrics, reports } = await countryData.json();

console.log(`Ukraine Threat Level: ${country.threatLevel}`);
console.log(`Political Stability: ${metrics.politicalStability}%`);

Filtered Reports

// Get reports with filters
const params = new URLSearchParams({
  country: 'Ukraine',
  threatLevel: 'CRITICAL',
  limit: '50'
});

const reports = await fetch(`/api/intelligence/reports?${params}`);

πŸš€ Deployment

Production Build

# Build for production
npm run build

# Start production server
npm start

Environment Setup

  1. Database: Configure PostgreSQL or MySQL for production
  2. RSS Feeds: Set up reliable RSS feed sources
  3. Authentication: Configure NextAuth.js providers
  4. Monitoring: Set up error tracking and analytics

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Guidelines

  • Follow TypeScript best practices
  • Use Tailwind CSS for styling
  • Write comprehensive tests
  • Update documentation for new features

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Data Sources: WorldData.info for comprehensive country statistics
  • Design Inspiration: Finviz for financial data visualization concepts
  • Icons: Lucide React for beautiful, consistent iconography
  • Components: shadcn/ui for accessible, modern UI components

πŸš€ Built with ❀️ by Dragan GakunGak Jovanov

Created by Dragan GakunGak Jovanov

🌍 Real-time Global Threat Intelligence Monitoring System

πŸ“Š πŸ” 🌍 ⚑

About

European Security & Geopolitical Risk Monitor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published