Industrial-Grade Cyberspace Asset Situational Awareness Platform
δΈζ | English
AlphaMapping is a next-generation cyberspace asset query and intelligent analysis system. It deeply integrates multi-platform asset mapping (FOFA, ZoomEye) with AI large language models (LLM), providing natural language interaction, real-time situational awareness dashboards, and automated security risk assessment.
πΈ Interface Preview: Immersive Situational Awareness Visualization Dashboard
π‘ Design Philosophy: Standing on the Shoulders of Giants
AlphaMapping does NOT perform any active scanning. Instead, it fully leverages the data capabilities of mature cyberspace mapping platforms like FOFA and ZoomEye. We focus on:
- π Data Aggregation: Unified multi-platform API interface, eliminating redundant queries
- π§ Intelligent Analysis: AI-powered deep analysis of asset exposure risks
- π Visualization: Transform complex data into intuitive situational awareness dashboards
- Cyberpunk Design: Glassmorphism dark-themed dashboard designed for SOC monitoring centers
- Real-time Visualization: ECharts dynamic charts β port distribution, protocol analysis, global geo heatmap
- Interactive Linking: Click charts to filter asset list, map scatter points highlight asset cards
- 5-Column Grid Layout: Compact asset cards displaying more information per screen
- NL2CSEQL Translation: Natural language β Platform query syntax (e.g., "Find Nginx servers in Beijing" -> [FOFA]:
city="Beijing" && product="NGINX") - Security Risk Reports: AI auto-analyzes asset exposure, generates risk levels, vulnerability correlations, remediation recommendations
- Single Asset Deep Analysis: One-click AI security assessment for individual assets
- Multi-Platform Support: Currently supports FOFA and ZoomEye, with more data sources planned
- Smart Caching: Same queries hit local cache first, saving API quota
- Data Deduplication: IP:Port unique constraint with automatic Upsert updates
- Advanced Filtering: Multi-dimensional filtering by keyword, country, protocol, port
- Multi-Format Export: CSV / Excel / JSON one-click download
- Scheduled Tasks: Cron expression configuration for automated asset updates
- Docker One-Click Deployment:
docker-compose up -dto start - PowerShell Scripts: Windows environment automation
- OpenAPI Documentation: FastAPI auto-generated interactive API docs
| Layer | Tech Stack |
|---|---|
| Backend | FastAPI, SQLAlchemy, Pydantic, OpenAI SDK, APScheduler |
| Frontend | Vanilla JS (ES6+), CSS3, ECharts 5 |
| Database | SQLite (dev) / PostgreSQL (production-ready) |
| Deployment | Docker, docker-compose, Nginx, PowerShell |
| Testing | pytest, pytest-cov, pytest-asyncio |
AlphaMapping/
βββ backend/ # FastAPI Backend
β βββ app/
β β βββ core/ # Configuration, Database
β β βββ models/ # ORM Models
β β βββ services/ # Business Logic
β β βββ main.py # API Routes
β βββ tests/ # Unit Tests
βββ frontend/ # Static Frontend
βββ docker/ # Container Configuration
βββ scripts/ # Automation Scripts
- Python 3.8+
- Git
- (Optional) Docker & Docker Compose
# 1. Clone repository
git clone https://github.com/Und3r1ine/AlphaMapping.git
cd AlphaMapping
# 2. Configure API keys
cp backend/.env.example backend/.env
# Edit backend/.env with FOFA_KEY, ZOOMEYE_KEY, OPENAI_API_KEY
# 3. Start services
# Windows (PowerShell)
./scripts/run.ps1
# Linux / macOS
chmod +x scripts/*.sh
./scripts/run.sh
# Access
# - Frontend: http://localhost:3000
# - API Docs: http://localhost:8000/docs
# Stop services
# Windows: ./scripts/stop.ps1
# Linux/macOS: ./scripts/stop.sh# Configure environment
cp backend/.env.example .env
# Edit .env with your keys
# Start containers
docker-compose up -d
# Access
# - Frontend: http://localhost
# - API: http://localhost:8000Create .env file with:
# FOFA API
FOFA_EMAIL=your_email
FOFA_KEY=your_api_key
# ZoomEye API
ZOOMEYE_KEY=your_api_key
# LLM Configuration (OpenAI-compatible)
OPENAI_API_KEY=your_api_key
OPENAI_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-4cd backend
pip install -r requirements.txt
pytest tests/ -v --cov=app| Endpoint | Method | Description |
|---|---|---|
/query |
POST | Execute asset query |
/assets |
GET | List assets with filters |
/assets/export |
GET | Export assets (csv/excel/json) |
/analyze/{query_id} |
POST | Generate AI analysis report |
/scheduled-tasks |
CRUD | Manage scheduled tasks |
/stats |
GET | Dashboard statistics |
Full API documentation available at /docs when running.
Contributions are welcome! Please read our Contributing Guide and Code of Conduct.
For security issues, please see our Security Policy.
This project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for version history.
AlphaMapping - Mapping the Unknown in Cyberspace.

