# ghostmanager/ghostwriter architecture

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

- Interactive diagram: https://gitdiagram.com/ghostmanager/ghostwriter
- Repository: https://github.com/ghostmanager/ghostwriter

## Overview

Ghostwriter is a red-team assessment management and reporting platform. Users organize clients and projects, track infrastructure and assessment activity, curate findings and evidence, then author reports and export deliverables. The repository also documents collaborative editing, GraphQL integration, authentication controls, and integrations for automatic activity logging. The map emphasizes these product stages; several subsystem links are documented rather than verified from source excerpts, so those edges are dashed where implementation wiring was not shown.

Main entry points: [`ghostwriter/reporting/models.py`](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/models.py) (Reports and Evidence), [`ghostwriter/shepherd/models.py`](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/shepherd/models.py) (Infrastructure Assets), [`ghostwriter/rolodex/models.py`](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/rolodex/models.py) (Clients and Projects), [`ghostwriter/reporting/views2/report.py`](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/views2/report.py) (Report Workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_work["Assessment Management"]
  node_clients[("Clients and Projects<br/>[models.py]")]
  node_findings[("Findings Library<br/>[models.py]")]
end

subgraph group_intel["Infrastructure and Activity"]
  node_infra[("Infrastructure Assets<br/>[models.py]")]
  node_domain_review["Domain Review<br/>[review.py]"]
  node_monitoring["Asset Monitoring<br/>[cloud_monitors.py]"]
  node_activity[("Activity Logging<br/>[models.py]")]
end

subgraph group_report["Reporting and Editing"]
  node_reports[("Reports and Evidence<br/>[models.py]")]
  node_report_views["Report Workflows<br/>[report.py]"]
  node_export["Report Exporters"]
  node_templates[("Report Templates<br/>[models.py]")]
  node_collab_ui["Collaborative Editors"]
  node_collab_server["Collaboration Server"]
end

subgraph group_platform["Platform Services"]
  node_api["GraphQL API<br/>[views.py]"]
  node_accounts[("Accounts and Access<br/>[models.py]")]
  node_configuration[("Platform Configuration<br/>[models.py]")]
end

node_user(("Team Members"))
node_external_security_tools{{"Security Tools"}}

node_user -.->|"manages"| node_clients
node_clients -.->|"organizes assessments"| node_infra
node_user -.->|"tracks assets"| node_infra
node_infra -.->|"reviewed by"| node_domain_review
node_infra -.->|"monitored by"| node_monitoring
node_external_security_tools -.->|"sends activity"| node_activity
node_user -.->|"records activity"| node_activity
node_clients -.->|"supports reports"| node_reports
node_findings -.->|"included in"| node_reports
node_user -.->|"authors"| node_report_views
node_report_views -.->|"manages"| node_reports
node_reports -->|"exports through"| node_export
node_templates -.->|"configures output"| node_export
node_user -.->|"edits collaboratively"| node_collab_ui
node_collab_ui -.->|"syncs edits"| node_collab_server
node_user -.->|"integrates through"| node_api
node_api -.->|"exposes workflows"| node_reports
node_user -.->|"authenticates"| node_accounts
node_configuration -.->|"configures integrations"| node_external_security_tools

click node_clients "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/rolodex/models.py"
click node_findings "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/models.py"
click node_infra "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/shepherd/models.py"
click node_domain_review "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/modules/review.py"
click node_monitoring "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/modules/cloud_monitors.py"
click node_activity "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/oplog/models.py"
click node_reports "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/models.py"
click node_report_views "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/views2/report.py"
click node_export "https://github.com/ghostmanager/ghostwriter/tree/master/ghostwriter/modules/reportwriter"
click node_templates "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/commandcenter/models.py"
click node_collab_ui "https://github.com/ghostmanager/ghostwriter/tree/master/javascript/src/frontend/collab_forms"
click node_collab_server "https://github.com/ghostmanager/ghostwriter/tree/master/javascript/src/collab_server"
click node_api "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/api/views.py"
click node_accounts "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/users/models.py"
click node_configuration "https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/commandcenter/models.py"

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_clients,node_findings toneBlue
class node_infra,node_domain_review,node_monitoring,node_activity toneAmber
class node_reports,node_report_views,node_export,node_templates,node_collab_ui,node_collab_server toneMint
class node_api,node_accounts,node_configuration toneRose
class node_user,node_external_security_tools toneIndigo
```

## Components

### Assessment Management

- [Clients and Projects](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/rolodex/models.py): `ghostwriter/rolodex/models.py`
- [Findings Library](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/models.py): `ghostwriter/reporting/models.py`

### Infrastructure and Activity

- [Infrastructure Assets](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/shepherd/models.py): `ghostwriter/shepherd/models.py`
- [Domain Review](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/modules/review.py): `ghostwriter/modules/review.py`
- [Asset Monitoring](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/modules/cloud_monitors.py): `ghostwriter/modules/cloud_monitors.py`
- [Activity Logging](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/oplog/models.py): `ghostwriter/oplog/models.py`

### Reporting and Editing

- [Reports and Evidence](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/models.py): `ghostwriter/reporting/models.py`
- [Report Workflows](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/reporting/views2/report.py): `ghostwriter/reporting/views2/report.py`
- [Report Exporters](https://github.com/ghostmanager/ghostwriter/tree/master/ghostwriter/modules/reportwriter): `ghostwriter/modules/reportwriter`
- [Report Templates](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/commandcenter/models.py): `ghostwriter/commandcenter/models.py`
- [Collaborative Editors](https://github.com/ghostmanager/ghostwriter/tree/master/javascript/src/frontend/collab_forms): `javascript/src/frontend/collab_forms`
- [Collaboration Server](https://github.com/ghostmanager/ghostwriter/tree/master/javascript/src/collab_server): `javascript/src/collab_server`

### Platform Services

- [GraphQL API](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/api/views.py): `ghostwriter/api/views.py`
- [Accounts and Access](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/users/models.py): `ghostwriter/users/models.py`
- [Platform Configuration](https://github.com/ghostmanager/ghostwriter/blob/master/ghostwriter/commandcenter/models.py): `ghostwriter/commandcenter/models.py`

### Other components

- **Team Members**
- **Security Tools**

## Connections

- Team Members → Clients and Projects: manages
- Clients and Projects → Infrastructure Assets: organizes assessments
- Team Members → Infrastructure Assets: tracks assets
- Infrastructure Assets → Domain Review: reviewed by (evidence: `ghostwriter/shepherd/tasks.py`)
- Infrastructure Assets → Asset Monitoring: monitored by (evidence: `ghostwriter/shepherd/tasks.py`)
- Security Tools → Activity Logging: sends activity
- Team Members → Activity Logging: records activity
- Clients and Projects → Reports and Evidence: supports reports (evidence: `ghostwriter/reporting/models.py`)
- Findings Library → Reports and Evidence: included in (evidence: `ghostwriter/reporting/models.py`)
- Team Members → Report Workflows: authors
- Report Workflows → Reports and Evidence: manages
- Reports and Evidence → Report Exporters: exports through (evidence: `ghostwriter/reporting/models.py`)
- Report Templates → Report Exporters: configures output (evidence: `ghostwriter/commandcenter/models.py`)
- Team Members → Collaborative Editors: edits collaboratively
- Collaborative Editors → Collaboration Server: syncs edits
- Team Members → GraphQL API: integrates through
- GraphQL API → Reports and Evidence: exposes workflows
- Team Members → Accounts and Access: authenticates
- Platform Configuration → Security Tools: configures integrations
