Intel Platform is a polyglot intelligence pipeline that collects web content, sanitizes and enriches text, scores risk, and indexes results for search and investigation.
This project runs end-to-end locally or in containers:
- Crawls source pages with Go over Tor.
- Cleans and normalizes raw HTML with Rust.
- Extracts entities and computes risk in Python.
- Stores searchable artifacts in Elasticsearch.
- Exposes operations through a React dashboard, gateway, and observability stack.
In one line: this repo turns noisy web data into searchable, risk-scored intelligence artifacts.
Compared to most sample repos, this platform includes:
- Polyglot service specialization (Go, Rust, Python, TypeScript).
- Queue-driven decoupling across pipeline stages.
- Production and observability compose overlays.
- CI workflows for quality, performance, chaos, and policy checks.
- Health endpoints and restart/dependency controls.
- Contributor and security docs.
The platform is production-capable and significantly hardened, with these remaining high-bar improvements:
- ML risk model is trained and evaluated, but needs larger production-labeled data and online adaptation.
- JWT RBAC is implemented, but external IdP integration (OIDC/SAML) is still a next step.
- Canary analysis supports error-rate rollback; latency percentile-based rollback can improve signal quality.
- Elasticsearch schema migration is automated via reindex; zero-downtime cluster-wide rolling migration remains manual.
- Chaos matrix covers Redis, Elasticsearch, partition, and cascading failures; disk I/O fault injection is still pending.
- Policy-as-code covers Compose, Kubernetes, and Terraform; runtime admission control is still open.
- collector-go crawls configured domains over Tor and pushes envelopes (raw_html, source_url, traceparent) to Redis queue RAW_QUEUE_NAME.
- sanitizer-rust strips HTML, enforces quality thresholds, and writes normalized payloads to SANITIZED_QUEUE_NAME.
- brain-python extracts entities, scores risk, and indexes documents into Elasticsearch aliases.
- auth-api issues and verifies JWT tokens and role claims (admin, analyst, viewer).
- dashboard-ui serves operational status and access routes through the gateway.
- Kibana and Neo4j are available for search and graph workflows.
- Metrics endpoints on collector, sanitizer, and brain services.
- Runtime counters for processed, dropped, parse fallback, and failures.
- Dead-letter queues for raw and sanitized stages plus replay tooling.
- Trace context propagation across services.
- OpenTelemetry Collector and Tempo integration.
- Versioned Elasticsearch schema aliases and model-versioned documents.
- Risk model regression evaluation and ML training pipeline.
- JWT-based RBAC at the edge via gateway auth_request flow.
- Blue-green rollout overlay and switch script.
- Automated canary analysis with auto-rollback.
- Automated Elasticsearch reindex migration script.
- Chaos workflows for Redis, Elasticsearch, network partition, and cascading failures.
- Policy workflows for Compose, Kubernetes, and Terraform.
- services/collector-go: Tor crawler and Redis producer.
- services/sanitizer-rust: HTML cleaning and text normalization.
- services/brain-python: enrichment, risk scoring, indexing.
- services/auth-api: JWT auth and role verification.
- services/dashboard-ui: web dashboard.
- infrastructure: nginx gateway, prometheus, grafana, tempo, otel collector configs.
- tests/chaos: reliability failure simulations.
- policy: OPA/Rego rules for compose, kubernetes, terraform.
- scripts: setup, health checks, canary rollout, migration, replay, teardown helpers.
- Copy .env.example to .env.
- Review credentials and environment values.
- Run: docker compose up --build
- Open dashboard: http://localhost:3000
- Open Kibana: http://localhost:5601
- Open Neo4j Browser: http://localhost:7474
Start production-style edge routing and auth:
- Set strong values in .env:
- ELASTIC_PASSWORD
- NEO4J_PASSWORD
- AUTH_SECRET_KEY
- RBAC_ADMIN_PASSWORD
- Run:
- docker compose -f docker-compose.yml -f docker-compose.prod.yml up --build -d
- Validate endpoints:
- Gateway health: http://localhost:8080/health
- Brain health: http://localhost:8080/brain/health
Gateway routes use JWT role checks via auth-api.
- Login:
- curl -X POST http://localhost:8080/auth/login -H "Content-Type: application/json" -d '{"username":"admin","password":"admin-secret"}'
- Use token:
- curl -H "Authorization: Bearer " http://localhost:8080/
- Create user (admin only):
- curl -X POST -H "Authorization: Bearer " -H "Content-Type: application/json" http://localhost:8080/auth/users -d '{"username":"analyst1","password":"secret","role":"analyst"}'
Route access:
- /: viewer, analyst, admin
- /kibana/: analyst, admin
- /admin/: admin
- /health, /brain/health, /auth/login: public
Run with tracing and metrics stack:
- docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.observability.yml up -d --build
Endpoints:
- Grafana: http://localhost:3001
- Prometheus: http://localhost:9090
- Tempo: http://localhost:3200
- OTLP ingest: localhost:4317 (gRPC), localhost:4318 (HTTP)
Blue-green switch:
- ./scripts/switch_rollout.ps1 -Color green
- ./scripts/switch_rollout.ps1 -Color blue
Canary with auto-rollback:
- python scripts/canary_analysis.py --canary-duration 120 --error-threshold 0.05
Schema migration:
- python scripts/es_migrate.py --dry-run
- python scripts/es_migrate.py --auto
DLQ replay:
- ./scripts/replay_dlq.ps1 -SourceQueue sanitized_text_dlq -TargetQueue sanitized_text -Count 100
- Go tests: cd services/collector-go && go test ./...
- Rust tests: cd services/sanitizer-rust && cargo test
- Brain tests: cd services/brain-python && python -m unittest discover -s src -p "test_*.py"
- Risk eval: cd services/brain-python && python eval_model.py
- Train ML model: cd services/brain-python && python train_risk_model.py
- UI build: cd services/dashboard-ui && npm install && npm run build
- Compose lint: docker compose -f docker-compose.yml -f docker-compose.prod.yml config
Performance gate assets:
- Workflow: .github/workflows/performance-gate.yml
- Load profile: tests/perf/gateway-health.js
- Burn-rate evaluator: scripts/evaluate_burn_rate.py
Burn rate formula:
BR = ER / (1 - SLO)
Where:
- BR = burn rate
- ER = observed error rate
- SLO = target success objective
The gate fails when burn rate exceeds configured thresholds.
- Policy workflow: .github/workflows/policy.yml
- Chaos workflow: .github/workflows/chaos.yml
- Compose policy rules: policy/compose/deny.rego
- Kubernetes policy rules: policy/kubernetes/deny.rego
- Terraform policy rules: policy/terraform/deny.rego
- Elasticsearch security is disabled in default local mode for speed.
- Root-level data directories are for local persistence only.
- Use managed secret storage and network segmentation before public exposure.