demo-visara.mp4
An intelligent system for analyzing internet outages using IODA (Internet Outage Detection and Analysis) data, news articles, and OpenAI ChatGPT. Features both traditional API integration and modern MCP (Model Context Protocol) support for AI assistants.
- agents/: Modular agents for IODA (outage signals), news, and report generation
- configs/: YAML config and prompt templates
- outputs/: Generated reports and visuals
- server/: FastAPI backend for web interface
- web/: React frontend (Vite)
- mcp_server.py: MCP server for AI assistant integration
- main.py: CLI tool for generating reports
- π Real-time internet outage detection via IODA API
- π° Contextual news gathering for outage analysis
- π€ OpenAI ChatGPT-powered report generation
- π§ MCP (Model Context Protocol) support for AI assistants
- π¨ Modern React web interface
- π Visual outage data representation
- π Offline mode with deterministic reports
- Python 3.9+ (Core features)
- Python 3.10+ (Required for MCP support)
- Node.js 18+ (for web interface)
- OpenAI API key (optional, for LLM features)
Option 1: Run the test script (recommended)
cd visara
python3 scripts/test_setup.pyThis will verify your setup and show you what's working!
Option 2: Interactive launcher
./scripts/run.sh- Clone and install dependencies:
git clone <repository-url>
cd visara
pip3 install -r requirements.txt- Verify setup:
python3 scripts/test_setup.py- Configure API keys:
Recommended: Use .env file (keeps secrets safe)
cp .env.example .env
# Edit .env and add your API keysAlternative: Set environment variables
export OPENAI_API_KEY="sk-your-api-key-here"
export NEWSAPI_KEY="your-newsapi-key-here" # OptionalOr edit config directly (not recommended for version control)
# configs/config.yaml
openai_api_key: "sk-your-api-key-here"
news_api_key: "your-newsapi-key"CLI Mode (Generate a Report):
python3 main.pyReport saved to outputs/reports/
Web Mode (Start Server):
uvicorn server.app:app --reloadThen visit http://localhost:8000
Interactive Mode:
./scripts/run.shChoose from CLI, Web, or MCP server
Start the Python API server:
uvicorn server.app:app --reloadServer runs at http://localhost:8000
cd web
npm install
npm run devFrontend runs at http://localhost:5173
Features:
- Upload outage images (PNG/JPEG) for visual context
- Fetch and filter relevant news articles
- Generate AI-powered reports using ChatGPT
- View historical outage data visualizations
This project includes an MCP server that exposes outage analysis tools to AI assistants like Claude Desktop.
MCP (Model Context Protocol) is Anthropic's open protocol that enables AI assistants to securely connect to data sources and tools. It's the future of AI integrations!
- Install the MCP package:
pip install mcp- Configure Claude Desktop (or other MCP client):
Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"outage-analyzer": {
"command": "python",
"args": ["/absolute/path/to/visara/mcp_server.py"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}-
Restart Claude Desktop
-
Available MCP Tools:
Once connected, Claude can use these tools:
fetch_outage_data- Get IODA network outage signalsfetch_news- Get relevant news articles for a locationget_visualization_url- Get IODA dashboard URLanalyze_outage- Comprehensive analysis (all data at once)
Can you analyze internet outages in Turkey over the last 6 hours?
Claude will automatically use the MCP tools to fetch data and provide analysis!
Edit configs/config.yaml:
# API Endpoints
ioda_base_url: "https://api.ioda.inetintel.cc.gatech.edu/v2"
news_api_key: "YOUR_NEWSAPI_KEY" # Optional, from newsapi.org
# OpenAI ChatGPT
openai_api_key: "" # Your OpenAI API key (or use env var)
use_llm: true # Set to false for offline mode
openai_model: "gpt-4o-mini" # Options: gpt-4o, gpt-4o-mini, gpt-3.5-turbo
temperature: 0.2 # Lower = more focused, higher = more creative
max_tokens: 800 # Max response length
# Defaults
default_location: "Sanaa, Yemen"
default_window_hours: 4 # Hours to look back for outage dataOffline Mode: Set use_llm: false to generate reports without API calls (deterministic template-based reports).
Want to showcase polyglot programming skills? Here's how to add Go to this project:
-
Go API Gateway (
/go-gateway/)- Rate limiting and caching
- Request routing to Python services
- Metrics and monitoring
- Why Go? High performance, low memory footprint
-
Go Data Collector Service (
/go-collector/)- Real-time IODA data streaming
- WebSocket server for live updates
- Data aggregation and buffering
- Why Go? Excellent concurrency with goroutines
-
Go CLI Tool (
/go-cli/)- Fast command-line interface for outage queries
- Batch processing of multiple locations
- JSON/CSV export utilities
- Why Go? Single binary, fast startup, no dependencies
βββββββββββββββββββββββββββββββββββββββ
β Go API Gateway (:8080) β β Add this!
β - Rate limiting (10 req/sec) β
β - Redis caching (5 min TTL) β
β - Load balancing β
ββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββ΄βββββββ
β β
βββββΌβββββ βββββΌββββββββββ
β Python β β Go Collectorβ β Add this!
β FastAPIβ β Service β
β + AI β β (streaming) β
ββββββββββ βββββββββββββββ
# 1. Install Go (golang.org)
brew install go # macOS
# or download from golang.org
# 2. Create Go workspace
mkdir go-gateway
cd go-gateway
go mod init github.com/yourusername/visara-gateway
# 3. Start with a simple reverse proxy
# See: go-gateway/README.md for tutorialResume Impact: Shows you understand microservices, can choose the right tool for the job, and aren't limited to one language!
- Network calls are best-effort. Offline mode generates deterministic reports.
- Use environment variables for API keys in production.
- The system gracefully degrades if APIs are unavailable.
Backend Development:
- β Python 3.10+ with modern async/await patterns
- β FastAPI for RESTful APIs
- β Modular agent-based architecture
- β OpenAI API integration (ChatGPT)
AI & Modern Protocols:
- β MCP (Model Context Protocol) - Cutting-edge AI integration (2024+)
- β LLM orchestration and prompt engineering
- β Multi-modal AI (text + images)
Frontend Development:
- β React with modern hooks
- β Vite for build tooling
- β Responsive UI design
System Design:
- β Microservices-ready architecture
- β API integration (IODA, NewsAPI, OpenAI)
- β Error handling and graceful degradation
- β Offline-first design patterns
Optional (with Go addition):
- β Polyglot programming (Python + Go)
- β High-performance API gateway patterns
- β Concurrent data processing
- β Understanding of when to use each language
-
"Why did you build this?"
- Real-world problem: analyzing internet outages for ISPs, governments, researchers
-
"What was technically challenging?"
- Integrating multiple APIs with different formats
- Implementing MCP protocol for AI assistants
- Balancing offline capability with AI enhancement
-
"How does the AI part work?"
- Uses ChatGPT to synthesize technical data into readable reports
- MCP allows AI assistants to query outage data on-demand
- Graceful fallback when AI isn't available
-
"Why Python AND Go?" (if you add Go)
- Python excels at AI/ML and rapid prototyping
- Go excels at high-performance network services
- Shows understanding of tool selection
- IODA API: Internet Outage Detection and Analysis
- MCP Protocol: Model Context Protocol
- OpenAI API: ChatGPT API Documentation
- NewsAPI: News API
- Go Tutorial: Learn Go (if adding Go components)
MIT License - Feel free to use this project in your portfolio!
Built with β€οΈ using Python, OpenAI ChatGPT, and MCP
