# mark-alexander-hub/vignette architecture

> Architecture diagram of the GitHub repository mark-alexander-hub/vignette, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mark-alexander-hub/vignette
- Repository: https://github.com/mark-alexander-hub/vignette

## Overview

Vignette is an OSINT intelligence platform: an investigator submits a single or bulk identity, network, or domain query, and the API gathers source data, builds a profile, and stores search results for display and later use. The documented product also includes relationship discovery, AI briefings and chat, printable reports, saved profiles, watchlist rechecks, replay, history, and analytics. The sampled controller confirms orchestration, profile processing, relationship mapping, and persistence; some feature wiring is documented but not visible in the excerpts.

Main entry points: [`api/SearchController.php`](https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php) (Search controller), [`api/index.php`](https://github.com/mark-alexander-hub/vignette/blob/main/api/index.php) (API router), [`frontend/js/app.js`](https://github.com/mark-alexander-hub/vignette/blob/main/frontend/js/app.js) (Search interface), [`api/ChatController.php`](https://github.com/mark-alexander-hub/vignette/blob/main/api/ChatController.php) (Intelligence chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_search_ui["Search interface<br/>[app.js]"]
  node_dashboard_ui["Dashboard<br/>[dashboard.php]"]
  node_web_entry["Search page<br/>[index.php]"]
  node_api_router["API router<br/>[index.php]"]
end

subgraph group_investigation["Intelligence gathering"]
  node_search_controller["Search controller"]
  node_orchestrator["Query dispatcher<br/>[orchestrator.php]"]
  node_source_modules["OSINT modules"]
  node_aggregator["Result aggregation<br/>[aggregator.php]"]
  node_profiler["Profile builder<br/>[profiler.php]"]
  node_relationships["Relationship mapper<br/>[relationships.php]"]
end

subgraph group_state["Search state"]
  node_database_api["Database access<br/>[Database.php]"]
  node_database[("Platform database<br/>[schema.sql]")]
  node_history_features["History and replay"]
  node_saved_profiles["Saved profiles"]
  node_watchlist["Watchlist monitoring"]
  node_analytics["Dashboard analytics"]
end

subgraph group_enrichment["Analysis and reports"]
  node_gemini["AI briefing<br/>[gemini.php]"]
  node_chat_controller["Intelligence chat<br/>[ChatController.php]"]
  node_report_export["Report export<br/>[export.php]"]
  node_intelligence_report["Intelligence report<br/>[report.php]"]
end

node_investigator(("Investigator"))
node_external_sources{{"External data sources"}}
node_ai_worker{{"AI worker"}}

node_investigator -->|"submits query"| node_search_ui
node_search_ui -->|"uses page"| node_web_entry
node_search_ui -->|"requests search"| node_api_router
node_dashboard_ui -->|"requests features"| node_api_router
node_api_router -->|"dispatches routes"| node_search_controller
node_search_controller -->|"dispatches query"| node_orchestrator
node_orchestrator -->|"runs lookups"| node_source_modules
node_source_modules -->|"queries providers"| node_external_sources
node_search_controller -->|"aggregates results"| node_aggregator
node_search_controller -->|"builds profile"| node_profiler
node_search_controller -->|"finds connections"| node_relationships
node_search_controller -->|"stores search"| node_database_api
node_database_api -->|"reads and writes"| node_database
node_search_controller -->|"serves history"| node_history_features
node_search_controller -->|"manages profiles"| node_saved_profiles
node_search_controller -->|"manages rechecks"| node_watchlist
node_search_controller -->|"computes analytics"| node_analytics
node_search_ui -->|"renders results"| node_search_controller
node_search_controller -.->|"AI briefing"| node_gemini
node_api_router -->|"dispatches chat"| node_chat_controller
node_chat_controller -->|"reads context"| node_database_api
node_chat_controller -->|"sends chat"| node_ai_worker
node_chat_controller -->|"stores conversation"| node_database_api
node_api_router -->|"serves export"| node_report_export
node_api_router -->|"serves report"| node_intelligence_report

click node_search_ui "https://github.com/mark-alexander-hub/vignette/blob/main/frontend/js/app.js"
click node_dashboard_ui "https://github.com/mark-alexander-hub/vignette/blob/main/dashboard.php"
click node_web_entry "https://github.com/mark-alexander-hub/vignette/blob/main/index.php"
click node_api_router "https://github.com/mark-alexander-hub/vignette/blob/main/api/index.php"
click node_search_controller "https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php"
click node_orchestrator "https://github.com/mark-alexander-hub/vignette/blob/main/core/orchestrator.php"
click node_source_modules "https://github.com/mark-alexander-hub/vignette/tree/main/modules"
click node_aggregator "https://github.com/mark-alexander-hub/vignette/blob/main/core/aggregator.php"
click node_profiler "https://github.com/mark-alexander-hub/vignette/blob/main/core/profiler.php"
click node_relationships "https://github.com/mark-alexander-hub/vignette/blob/main/core/relationships.php"
click node_database_api "https://github.com/mark-alexander-hub/vignette/blob/main/api/Database.php"
click node_database "https://github.com/mark-alexander-hub/vignette/blob/main/database/schema.sql"
click node_history_features "https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php"
click node_saved_profiles "https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php"
click node_watchlist "https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php"
click node_analytics "https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php"
click node_gemini "https://github.com/mark-alexander-hub/vignette/blob/main/modules/gemini.php"
click node_chat_controller "https://github.com/mark-alexander-hub/vignette/blob/main/api/ChatController.php"
click node_report_export "https://github.com/mark-alexander-hub/vignette/blob/main/api/export.php"
click node_intelligence_report "https://github.com/mark-alexander-hub/vignette/blob/main/api/intelligence/report.php"

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_search_ui,node_dashboard_ui,node_web_entry,node_api_router toneBlue
class node_search_controller,node_orchestrator,node_source_modules,node_aggregator,node_profiler,node_relationships toneAmber
class node_database_api,node_database,node_history_features,node_saved_profiles,node_watchlist,node_analytics toneMint
class node_gemini,node_chat_controller,node_report_export,node_intelligence_report,node_ai_worker toneRose
class node_investigator,node_external_sources toneIndigo
```

## Components

### User interaction

- [Search interface](https://github.com/mark-alexander-hub/vignette/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Dashboard](https://github.com/mark-alexander-hub/vignette/blob/main/dashboard.php): `dashboard.php`
- [Search page](https://github.com/mark-alexander-hub/vignette/blob/main/index.php): `index.php`
- [API router](https://github.com/mark-alexander-hub/vignette/blob/main/api/index.php): `api/index.php`

### Intelligence gathering

- [Search controller](https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php): `api/SearchController.php`
- [Query dispatcher](https://github.com/mark-alexander-hub/vignette/blob/main/core/orchestrator.php): `core/orchestrator.php`
- [OSINT modules](https://github.com/mark-alexander-hub/vignette/tree/main/modules): `modules`
- [Result aggregation](https://github.com/mark-alexander-hub/vignette/blob/main/core/aggregator.php): `core/aggregator.php`
- [Profile builder](https://github.com/mark-alexander-hub/vignette/blob/main/core/profiler.php): `core/profiler.php`
- [Relationship mapper](https://github.com/mark-alexander-hub/vignette/blob/main/core/relationships.php): `core/relationships.php`

### Search state

- [Database access](https://github.com/mark-alexander-hub/vignette/blob/main/api/Database.php): `api/Database.php`
- [Platform database](https://github.com/mark-alexander-hub/vignette/blob/main/database/schema.sql): `database/schema.sql`
- [History and replay](https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php): `api/SearchController.php`
- [Saved profiles](https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php): `api/SearchController.php`
- [Watchlist monitoring](https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php): `api/SearchController.php`
- [Dashboard analytics](https://github.com/mark-alexander-hub/vignette/blob/main/api/SearchController.php): `api/SearchController.php`

### Analysis and reports

- [AI briefing](https://github.com/mark-alexander-hub/vignette/blob/main/modules/gemini.php): `modules/gemini.php`
- [Intelligence chat](https://github.com/mark-alexander-hub/vignette/blob/main/api/ChatController.php): `api/ChatController.php`
- [Report export](https://github.com/mark-alexander-hub/vignette/blob/main/api/export.php): `api/export.php`
- [Intelligence report](https://github.com/mark-alexander-hub/vignette/blob/main/api/intelligence/report.php): `api/intelligence/report.php`

### Other components

- **Investigator**
- **External data sources**
- **AI worker**

## Connections

- Investigator → Search interface: submits query
- Search interface → Search page: uses page
- Search interface → API router: requests search
- Dashboard → API router: requests features
- API router → Search controller: dispatches routes
- Search controller → Query dispatcher: dispatches query
- Query dispatcher → OSINT modules: runs lookups
- OSINT modules → External data sources: queries providers
- Search controller → Result aggregation: aggregates results
- Search controller → Profile builder: builds profile
- Search controller → Relationship mapper: finds connections
- Search controller → Database access: stores search
- Database access → Platform database: reads and writes
- Search controller → History and replay: serves history
- Search controller → Saved profiles: manages profiles
- Search controller → Watchlist monitoring: manages rechecks
- Search controller → Dashboard analytics: computes analytics
- Search interface → Search controller: renders results
- Search controller → AI briefing: AI briefing
- API router → Intelligence chat: dispatches chat
- Intelligence chat → Database access: reads context
- Intelligence chat → AI worker: sends chat
- Intelligence chat → Database access: stores conversation
- API router → Report export: serves export
- API router → Intelligence report: serves report
