Skip to content

Dborasik/ARGUS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”­ ARGUS

Automated Registry of Global User-accessible Streams

A self-hosted OSINT tool that maps publicly indexed IP cameras on an interactive world map β€” with optional AI-powered scene analysis and intelligence briefs.

CI python license platform AI data

ARGUS UI


✨ Features

πŸ—ΊοΈ Interactive map Every camera plotted as a pin on an OpenStreetMap dark tile layer
πŸ” Device intelligence panel IP, geolocation, coordinates, timezone, manufacturer, stream URL β€” one click away
πŸ“‘ Live stream preview MJPEG proxied through your server β€” the camera host never sees your IP
⚑ Real-time progress Scrape updates streamed live over SSE as each country completes
πŸ”Ž Search & filter Filter the index by city, country, or manufacturer instantly
πŸ€– AI enrichment Scene analysis (vision model) + OSINT intelligence briefs (text model) β€” opt-in, user-triggered
πŸ“‹ Bulk analysis queue Queue hundreds of cameras, monitor a live system log, start/stop workers
πŸ“± Mobile responsive Full tabbed layout at < 1100 px β€” map, list, and detail as separate tabs
πŸ”Œ Plugin sources Add a new data source by dropping one Python file into backend/sources/
🐳 One-command deploy docker compose up --build and you're running

πŸš€ Quick Start

Docker (recommended)

git clone https://github.com/Dborasik/ARGUS.git
cd argus
cp .env.example .env
docker compose up --build

Open http://localhost:5173 β€” that's it.


Manual setup

Backend

cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000

Frontend (separate terminal)

cd frontend
npm install
npm run dev

The Vite dev server proxies /api to the backend automatically.


πŸ”Œ Sources

ARGUS fetches camera data through a plugin-style sources system. Each source is a self-contained Python module in backend/sources/ β€” no other code needs to change when you add or remove one.

Source ID Credentials Description
Insecam insecam None Publicly listed cameras on insecam.org

Adding your own source

  1. Copy backend/sources/_template.py β†’ backend/sources/<name>.py
  2. Fill in the metadata and implement scrape()
  3. Restart the backend β€” your source appears in the boot screen automatically

See backend/sources/_template.py for the full documented contract.


πŸ€– AI Features (optional)

AI is off by default. No API key needed, no cost, no UI surface until you opt in.

Set in .env:

AI_ENABLED=true
OPENAI_API_KEY=sk-...

Any OpenAI-compatible endpoint works β€” OpenRouter, Ollama, LiteLLM, etc.:

OPENAI_BASE_URL=http://localhost:11434/v1   # Ollama example

Once enabled, three features appear:

  • πŸ”¬ ANALYZE FEED β€” sends a stream frame to a vision model, stores a scene description on the camera record
  • πŸ“„ INTELLIGENCE BRIEF β€” streams an OSINT assessment using all available metadata
  • βš™οΈ BULK ANALYZE β€” queue many cameras, run with configurable concurrent workers, watch a live log

βš™οΈ Configuration

All settings are environment variables. Copy .env.example to .env and adjust β€” the backend reads from there automatically.

Core

Variable Default Description
DATABASE_URL sqlite:///./argus.db SQLite (default) or PostgreSQL
API_PORT 8000 Backend listen port
CORS_ORIGINS ["http://localhost:5173"] Allowed frontend origins

Scraper

Variable Default Description
SCRAPER_WORKERS 10 Concurrent HTTP workers per country
SCRAPER_REQUEST_TIMEOUT 15 Per-request timeout (seconds)
SCRAPER_PAGE_DELAY 0.2 Delay between country batches (seconds)
SCRAPER_RETRY_COUNT 3 Retries on transient failures
SCRAPER_RETRY_BACKOFF 0.5 Exponential back-off factor

AI

Variable Default Description
AI_ENABLED false Master switch
OPENAI_API_KEY "" Required when AI is enabled
OPENAI_BASE_URL https://api.openai.com/v1 Override for local/alternate providers
AI_SCENE_MODEL gpt-4o-mini Vision model for scene analysis
AI_INTEL_MODEL gpt-4.1-mini Text model for intelligence briefs
AI_QUEUE_WORKERS 3 Concurrent bulk analysis workers

PostgreSQL

The default is SQLite β€” zero config. To switch to PostgreSQL:

