# Start infrastructure
docker-compose up -d redis postgres
# Initialize database
psql -h localhost -U threat_user -d security_platform -f init-db.sql
# Start API Gateway
uvicorn services.fastapi_app:app --reload --port 8000 &
# Start Detection Service
python services/detection_service.py &
# Start Ingestion Service
uvicorn services.ingestion_service:app --reload --port 9000 &
# Start Dashboard
npm run dev
## π Performance Benchmarks
| Metric | Result | Target |
|--------|--------|--------|
| **Throughput** | 750 req/sec | 500+ |
| **Detection Latency (p95)** | 145ms | <200ms |
| **Ingestion Rate** | 10,000 logs/sec | 5,000+ |
| **ML Accuracy** | 92.3% | >90% |
| **Queue Processing** | 1,200 jobs/sec | 1,000+ |
*Tested on: 4 vCPU, 8GB RAM*
---
## π― Detection Capabilities
### Threat Types Detected
- **SQL Injection** - Pattern matching + ML anomaly detection
- **Cross-Site Scripting (XSS)** - Script tag and event handler detection
- **Command Injection** - Shell command pattern analysis
- **Path Traversal** - Directory traversal attempt detection
- **Brute Force** - Failed login pattern recognition
- **Malware Signatures** - Code execution pattern matching
- **LDAP Injection** - LDAP query manipulation detection
### Detection Rules
- 8 built-in rules with configurable severity
- Custom rule support via API
- ML-based anomaly detection for zero-day threats
- Confidence scoring (0-1 scale)
---
## π Real-World Usage
### Example: SOC Monitoring
```python
# Ingest 10,000 logs from various sources
POST /ingest/http # HTTP API
UDP 5140 # Syslog
/logs/*.log # File watcher
kafka://logs # Kafka consumer
# Detection Engine processes in parallel
# Critical threats trigger immediate alerts
# Dashboard shows real-time statistics