"use client"; import React, { useState, useEffect } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { X, ExternalLink, Key, Shield, Radar, Globe, Satellite, Ship, Radio } from "lucide-react"; const STORAGE_KEY = "shadowbroker_onboarding_complete"; const API_GUIDES = [ { name: "OpenSky Network", icon: , required: true, description: "Flight tracking with global ADS-B coverage. Provides real-time aircraft positions.", steps: [ "Create a free account at opensky-network.org", "Go to Dashboard → OAuth → Create Client", "Copy your Client ID and Client Secret", "Paste both into Settings → Aviation", ], url: "https://opensky-network.org/index.php?option=com_users&view=registration", color: "cyan", }, { name: "AIS Stream", icon: , required: true, description: "Real-time vessel tracking via AIS (Automatic Identification System).", steps: [ "Register at aisstream.io", "Navigate to your API Keys page", "Generate a new API key", "Paste it into Settings → Maritime", ], url: "https://aisstream.io/authenticate", color: "blue", }, ]; const FREE_SOURCES = [ { name: "ADS-B Exchange", desc: "Military & general aviation", icon: }, { name: "USGS Earthquakes", desc: "Global seismic data", icon: }, { name: "CelesTrak", desc: "2,000+ satellite orbits", icon: }, { name: "GDELT Project", desc: "Global conflict events", icon: }, { name: "RainViewer", desc: "Weather radar overlay", icon: }, { name: "OpenMHz", desc: "Radio scanner feeds", icon: }, { name: "RSS Feeds", desc: "NPR, BBC, Reuters, AP", icon: }, { name: "Yahoo Finance", desc: "Defense stocks & oil", icon: }, ]; interface OnboardingModalProps { onClose: () => void; onOpenSettings: () => void; } const OnboardingModal = React.memo(function OnboardingModal({ onClose, onOpenSettings }: OnboardingModalProps) { const [step, setStep] = useState(0); const handleDismiss = () => { localStorage.setItem(STORAGE_KEY, "true"); onClose(); }; const handleOpenSettings = () => { localStorage.setItem(STORAGE_KEY, "true"); onClose(); onOpenSettings(); }; return ( {/* Backdrop */} {/* Modal */}
e.stopPropagation()} > {/* Header */}

MISSION BRIEFING

FIRST-TIME SETUP
{/* Step Indicators */}
{["Welcome", "API Keys", "Free Sources"].map((label, i) => ( ))}
{/* Content */}
{step === 0 && (
S H A D O W B R O K E R

Real-time OSINT dashboard aggregating 12+ live intelligence sources. Flights, ships, satellites, earthquakes, conflicts, and more — all on one map.

API Keys Required

Two API keys are needed for full functionality: OpenSky Network (flights) and AIS Stream (ships). Both are free. Without them, some panels will show no data.

8 Sources Work Immediately

Military aircraft, satellites, earthquakes, global conflicts, weather radar, radio scanners, news, and market data all work out of the box — no keys needed.

)} {step === 1 && (
{API_GUIDES.map((api) => (
{api.icon} {api.name} REQUIRED
GET KEY

{api.description}

    {api.steps.map((s, i) => (
  1. {i + 1}. {s}
  2. ))}
))}
)} {step === 2 && (

These data sources are completely free and require no API keys. They activate automatically on launch.

{FREE_SOURCES.map((src) => (
{src.icon} {src.name}

{src.desc}

))}
)}
{/* Footer */}
{[0, 1, 2].map((i) => (
))}
{step < 2 ? ( ) : ( )}
); }); export function useOnboarding() { const [showOnboarding, setShowOnboarding] = useState(false); useEffect(() => { const done = localStorage.getItem(STORAGE_KEY); if (!done) { setShowOnboarding(true); } }, []); return { showOnboarding, setShowOnboarding }; } export default OnboardingModal;