DATABASE_URL=postgresql+psycopg2://argus:argus@localhost:5432/argus

Install the driver: pip install -r backend/requirements-postgres.txt Or with Docker: docker compose --profile postgres up --build


πŸ—οΈ Architecture

Browser  (React 18 + Vite + TypeScript + Leaflet)
  |
  +-- BootOverlay          source selection on first load
  +-- TopBar               scrape controls, status, bulk AI
  +-- CameraList           left panel β€” filterable camera index
  +-- MapView              centre β€” OSM dark tile map
  +-- DetailPanel          right panel β€” device intelligence
  |
  |   HTTP + SSE  (/api/*)
  |
Backend  (Python 3.12 + FastAPI)
  |
  +-- GET  /api/sources              available source plugins
  +-- POST /api/scrape/start         kick off background scrape
  +-- GET  /api/scrape/progress      SSE stream of scrape events
  +-- GET  /api/cameras              full camera index
  +-- GET  /api/cameras/{id}         single camera record
  +-- GET  /api/stream/proxy         MJPEG proxy (hides client IP)
  +-- POST /api/cameras/{id}/ai/*    scene analysis + intel brief
  +-- GET  /api/ai/queue/*           bulk analysis queue + SSE
  |
  +-- Sources   autodiscovered plugins in backend/sources/
  +-- Store     CameraStore -- in-memory + SQLite/PostgreSQL
πŸ“ Full project layout
argus/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ config.py          All tuneable settings (pydantic-settings)
β”‚   β”œβ”€β”€ main.py            uvicorn entry point
β”‚   β”œβ”€β”€ models/            camera.py, ai.py (Pydantic models)
β”‚   β”œβ”€β”€ utils/http.py      Generic HTTP session factory with retry
β”‚   β”œβ”€β”€ db/                SQLAlchemy ORM, schema init, session factory
β”‚   β”œβ”€β”€ ai/                Optional AI layer (disabled by default)
β”‚   β”‚   β”œβ”€β”€ client.py      Lazy AsyncOpenAI singleton
β”‚   β”‚   β”œβ”€β”€ prompts.py     All system prompts as module-level constants
β”‚   β”‚   β”œβ”€β”€ service.py     AIService β€” analyze_scene(), brief_camera()
β”‚   β”‚   └── queue.py       AnalysisQueue β€” all scene analysis jobs
β”‚   β”œβ”€β”€ sources/           Source plugins (autodiscovered)
β”‚   β”‚   β”œβ”€β”€ _template.py   Documented plugin contract
β”‚   β”‚   └── insecam/       Insecam source package
β”‚   └── api/
β”‚       β”œβ”€β”€ app.py         FastAPI factory + CORS + lifespan
β”‚       β”œβ”€β”€ routes.py      All HTTP endpoints (including AI routes)
β”‚       └── store.py       Thread-safe CameraStore
β”œβ”€β”€ frontend/src/
β”‚   β”œβ”€β”€ types/             TypeScript mirrors of backend models
β”‚   β”œβ”€β”€ utils/api.ts       All fetch/SSE calls
β”‚   β”œβ”€β”€ hooks/             useScrape, useAI, useAnalysisQueue, ...
β”‚   └── components/        BootOverlay, TopBar, CameraList, MapView,
β”‚                          DetailPanel, BulkAnalysisModal, mobile/
└── tests/
    β”œβ”€β”€ unit/              test_parse.py, test_store.py, test_ai_*
    └── integration/       test_routes.py

πŸ› οΈ Development

# Run all tests
python -m pytest tests/ -v

# Frontend type-check + build
cd frontend && npm run build

🀝 Contributing

Contributions are welcome. Please open an issue first for non-trivial changes.

See CONTRIBUTING.md for setup, code conventions, and the PR checklist. See AGENTS.md for AI coding agent guidelines.


βš–οΈ Legal

This tool indexes data that is already publicly listed on its sources. It does not bypass authentication, exploit vulnerabilities, or interact with camera devices beyond loading their publicly accessible stream URLs (only when the user explicitly enables the live preview toggle, which proxies through the server).

Use responsibly and in accordance with the laws of your jurisdiction.


πŸ“„ License

ARGUS is licensed under the GNU General Public License v3.0.

About

Self-hosted OSINT tool that maps publicly indexed IP cameras with AI enrichment.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors