"While other AI models tell you what happened yesterday, FlashPoint tells you what is happening right now."
"While other AI models tell you what happened yesterday, FlashPoint tells you what is happening right now."
FlashPoint is a production-ready intelligence aggregation and analysis platform that ingests data from 50+ sources in real-time, performs semantic analysis, and provides RAG-powered insights through an interactive dashboard.
Decision-makers (Governments, NGOs, Logistics) face a critical gap during rapidly evolving crises:
FlashPoint solves the "Knowledge Cutoff" problem in crisis intelligence:
- News Lags: Mainstream media takes 30-60 minutes to verify and publish.
-
๐ก Real-Time Ingestion: Monitors 25 Telegram channels, 10 Reddit communities, 18 RSS feeds, and news APIs2. AI Hallucinates: Standard LLMs have a knowledge cutoff or rely on slow browsing tools.
-
๐ง Semantic Analysis: Generates embeddings and stores in Qdrant vector database for intelligent retrieval3. Noise Overload: Human analysts cannot manually filter thousands of Telegram messages per minute.
-
๐ค RAG-Powered Chat: Ask questions about current events with LangChain + OpenRouter LLM
-
๐ Visual Dashboard: Live feed with Leaflet map, commodity prices, conflict tracking---
-
๐ Auto-Reports: Generate intelligence SITREPs with one click (Markdown + PDF)
FlashPoint is a Live RAG (Retrieval Augmented Generation) engine that listens to the raw pulse of the world โ Telegram channels, Reddit threads, and News Wires โ in real-time.
It uses Pathway to ingest, embed, and index streaming data instantly, allowing an AI LLM to answer strategic questions based on events that happened seconds ago.
-
Docker & Docker ComposeThe backend is a FastAPI service that serves both the REST API and a fully static HTML/CSS/JS dashboard โ no separate frontend server needed. The Pathway engine runs as a parallel process, continuously updating the RAG context and pushing events over SSE.
-
Python 3.11+
-
OpenRouter API key (free tier works)---
-
Telegram API credentials (for Telegram sources)
- ๐ก Multi-Source Intel โ Aggregates live data from Telegram (raw speed), Reddit (human intel), GNews and RSS feeds (verified reporting).
git clone https://github.com/Reaper-ai/FlashPoint.git- **๐ Live Geopolitical Hotspot Map** โ spaCy NER auto-extracts locations from text; map markers scale **proportionally** to how frequently a location is mentioned.
cd FlashPoint- **๐ด Real-Time SSE Feed** โ New events are pushed to the browser instantly via Server-Sent Events; newest item animates to the top of the live feed.
- **๐ค Streaming AI Chat** โ Ask the AI anything; it responds token-by-token with a live typing effect, grounded in the most recent 20 feed events.
# Copy environment template- **๐ Automated SITREP Reports (PDF)** โ Gemini generates structured intelligence briefs downloadable as PDF directly from the browser.
cp .env.example .env- **โก Zero-DB Architecture** โ No vector database to manage. Pathway handles streaming embedding and retrieval entirely in-memory.
# Edit .env with your credentials---
nano .env
```## ๐๏ธ Architecture
### 2. Start Infrastructure```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```bashโ Data Sources โ
# Start PostgreSQL, Redis, Qdrantโ Telegram ยท Reddit ยท GNews API ยท RSS Feeds ยท Simulation โ
docker-compose up -dโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ pw.io.python.read()
# Verify services are healthy โผ
docker-compose psโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```โ Pathway Streaming Engine (pipeline.py) โ
โ SentenceTransformerEmbedder โ DocumentStore (KNN) โ
### 3. Install Dependenciesโ โ query_service (port 8011, OpenRouter/Gemini) โ
โ โ stream_writer (POST /v1/stream โ FastAPI) โ
```bashโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
python -m venv .venv โ HTTP POST /v1/stream
source .venv/bin/activate # Windows: .venv\Scripts\activate โผ
pip install -r requirements.txtโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```โ FastAPI Server (api.py, port 8000) โ
โ geo_extractor โ spaCy NER + Nominatim geocoding โ
### 4. Initialize Databaseโ report_service โ Gemini SITREP generation โ
โ SSE broadcast โ asyncio.Queue fan-out to browsers โ
```bashโ StaticFiles โ serves frontend/web/ at "/" โ
python backend/init_infra.pyโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
``` โ SSE / REST / Static files
โผ
### 5. Launch FlashPointโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Browser Dashboard (frontend/web/) โ
```bashโ EventSource feed ยท Leaflet map ยท Bias meter ยท Chat โ
./start.shโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
This starts:---
-
Celery workers (data ingestion)
-
Celery beat (task scheduler)## ๐ ๏ธ Tech Stack
-
FastAPI server (http://localhost:8000)
| Layer | Technology |
Open your browser: http://localhost:8000|---|---|
| Streaming Engine | Pathway โ live ETL, embedding, KNN index |
---| Backend API | FastAPI + uvicorn โ async REST + SSE |
| RAG Inference | OpenRouter โ google/gemini-2.0-flash-lite (Pathway query service) |
๐๏ธ Architecture| AI Chat / SITREP | Google Gemini (gemini-flash-latest) via google-generativeai |
| NER / Geocoding | spaCy en_core_web_sm + OSM Nominatim |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| **Map** | Leaflet.js v1.9.4 โ dark CartoDB tiles, proportional circle markers |
โ DATA SOURCES โ| **PDF Reports** | jsPDF 2.5.1 (client-side, CDN) |
โ RSS (18) โ Telegram (25) โ Reddit (10) โ News APIs โ| **Connectors** | `Telethon` (Telegram MTProto), `requests` (Reddit/GNews), `feedparser` (RSS) |
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| **Deployment** | Docker Compose |
โ
โผ---
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CELERY WORKERS (Distributed) โ## ๐ Project Structure
โ RSS Worker (5min) โ Reddit (1min) โ News (10min) โ
โ Telegram (realtime) โ Conflicts (12h) โ Commodities โ```text
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโFlashPoint/
โโโโ backend/
โผโ โโโ main.py # Entry point โ uvicorn on port 8000
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ pipeline.py # Pathway orchestrator (run separately)
โ PROCESSING PIPELINE โโ โโโ api.py # FastAPI routes (SSE feed, chat, report, health)
โ Dedup (SHA256) โ Embed (sentence-transformers) โโ โโโ geo_extractor.py # spaCy NER + Nominatim geocoding service
โ โ Store (PostgreSQL + Qdrant) โ Publish (Redis) โโ โโโ report_service.py # Gemini SITREP generation service
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ rag_pipeline.py # Pathway DocumentStore + embedding pipeline
โโ โโโ query_service.py # Pathway HTTP query intake โ LLM โ response
โผโ โโโ stream_writer.py # Pathway โ FastAPI bridge with startup retry
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ data_registry.py # Source connector registry
โ STORAGE LAYER โโ โโโ auth_telegram.py # Telegram MTProto authentication
โ PostgreSQL + TimescaleDB โ Qdrant โ Redis โโ โโโ connectors/
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโ telegram_src.py
โโ โ โโโ reddit_src.py
โผโ โ โโโ news_src.py
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโ rss_src.py
โ FASTAPI SERVER โโ โ โโโ sim_src.py # Simulation source (dummy.jsonl)
โ SSE Stream โ RAG Chat โ Reports โ Commodities โโ โโโ Dockerfile
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ frontend/
โโ โโโ web/ # Static dashboard (served by FastAPI)
โผโ โโโ index.html # Three-column command dashboard
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ styles.css # Dark cyber theme + SSE animations
โ FRONTEND (ES6 Modules) โโ โโโ app.js # SSE feed, map, bias meter, streaming chat
โ Live Feed โ Leaflet Map โ Chat โ Commodities โโโโ data/
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ dummy.jsonl # 20 realistic geopolitical test events
```โโโ docker-compose.yaml
โโโ requirements.txt
### Key Technologiesโโโ README.md
Backend:
-
FastAPI - Async web framework---
-
Celery - Distributed task queue
-
SQLAlchemy - ORM with async support## ๐ Getting Started
-
LangChain - RAG framework
-
sentence-transformers - Embeddings (all-MiniLM-L6-v2)### Prerequisites
Storage:- Python 3.10+
-
PostgreSQL 15 + TimescaleDB - Time-series event storage- Docker & Docker Compose (for containerised deployment)
-
Redis 7 - Caching, deduplication, pub/sub- Telegram API ID & Hash โ my.telegram.org
-
Qdrant - Vector database (384-dim COSINE)- Google Gemini API key
AI:- OpenRouter API key (for Pathway RAG queries)
-
OpenRouter - LLM API (Llama 3.3 70B)
-
LangChain - RAG orchestration### Local Development
-
spaCy - NER for entity extraction
- Clone the repository
Frontend:```bash
-
Vanilla JavaScript (ES6 modules)git clone https://github.com/Reaper-ai/FlashPoint.git
-
Leaflet.js - Interactive mapscd FlashPoint
-
Server-Sent Events - Real-time updates```
---2. Install dependencies
## ๐ Project Structurepip install -r requirements.txt
python -m spacy download en_core_web_sm
FlashPoint/
โโโ backend/3. Configure environment
โ โโโ api.py # FastAPI routes```bash
โ โโโ main.py # Application entry pointcp .env.example .env
โ โโโ init_infra.py # Database initialization# Edit .env and fill in all API keys
โ โโโ models/```
โ โ โโโ database.py # SQLAlchemy models
โ โ โโโ redis_client.py # Redis utilities4. Run the FastAPI server (Terminal 1)
โ โโโ services/```bash
โ โ โโโ rag_service.py # LangChain RAGcd backend && python main.py
โ โ โโโ report_service.py # SITREP generation```
โ โ โโโ commodity_service.py # Price tracking
โ โ โโโ conflict_service.py # CFR scraping5. Run the Pathway pipeline (Terminal 2)
โ โ โโโ geo_extractor.py # NER + geocoding```bash
โ โโโ workers/tasks/cd backend && python pipeline.py
โ โ โโโ rss_worker.py # RSS polling```
โ โ โโโ reddit_worker.py # Reddit API
โ โ โโโ news_worker.py # GNews API6. Open the dashboard
โ โ โโโ telegram_worker.py # Telethon streaming
โ โ โโโ conflict_worker.py # CFR scrapingNavigate to http://localhost:8000
โ โ โโโ commodity_worker.py # Price fetching
โ โ โโโ processor.py # Embedding generation> Offline / demo mode: Set USE_DUMMY = true in frontend/web/app.js to load the built-in test feed without a running backend.
โ โโโ config/
โ โโโ celery_config.py # Celery configuration### Docker (full stack)
โ โโโ auth_telegram.py # Telegram credentials
โโโ frontend/web/```bash
โ โโโ index.html # Main pagedocker-compose up --build
โ โโโ app.js # Entry point```
โ โโโ js/
โ โโโ feed.js # SSE event streamAuthenticate Telegram on first run by entering your phone number and the OTP sent to the Telegram app.
โ โโโ map.js # Leaflet integration
โ โโโ chat.js # RAG chat interface---
โ โโโ commodities.js # Price widget
โ โโโ conflicts.js # Conflict markers## ๐น๏ธ Usage
โ โโโ reports.js # SITREP generation
โ โโโ utils.js # Shared utilities1. Open the dashboard at http://localhost:8000.
โโโ data/2. Watch the Live Intel Feed (left column) โ new events slide in from the top as they arrive.
โ โโโ data_sources.json # Source configuration (53 sources)3. The Geopolitical Hotspot Map (centre) shows circle markers sized by how frequently each location appears in the stream.
โโโ docker-compose.yml # Infrastructure services4. The Narrative Balance bar (right column) updates in real time based on the last 50 events.
โโโ start.sh # One-command startup5. Type a question in the AI Chat panel โ the response streams back token-by-token.
โโโ stop.sh # Graceful shutdown6. Click Generate Report to produce a Gemini-authored PDF SITREP of current conditions.
โโโ docs/ # Documentation
---## ๐ API Endpoints
## ๐ฎ Usage| Method | Path | Description |
|---|---|---|
### Dashboard Features| `GET` | `/health` | Liveness probe |
| `POST` | `/v1/stream` | Pathway โ API event ingestion |
1. **Live Feed** - Real-time event stream with SSE| `GET` | `/v1/feed/stream` | SSE stream of live events (EventSource) |
2. **Interactive Map** - Click markers to see event details| `GET` | `/v1/frontend/feed` | Snapshot of last 100 events (JSON) |
3. **RAG Chat** - Ask questions: *"What's happening in Gaza?"*| `GET` | `/v1/generate_report` | Trigger Gemini SITREP generation |
4. **Commodity Prices** - Gold, silver, oil prices (auto-refresh)| `POST` | `/v1/chat` | SSE-streaming LLM chat |
5. **Conflict Tracker** - CFR Global Conflict Tracker integration| `GET` | `/` | Static dashboard (index.html) |
6. **SITREP Generation** - One-click intelligence reports
---
### API Endpoints
## ๐ฅ Team
```bash
# Health check- **Gaurav Upreti** โ Backend, Pathway Pipeline, API
curl http://localhost:8000/health- **Ashmeet Singh Sandhu** โ Frontend, Data Connectors & Design
# Recent events---
curl http://localhost:8000/api/events/recent?limit=10
*Built with โค๏ธ using [Pathway](https://pathway.com).*
# Event stream (SSE)
curl http://localhost:8000/api/events/stream
# RAG chat
curl -X POST http://localhost:8000/v1/chat \
-H "Content-Type: application/json" \
-d '{"message": "What are the latest developments in Ukraine?"}'
# Generate report
curl http://localhost:8000/v1/generate_report
# Commodities
curl http://localhost:8000/api/commodities/latest
# Conflicts
curl http://localhost:8000/api/conflicts/all
Edit data/data_sources.json:
{
"telegram_channels": [
{
"username": "new_channel",
"bias": "Neutral",
"enabled": true
}
],
"reddit_subreddits": ["worldnews"],
"rss_feeds": [
{
"url": "https://example.com/feed.xml",
"name": "Example News",
"enabled": true
}
]
}Restart workers: ./stop.sh && ./start.sh
# PostgreSQL
DATABASE_URL=postgresql://flashpoint:password@localhost:5432/flashpoint
# Redis
REDIS_URL=redis://localhost:6379/0
# Qdrant
QDRANT_URL=http://localhost:6333
# OpenRouter (for RAG)
OPENROUTER_API_KEY=your_key_here
# Telegram
TELEGRAM_API_ID=your_id
TELEGRAM_API_HASH=your_hash
TELEGRAM_PHONE=your_phone
# GNews API (optional)
GNEWS_API_KEY=your_keyEdit backend/config/celery_config.py:
beat_schedule = {
'fetch-rss': {'task': 'rss_worker.fetch_all_rss', 'schedule': 300}, # 5 min
'fetch-reddit': {'task': 'reddit_worker.fetch_reddit', 'schedule': 60}, # 1 min
'fetch-news': {'task': 'news_worker.fetch_news', 'schedule': 600}, # 10 min
# ...
}# Celery worker
tail -f logs/celery-worker.log
# Celery beat
tail -f logs/celery-beat.log
# Docker services
docker-compose logs -f postgres
docker-compose logs -f redis
docker-compose logs -f qdrant# Connect to PostgreSQL
docker exec -it flashpoint-postgres psql -U flashpoint
# Check events
SELECT COUNT(*) FROM events;
SELECT source, COUNT(*) FROM events GROUP BY source;# Connect to Redis
docker exec -it flashpoint-redis redis-cli
# Check keys
KEYS *
GET recent_events- Use PostgreSQL managed service (AWS RDS, DigitalOcean)
- Use Redis managed service (Redis Cloud, AWS ElastiCache)
- Deploy Qdrant on K8s or use Qdrant Cloud
- Run Celery workers as separate containers
- Use HTTPS with Let's Encrypt
- Set up monitoring with Grafana + Prometheus
- Enable backups for PostgreSQL
# Build production image
docker build -t flashpoint:latest .
# Run with docker-compose
docker-compose -f docker-compose.prod.yml up -dContributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
See docs/DEVELOPMENT.md for development setup.
MIT License - see LICENSE file
- Pathway (original RAG implementation, now replaced)
- LangChain for RAG orchestration
- OpenRouter for LLM access
- CFR Global Conflict Tracker for conflict data
- Leaflet.js for mapping
- All open source contributors
See GitHub Issues
Roadmap:
- Twitter/X integration
- Sentiment analysis dashboard
- Multi-language support
- Mobile app
- GraphQL API
Built with โค๏ธ for intelligence analysts, journalists, and decision-makers
FlashPoint v2.0 - Native Architecture (March 2026)