# elm1nst3r/ghost-osint-crm architecture

> Architecture diagram of the GitHub repository elm1nst3r/ghost-osint-crm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/elm1nst3r/ghost-osint-crm
- Repository: https://github.com/elm1nst3r/ghost-osint-crm

## Overview

GHOST is a self-hosted OSINT investigation CRM. Investigators sign in, enter a project, and manage people, cases, businesses, locations, networks, assets, wallets, and transactions; they can then search, map, visualize relationships, and produce reports. Projects provide the documented data-isolation and access-control boundary. The graph emphasizes the frontend-to-API workflow and major product capabilities; some feature links are based on README documentation because their implementation excerpts were not provided.

Main entry points: [`backend/server.js`](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/server.js) (HTTP server), [`frontend/src/App.js`](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/App.js) (Application shell), [`backend/config/database.js`](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/config/database.js) (PostgreSQL), [`frontend/src/utils/api.js`](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/utils/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Investigator interface"]
  node_app["Application shell<br/>[App.js]"]
  node_projectcontext["Project context<br/>[ProjectContext.js]"]
  node_apiclient["API client<br/>[api.js]"]
  node_recordsui["Record management<br/>[PeopleList.js]"]
  node_searchui["Advanced search<br/>[AdvancedSearch.js]"]
  node_relationshipmanager["Relationship manager"]
  node_relationshipdiagram["Relationship diagram"]
  node_globalmap["Global map<br/>[GlobalMap.js]"]
  node_reports["Reports<br/>[ReportGenerator.js]"]
end

subgraph group_backend["API and access"]
  node_server["HTTP server<br/>[server.js]"]
  node_authroutes["Authentication<br/>[auth.js]"]
  node_access["Project access control<br/>[projectAccess.js]"]
end

subgraph group_investigation["Investigation records"]
  node_people["People and travel<br/>[people.js]"]
  node_cases["Cases and tasks<br/>[cases.js]"]
  node_projects["Projects and membership<br/>[projects.js]"]
  node_businesses["Business intelligence<br/>[businesses.js]"]
  node_assets["Assets and properties<br/>[assets.js]"]
  node_transactions["Transactions and ledger<br/>[transactions.js]"]
  node_wallets["Crypto wallets<br/>[cryptoWallets.js]"]
  node_wireless["Wireless intelligence"]
end

subgraph group_analysis["Analysis and intelligence"]
  node_relationships["Entity relationships<br/>[relationships.js]"]
  node_search["Search service<br/>[search.js]"]
  node_geocoding["Geocoding service"]
end

subgraph group_platform["Persistence and integrations"]
  node_database[("PostgreSQL<br/>[database.js]")]
  node_geocodingproviders["Geocoding providers"]
end

node_investigator(("Investigator"))
node_externalgeocoder(("Geocoding providers"))

node_investigator -->|"uses"| node_app
node_app -->|"uses"| node_projectcontext
node_app -->|"renders"| node_recordsui
node_app -->|"imports"| node_apiclient
node_recordsui -.->|"requests data"| node_apiclient
node_searchui -->|"queries"| node_apiclient
node_relationshipmanager -->|"loads data"| node_apiclient
node_relationshipmanager -->|"renders"| node_relationshipdiagram
node_app -->|"presents"| node_globalmap
node_app -->|"presents"| node_reports
node_apiclient -.->|"HTTP requests"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_people
node_server -->|"mounts"| node_cases
node_server -->|"mounts"| node_projects
node_server -->|"mounts"| node_businesses
node_server -.->|"mounts"| node_assets
node_server -.->|"mounts"| node_transactions
node_server -.->|"mounts"| node_wallets
node_server -.->|"mounts"| node_wireless
node_server -->|"mounts"| node_relationships
node_server -.->|"mounts"| node_search
node_authroutes -->|"queries"| node_database
node_people -->|"checks scope"| node_access
node_search -->|"checks scope"| node_access
node_wireless -->|"checks scope"| node_access
node_access -->|"reads membership"| node_database
node_people -->|"reads and writes"| node_database
node_wireless -->|"reads and writes"| node_database
node_relationships -.->|"reads and writes"| node_database
node_geocoding -->|"uses provider config"| node_geocodingproviders
node_geocoding -->|"caches coordinates"| node_database
node_geocoding -.->|"geocodes addresses"| node_externalgeocoder

click node_app "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/App.js"
click node_projectcontext "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/contexts/ProjectContext.js"
click node_apiclient "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/utils/api.js"
click node_recordsui "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/PeopleList.js"
click node_searchui "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/AdvancedSearch.js"
click node_relationshipmanager "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/visualization/RelationshipManager.js"
click node_relationshipdiagram "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/RelationshipDiagram.js"
click node_globalmap "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/GlobalMap.js"
click node_reports "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/ReportGenerator.js"
click node_server "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/server.js"
click node_authroutes "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/auth.js"
click node_access "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/utils/projectAccess.js"
click node_people "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/people.js"
click node_cases "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/cases.js"
click node_projects "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/projects.js"
click node_businesses "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/businesses.js"
click node_assets "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/assets.js"
click node_transactions "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/transactions.js"
click node_wallets "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/cryptoWallets.js"
click node_wireless "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/wirelessNetworks.js"
click node_relationships "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/relationships.js"
click node_search "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/search.js"
click node_geocoding "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/services/improvedGeocodingService.js"
click node_database "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/config/database.js"
click node_geocodingproviders "https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/services/geocodingProviders.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_projectcontext,node_apiclient,node_recordsui,node_searchui,node_relationshipmanager,node_relationshipdiagram,node_globalmap,node_reports toneBlue
class node_server,node_authroutes,node_access toneAmber
class node_people,node_cases,node_projects,node_businesses,node_assets,node_transactions,node_wallets,node_wireless toneMint
class node_relationships,node_search,node_geocoding toneRose
class node_database,node_geocodingproviders,node_investigator,node_externalgeocoder toneIndigo
```

## Components

### Investigator interface

- [Application shell](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Project context](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/contexts/ProjectContext.js): `frontend/src/contexts/ProjectContext.js`
- [API client](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/utils/api.js): `frontend/src/utils/api.js`
- [Record management](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/PeopleList.js): `frontend/src/components/PeopleList.js`
- [Advanced search](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/AdvancedSearch.js): `frontend/src/components/AdvancedSearch.js`
- [Relationship manager](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/visualization/RelationshipManager.js): `frontend/src/components/visualization/RelationshipManager.js`
- [Relationship diagram](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/RelationshipDiagram.js): `frontend/src/components/RelationshipDiagram.js`
- [Global map](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/GlobalMap.js): `frontend/src/components/GlobalMap.js`
- [Reports](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/frontend/src/components/ReportGenerator.js): `frontend/src/components/ReportGenerator.js`

### API and access

- [HTTP server](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/server.js): `backend/server.js`
- [Authentication](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/auth.js): `backend/routes/auth.js`
- [Project access control](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/utils/projectAccess.js): `backend/utils/projectAccess.js`

### Investigation records

- [People and travel](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/people.js): `backend/routes/people.js`
- [Cases and tasks](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/cases.js): `backend/routes/cases.js`
- [Projects and membership](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/projects.js): `backend/routes/projects.js`
- [Business intelligence](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/businesses.js): `backend/routes/businesses.js`
- [Assets and properties](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/assets.js): `backend/routes/assets.js`
- [Transactions and ledger](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/transactions.js): `backend/routes/transactions.js`
- [Crypto wallets](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/cryptoWallets.js): `backend/routes/cryptoWallets.js`
- [Wireless intelligence](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/wirelessNetworks.js): `backend/routes/wirelessNetworks.js`

### Analysis and intelligence

- [Entity relationships](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/relationships.js): `backend/routes/relationships.js`
- [Search service](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/routes/search.js): `backend/routes/search.js`
- [Geocoding service](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/services/improvedGeocodingService.js): `backend/services/improvedGeocodingService.js`

### Persistence and integrations

- [PostgreSQL](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/config/database.js): `backend/config/database.js`
- [Geocoding providers](https://github.com/elm1nst3r/ghost-osint-crm/blob/main/backend/services/geocodingProviders.js): `backend/services/geocodingProviders.js`

### Other components

- **Investigator**
- **Geocoding providers**

## Connections

- Investigator → Application shell: uses (evidence: `frontend/src/App.js`)
- Application shell → Project context: uses (evidence: `frontend/src/App.js`)
- Application shell → Record management: renders (evidence: `frontend/src/App.js`)
- Application shell → API client: imports (evidence: `frontend/src/App.js`)
- Record management → API client: requests data
- Advanced search → API client: queries (evidence: `frontend/src/components/AdvancedSearch.js`)
- Relationship manager → API client: loads data (evidence: `frontend/src/components/visualization/RelationshipManager.js`)
- Relationship manager → Relationship diagram: renders (evidence: `frontend/src/components/visualization/RelationshipManager.js`)
- Application shell → Global map: presents (evidence: `frontend/src/App.js`)
- Application shell → Reports: presents (evidence: `frontend/src/App.js`)
- API client → HTTP server: HTTP requests
- HTTP server → Authentication: mounts (evidence: `backend/server.js`)
- HTTP server → People and travel: mounts (evidence: `backend/server.js`)
- HTTP server → Cases and tasks: mounts (evidence: `backend/server.js`)
- HTTP server → Projects and membership: mounts (evidence: `backend/server.js`)
- HTTP server → Business intelligence: mounts (evidence: `backend/server.js`)
- HTTP server → Assets and properties: mounts (evidence: `backend/server.js`)
- HTTP server → Transactions and ledger: mounts (evidence: `backend/server.js`)
- HTTP server → Crypto wallets: mounts (evidence: `backend/server.js`)
- HTTP server → Wireless intelligence: mounts (evidence: `backend/server.js`)
- HTTP server → Entity relationships: mounts (evidence: `backend/server.js`)
- HTTP server → Search service: mounts (evidence: `backend/server.js`)
- Authentication → PostgreSQL: queries (evidence: `backend/routes/auth.js`)
- People and travel → Project access control: checks scope (evidence: `backend/routes/people.js`)
- Search service → Project access control: checks scope (evidence: `backend/routes/search.js`)
- Wireless intelligence → Project access control: checks scope (evidence: `backend/routes/wirelessNetworks.js`)
- Project access control → PostgreSQL: reads membership (evidence: `backend/utils/projectAccess.js`)
- People and travel → PostgreSQL: reads and writes (evidence: `backend/routes/people.js`)
- Wireless intelligence → PostgreSQL: reads and writes (evidence: `backend/routes/wirelessNetworks.js`)
- Entity relationships → PostgreSQL: reads and writes
- Geocoding service → Geocoding providers: uses provider config (evidence: `backend/services/improvedGeocodingService.js`)
- Geocoding service → PostgreSQL: caches coordinates (evidence: `backend/services/improvedGeocodingService.js`)
- Geocoding service → Geocoding providers: geocodes addresses
