A proof of concept webhook receiver and analytics dashboard for KORE Wireless SUPER SIM Event Streams. Built with Flask for real-time monitoring, persistent storage, and comprehensive analytics. -> THIS IS NOT A PRODUCTION READY CODEBASE, TESTING & EDUCATIONAL PURPOSES ONLY, PLEASE USE WITH CAUTION <-
✅ Webhook Security - KORE signature verification with proper JSON minification
✅ CloudEvents 1.0 Support - Receives KORE SUPER SIM event streams
✅ SQLite Database - Persistent storage with automatic data retention
✅ Real-time Dashboard - Live event monitoring with auto-refresh (pauses on JSON view)
✅ Analytics & Charts - Event timeline, RAT types, top devices, data usage per device, networks, countries, and event type breakdown
✅ Interactive Chart Drill-Down - Click any chart segment to filter matching events in Search & Filter
✅ Search & Filter - Find events by ICCID, device name, event type, date range, RAT type, country, and network
✅ Global Connectivity Map - Heatmap with auto-fit zoom, online/offline device status, and fly-to navigation
✅ Expandable Event Details - Structured and JSON views with one-click Copy JSON
✅ Production Ready - Nginx configuration, systemd service, and deployment guides
git clone https://github.com/naturalfunction/kore-supersim-dashboard.git
cd kore-supersim-dashboard
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Copy example environment file
cp .env.example .env
# Edit .env with your settings
KORE_WEBHOOK_SECRET=your_webhook_secret_here
KORE_WEBHOOK_CALLBACK_URL=https://your-domain.com/webhook/superpython3 -c "from app.database import init_db; init_db()"python3 run.pyThe dashboard will be available at: http://localhost:6001
In your KORE Wireless portal:
- Go to Event Streams → Destinations
- Create a new Webhook destination
- Set URL to:
https://your-domain.com/webhook/super - Set the webhook secret to match your
KORE_WEBHOOK_SECRET - Create a Streaming Rule to forward events to this destination
kore-supersim-dashboard/
├── run.py # Application entry point
├── config.py # Configuration settings
├── requirements.txt # Python dependencies
├── pyproject.toml # Modern Python packaging
├── .env.example # Environment variables template
├── app/ # Main application package
│ ├── __init__.py # App factory and initialization
│ ├── routes.py # API routes and webhook handler
│ ├── models.py # SQLAlchemy database models
│ ├── database.py # Database connection and utilities
│ ├── templates/ # Jinja2 HTML templates
│ │ └── dashboard.html # Main dashboard interface
│ └── static/ # Static assets (CSS, JS, images)
│ ├── css/style.css # Dashboard styling
│ ├── js/dashboard.js # Frontend JavaScript
│ └── vendor/ # Third-party libraries (Leaflet, etc.)
├── deployment/ # Production deployment configs
│ └── nginx.conf # Nginx reverse proxy template
- Real-time display of recent events (last 100)
- Auto-refresh every 15 seconds (pauses when viewing JSON to prevent reload mid-copy)
- Master-detail layout with event list sidebar and structured detail pane
- Structured and JSON views with one-click Copy JSON button
- Click "Map ↗" to jump to a device's location on the map
- Event Timeline: Daily event count over the last 30 days (line chart)
- Events by Type: Breakdown of started/updated/ended events with semantic colors
- RAT Type Distribution: LTE, NB-IoT, etc. breakdown (doughnut chart)
- Top Devices by Activity: Most active devices (horizontal bar)
- Data Usage per Device: Data consumption per device (horizontal bar)
- Top Networks: Most active mobile operators (horizontal bar)
- Geographic Distribution: Events by country (pie chart)
- Data Usage Overview: Total data usage in GB/MB/bytes
- Click-through Drill-Down: Click any chart segment to jump to Search & Filter with pre-filled filters
- Devices with no name automatically fall back to ICCID in charts
- Global Heatmap: Visualizes device density (green=online, red=offline)
- Auto-fit Zoom: Map automatically zooms to fit all device locations on load
- Interactive Map: Zoom and pan to explore global connectivity
- Device Markers: Click "Map ↗" on any event to fly to its exact location
- Show All: Button resets the view to fit all devices
- Filter by SIM ICCID, device name, event type, RAT type, country, and network
- Device name dropdown populated from database (falls back to ICCID for unnamed devices)
- Date range filtering with auto-populated 30-day window
- End date auto-defaults to 23:59 for full-day coverage
- Expandable results with Structured and JSON detail views
- One-click Copy JSON button on each result
- Click "Map ↗" on any result to jump to its location on the map
POST /webhook/super
Receives KORE SUPER SIM CloudEvents (JSON array format). Requires kore-signature header for security verification.
GET /api/events?limit=50&offset=0&iccid=<iccid>&event_type=<type>&start_date=<iso>&end_date=<iso>&device_name=<name>&rat_type=<rat>&country=<country>&network=<network>
Returns paginated events with optional filtering.
GET /api/stats
Returns analytics data (total events, unique SIMs, data usage, event type breakdown, top networks, countries, RAT types, top devices, data per device, daily timeline).
GET /api/devices
Returns a list of distinct device names for populating filter dropdowns.
GET /api/heatmap
Returns online/offline device locations for the map view.
GET /health
Returns application health status and database statistics.
The application uses environment variables for configuration. Copy .env.example to .env and customize:
# Server Configuration
PORT=6001
HOST=0.0.0.0
DEBUG=False
# KORE Webhook Security (REQUIRED)
KORE_WEBHOOK_SECRET=your_webhook_secret_here
KORE_WEBHOOK_CALLBACK_URL=https://your-domain.com/webhook/super
# Database (optional - defaults to SQLite)
DATABASE_PATH=supersim_events.db
DATA_RETENTION_DAYS=120
# Dashboard Settings (optional)
AUTO_REFRESH_INTERVAL=15
EVENTS_PER_PAGE=50
MAX_EVENTS_LIMIT=1000- KORE_WEBHOOK_SECRET: Secret from KORE Developer Portal (required for security)
- KORE_WEBHOOK_CALLBACK_URL: Your webhook URL (must match KORE portal exactly)
- DATA_RETENTION_DAYS: How long to keep events (default: 120 days)
- AUTO_REFRESH_INTERVAL: Dashboard refresh rate in seconds (default: 15)
See config.py for all available options.
The application automatically deletes events older than 4 months (120 days) to manage database size. The cleanup job runs daily at 2:00 AM.
To manually trigger cleanup:
python -c "from app.database import cleanup_old_events; print(f'Deleted {cleanup_old_events()} events')"Webhook signature verification fails:
- Ensure
KORE_WEBHOOK_SECRETmatches your KORE Developer Portal exactly - Verify
KORE_WEBHOOK_CALLBACK_URLmatches the URL in KORE portal - Check logs:
python3 run.py(look for signature mismatch warnings)
Events not appearing:
- Verify webhook endpoint is accessible from internet
- Check KORE Event Stream destination URL is correct
- Test webhook:
curl -X POST http://localhost:6001/webhook/super -H "Content-Type: application/json" -d '[{"id":"test","type":"test","data":{"sim_iccid":"test","timestamp":"2024-01-01T00:00:00Z"}}]'
Database issues:
- Ensure database file is writable
- Check disk space for SQLite database growth
- Restart application if database is locked
# Clone repository
git clone https://github.com/your-username/kore-supersim-dashboard.git
cd kore-supersim-dashboard
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment
cp .env.example .env
# Edit .env with your configuration
# Initialize database
python3 -c "from app.database import init_db; init_db()"
# Run application
python3 run.pyCore dependencies (see requirements.txt for versions):
- Flask - Web framework
- SQLAlchemy - Database ORM
- APScheduler - Background job scheduling
- python-dateutil - Date/time utilities
- python-dotenv - Environment variable loading
This project uses modern Python packaging with pyproject.toml:
# Install in development mode
pip install -e .
# Build distribution packages
pip install build
python -m build- Generate your own webhook secret in the KORE Developer Portal
- Update environment variables with your actual values:
export KORE_WEBHOOK_SECRET=your_actual_secret_here export KORE_WEBHOOK_CALLBACK_URL=https://your-domain.com/webhook/super
- Never commit real secrets to version control
- Use HTTPS for all webhook endpoints (KORE requirement)
The application uses SQLite by default with automatic cleanup:
- Events older than 120 days are automatically deleted (configurable)
- Cleanup job runs daily at 2:00 AM
- Manual cleanup:
python3 -c "from app.database import cleanup_old_events; print(f'Deleted {cleanup_old_events()} events')"
# Backup database
sqlite3 supersim_events.db ".backup 'supersim_events.backup.db'"
# Compact database (reduces file size)
sqlite3 supersim_events.db "VACUUM INTO 'supersim_events.compacted.db';"
# Check database size
ls -lh supersim_events.db- SQLite (default) - Simple, file-based, good for moderate traffic
- PostgreSQL - Recommended for high traffic or multi-instance deployments
- MySQL - Alternative for existing MySQL infrastructure
To use PostgreSQL/MySQL, update DATABASE_URL in your environment.
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Commit with clear messages:
git commit -m "Add feature description" - Push to your fork:
git push origin feature-name - Create a Pull Request
- Issues: GitHub Issues
- KORE SUPER SIM: KORE Developer Portal
Built for KORE Wireless Pre-sales team, for SUPER SIM Event Streams 🚀