The Problem

Investigators and researchers tracking people, connections, and intelligence data typically fall back on spreadsheets, which collapse under relational complexity. GHOST addresses this with a self-hosted investigation management platform that models people, entities, locations, and their relationships in a structured, queryable system instead of flat rows.

What This Does

GHOST is a full-stack OSINT investigation CRM. The frontend/ directory (React, TypeScript, Tailwind) provides the interface: case management, entity network visualization, and a geocoded global map. The backend/ directory (Node.js/Express) exposes the API, handles authentication, rate limiting, and database persistence.

The project is a collection of four self-contained components: frontend/, backend/, .agents/ (an AI-agent skill library with design and coding reference material), and mcp/ (a Model Context Protocol server). They are not one unified codebase.

How It Is Wired

Execution starts at backend/server.js, which loads Express middleware and routes. The backend connects to a database via backend/config/database.js (imported by 21 modules) and enforces auth via backend/middleware/auth.js (20 importers). The frontend routes all API calls through frontend/src/utils/api.js — a hub module with 43 dependents, meaning any change there ripples across the entire UI.

The frontend's src/App.js imports 34 modules and sits at the top of the component tree. src/contexts/DataContext.js (17 dependents) manages shared state. Key feature files include src/components/CaseManagement.js, src/components/GlobalMap.js, and src/components/visualization/RelationshipManager.js (860 lines — oversized).

The import graph shows 166 modules with 389 edges and no circular dependencies, which is structurally clean. The main cost centers are the hub modules: api.js, database.js, and auth.js have near-zero instability, meaning they're stable but any change is high-blast-radius.

How To Use It

Setup: Clone with git clone https://github.com/moses-y/GHOST-osint-crm. Install dependencies: npm install in both backend/ and frontend/. Docker builds exist (backend/Dockerfile, frontend/Dockerfile, docker-compose.yml).

Configuration: Copy .env.example to .env in both backend/ and frontend/. Required variables include database connection strings, JWT secrets, and API keys (WiGLE integration). The frontend .env is currently committed — this is a security issue.

Running it: Start the backend with node backend/server.js and the frontend with npm start in frontend/. The docker-compose.yml orchestrates both plus PostgreSQL.

Real-World Use

A solo investigator tracking a human trafficking network imports suspect profiles, links associates via the entity graph, geocodes known locations onto the map, and queries the WiGLE integration for wireless network intelligence at those coordinates. Case data persists in PostgreSQL, and the React frontend renders the relationship map in real time.

Code Health & Issues

Static analysis found 73 issues (10 high, 63 medium) across five kinds. Key findings:

  • High — Hub modules: frontend/src/utils/api.js, backend/config/database.js, backend/middleware/auth.js have 20-43 dependents each; changes here are high-blast-radius.
  • High — Deep nesting: 26 files with indentation depth up to 10, including backend/routes/tools.js and frontend/src/components/CaseManagement.js.
  • High — Duplicated code: 84 repeated 6-line blocks across 43 files in .agents/skills/impeccable/scripts/.
  • High — Oversized files: 6 files over 860 lines, including RelationshipManager.js.

Code health audit (13 findings, 6 high):

  • High — Committed .env file (frontend/.env) that .gitignore excludes; rotate credentials immediately.
  • High — 41,244 files committed under node_modules; reinstall from lockfile and untrack.
  • High — GitHub Actions pinned to mutable tags (@v3, @v5) instead of commit SHAs.
  • High — No test command in CI despite 13 test files.
  • Medium — No Dependabot/Renovate configured.
  • Medium — Base image node:18-alpine not pinned by digest.

The Bottom Line

GHOST is a functional, self-hosted investigation CRM with genuine depth in entity modeling and visualization. The committed node_modules and .env are serious hygiene failures that must be fixed before any real deployment. Suitable for individual researchers and hobbyists who control their infrastructure and accept operator responsibility for security.