theanarchist123/INTEL
GitHub: theanarchist123/INTEL
Stars: 0 | Forks: 0
# World Intelligence (INTEL)
`World Intelligence` is an AI-assisted intel dashboard that turns noisy open-source inputs into a fast, visual operating picture.
It pulls from multiple upstream feeds, writes structured outputs into Redis, serves them through a small Express API, and renders the result as a real-time Astro/React dashboard with maps, stability panels, historical tracking charts, breaking-news cards, and OSINT signal matrices.
## Features & UI Presentation
The project features a **Premium, Real-Time Dynamic Interface** designed for visual excellence:
- **Global Threat Level Header:** A top-fixed persistent header mapping the world stability alert color to a visual severity (GREEN/YELLOW/ORANGE/RED) with glowing pulse effects.
- **Live Sync Dashboard:** The frontend polls the API every 5 minutes automatically, showing a live pulsing "SYNCING / LIVE" indicator and "Updated X mins ago" status.
- **Stability Panels with 24h Trend Charts:** Generates and visualizes regional stability scores using `recharts` for historical area charts and SVG glow rings for instantaneous scores.
- **Intercepted Chatter (Signal Matrix):** A terminal-like hacker-aesthetic data feed displaying raw intercepts from X (Grok) and other rapid signals.
- **Telegram OSINT Feed:** An OSINT network feed presenting actionable headlines and descriptions synthesized from Telegram.
## Architecture
The system is built around a mix of upstream feeds and search-backed enrichment:
flowchart TD
subgraph Sources
TG["Telegram channels"]
X["X search via Grok API"]
NR["NewsRoom API
RSS + Google Search API"] PUB["Publisher pages"] end subgraph Pipelines T1["ai/telegram/channel.js"] T2["ai/telegram/pipeline.js"] S1["ai/stat_data/pipeline.js"] D1["ai/deep_search/pipeline.js"] X1["ai/x_search/x.js"] O1["ai/orchestrator.js"] end R[("Redis (State & History)")] API["server/server.js (Express)"] WEB["web/ (Astro + React)"] TG --> T1 --> T2 --> R NR --> S1 --> R R --> D1 --> PUB --> R X --> X1 --> R O1 --> T2 R --> API --> WEB ## Runtime Flow ### 1. Ingestion Pipelines (Node.js) - **Telegram Pipeline:** `ai/telegram/channel.js` fetches messages and `ai/telegram/pipeline.js` uses Google's Gemini Flash Lite to extract news items and store them in Redis (`Telegram-Info`). - **X Search Pipeline:** `ai/x_search/x.js` uses Groq (Llama 3.1 8B) with Search Grounding to fetch the latest global and regional news, storing raw intercepted intelligence in `xsearch:latest`. - **Data Aggregator:** `ai/stat_data/pipeline.js` reads upstream data (including the `Telegram-Info` and `xsearch:latest` keys) to extract marquee headlines, map markers, and generate stability assessments using OpenRouter (Llama 3.3 70B). - **Deep Search:** `ai/deep_search/ai.js` fetches actual publisher articles and generates deep-dive reports using Google's Gemini Flash Lite. ### 2. API Server (Express) - `server/server.js` exposes Redis data over JSON endpoints (`/v1/marquee`, `/v1/coordinates`, `/v1/stability/:region`, `/v1/stability/history/:region`, `/v1/xsearch`, etc.). ### 3. Frontend Dashboard (Astro + React) ## Docker Deployment (Production) The entire stack is containerized for simple deployment to platforms like **Railway**. ### Running Locally with Docker Compose 1. Add your `.env` file to the `ai/` directory (see Environment section). 2. From the root directory: docker-compose up --build 3. Open `http://localhost:4321` in your browser. ## Environment Variables (`ai/.env`) **Core** - `REDIS_URL` (e.g. `redis://localhost:6379`) - `PORT` (for API server, default 8006) - `PUBLIC_API_BASE_URL` (for Frontend, default `http://localhost:8006`) **AI (Multi-Provider Load Balancing)** To avoid rate limit crashes (e.g. 429 Too Many Requests) across concurrent pipelines, the architecture splits inference across three distinct providers automatically: - `GEMINI_API_KEY` (Required for Telegram & Deep Search pipelines via Google API) - `OPENROUTER_API_KEY` (Required for Stat Data aggregation via OpenRouter API) - `GROQ_API_KEY` (Required for X Search intercept via Groq API) **Telegram** - `TG_API_ID` - `TG_API_HASH` - `TG_SESSION_STRING` - `TG_CHANNEL_LINKS` (Comma-separated Telegram channel links) ## Manual Local Setup If not using Docker: 1. Install dependencies in each package: cd ai && npm install cd server && npm install cd web && npm install 2. Start Redis (ensure it runs on port 6379). 3. Run the API: cd server && node server.js 4. Run the frontend: cd web && npm run dev 5. Run AI pipelines concurrently: cd ai && node start_all.js
RSS + Google Search API"] PUB["Publisher pages"] end subgraph Pipelines T1["ai/telegram/channel.js"] T2["ai/telegram/pipeline.js"] S1["ai/stat_data/pipeline.js"] D1["ai/deep_search/pipeline.js"] X1["ai/x_search/x.js"] O1["ai/orchestrator.js"] end R[("Redis (State & History)")] API["server/server.js (Express)"] WEB["web/ (Astro + React)"] TG --> T1 --> T2 --> R NR --> S1 --> R R --> D1 --> PUB --> R X --> X1 --> R O1 --> T2 R --> API --> WEB ## Runtime Flow ### 1. Ingestion Pipelines (Node.js) - **Telegram Pipeline:** `ai/telegram/channel.js` fetches messages and `ai/telegram/pipeline.js` uses Google's Gemini Flash Lite to extract news items and store them in Redis (`Telegram-Info`). - **X Search Pipeline:** `ai/x_search/x.js` uses Groq (Llama 3.1 8B) with Search Grounding to fetch the latest global and regional news, storing raw intercepted intelligence in `xsearch:latest`. - **Data Aggregator:** `ai/stat_data/pipeline.js` reads upstream data (including the `Telegram-Info` and `xsearch:latest` keys) to extract marquee headlines, map markers, and generate stability assessments using OpenRouter (Llama 3.3 70B). - **Deep Search:** `ai/deep_search/ai.js` fetches actual publisher articles and generates deep-dive reports using Google's Gemini Flash Lite. ### 2. API Server (Express) - `server/server.js` exposes Redis data over JSON endpoints (`/v1/marquee`, `/v1/coordinates`, `/v1/stability/:region`, `/v1/stability/history/:region`, `/v1/xsearch`, etc.). ### 3. Frontend Dashboard (Astro + React) ## Docker Deployment (Production) The entire stack is containerized for simple deployment to platforms like **Railway**. ### Running Locally with Docker Compose 1. Add your `.env` file to the `ai/` directory (see Environment section). 2. From the root directory: docker-compose up --build 3. Open `http://localhost:4321` in your browser. ## Environment Variables (`ai/.env`) **Core** - `REDIS_URL` (e.g. `redis://localhost:6379`) - `PORT` (for API server, default 8006) - `PUBLIC_API_BASE_URL` (for Frontend, default `http://localhost:8006`) **AI (Multi-Provider Load Balancing)** To avoid rate limit crashes (e.g. 429 Too Many Requests) across concurrent pipelines, the architecture splits inference across three distinct providers automatically: - `GEMINI_API_KEY` (Required for Telegram & Deep Search pipelines via Google API) - `OPENROUTER_API_KEY` (Required for Stat Data aggregation via OpenRouter API) - `GROQ_API_KEY` (Required for X Search intercept via Groq API) **Telegram** - `TG_API_ID` - `TG_API_HASH` - `TG_SESSION_STRING` - `TG_CHANNEL_LINKS` (Comma-separated Telegram channel links) ## Manual Local Setup If not using Docker: 1. Install dependencies in each package: cd ai && npm install cd server && npm install cd web && npm install 2. Start Redis (ensure it runs on port 6379). 3. Run the API: cd server && node server.js 4. Run the frontend: cd web && npm run dev 5. Run AI pipelines concurrently: cd ai && node start_all.js
标签:自定义脚本