# modzie/claudia architecture

> Architecture diagram of the GitHub repository modzie/claudia, 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/modzie/claudia
- Repository: https://github.com/modzie/claudia

## Overview

ClaudIA creates a synthetic Microsoft 365 lab whose personas generate realistic collaboration, AI, and security activity; that telemetry is analyzed and presented through the Activity Story Map. Users can also operate lab tasks through the Teams bot or browser agents. The README documents the platform’s major capabilities, while sampled source confirms selected bot, browser-agent, and story-map internals. Several deployment and security-control relationships below are README-level, not verified from their implementation; those edges cite the README.

Main entry points: [`activity-story-map/web/app.js`](https://github.com/modzie/claudia/blob/main/activity-story-map/web/app.js) (Activity Story Map), [`activity-story-map/api/ActivityGraph/index.js`](https://github.com/modzie/claudia/blob/main/activity-story-map/api/ActivityGraph/index.js) (Activity Graph API), [`config/agents.json`](https://github.com/modzie/claudia/blob/main/config/agents.json) (Synthetic personas), [`BrowserAgents`](https://github.com/modzie/claudia/tree/main/BrowserAgents) (Browser agents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lab["Lab foundation"]
  node_installer["Lab deployment"]
  node_tenant["Microsoft 365 tenant"]
  node_security_controls["Security scenarios<br/>[Configure-DLP.ps1]"]
end

subgraph group_simulation["Activity simulation"]
  node_personas["Synthetic personas<br/>[agents.json]"]
  node_scenario["Storyline scenarios"]
  node_content["Synthetic content pack"]
  node_browser["Browser agents"]
  node_persona_context["Persona context<br/>[personaContext.js]"]
  node_m365_activity["M365 activity"]
end

subgraph group_telemetry["Telemetry and analysis"]
  node_adx[("Azure Data Explorer")]
  node_telemetry_tools["Telemetry operations"]
  node_graph_api["Activity Graph API<br/>[index.js]"]
end

subgraph group_experience["User experiences"]
  node_story_map["Activity Story Map<br/>[app.js]"]
  node_visit_counter["Portal visit counter<br/>[index.js]"]
  node_teams_bot["Teams bot<br/>[claudiaBot.js]"]
  node_commands["Bot commands<br/>[commands.js]"]
  node_powershell["PowerShell runner<br/>[powershell.js]"]
  node_internal_ai["AI workbench<br/>[portal.js]"]
end

node_engineer(("Lab operator"))
node_teams_user(("Teams user"))

node_engineer -->|"deploys lab"| node_installer
node_installer -->|"provisions"| node_tenant
node_tenant -->|"hosts personas"| node_personas
node_personas -->|"guides behavior"| node_scenario
node_scenario -->|"uses scenarios"| node_content
node_browser -->|"loads context"| node_persona_context
node_persona_context -.->|"reads config"| node_personas
node_browser -->|"simulates workflows"| node_m365_activity
node_content -->|"supplies content"| node_m365_activity
node_tenant -->|"hosts activity"| node_m365_activity
node_m365_activity -->|"triggers signals"| node_security_controls
node_m365_activity -->|"emits telemetry"| node_adx
node_security_controls -->|"produces signals"| node_adx
node_telemetry_tools -->|"operates telemetry"| node_adx
node_graph_api -->|"queries events"| node_adx
node_story_map -.->|"requests activity"| node_graph_api
node_graph_api -->|"returns graph"| node_story_map
node_engineer -->|"explores activity"| node_story_map
node_teams_user -->|"sends commands"| node_teams_bot
node_teams_bot -->|"dispatches text"| node_commands
node_commands -->|"runs scripts"| node_powershell
node_powershell -.->|"operates lab"| node_tenant
node_engineer -->|"tries AI scenarios"| node_internal_ai
node_story_map -.->|"records visits"| node_visit_counter

click node_installer "https://github.com/modzie/claudia/tree/main/modules"
click node_personas "https://github.com/modzie/claudia/blob/main/config/agents.json"
click node_scenario "https://github.com/modzie/claudia/tree/main/Storyline"
click node_content "https://github.com/modzie/claudia/tree/main/synthetic-m365-purview-pack"
click node_browser "https://github.com/modzie/claudia/tree/main/BrowserAgents"
click node_persona_context "https://github.com/modzie/claudia/blob/main/BrowserAgents/lib/personaContext.js"
click node_security_controls "https://github.com/modzie/claudia/blob/main/modules/Configure-DLP.ps1"
click node_telemetry_tools "https://github.com/modzie/claudia/tree/main/tools"
click node_graph_api "https://github.com/modzie/claudia/blob/main/activity-story-map/api/ActivityGraph/index.js"
click node_story_map "https://github.com/modzie/claudia/blob/main/activity-story-map/web/app.js"
click node_visit_counter "https://github.com/modzie/claudia/blob/main/activity-story-map/api/VisitCounter/index.js"
click node_teams_bot "https://github.com/modzie/claudia/blob/main/TeamsBot/src/claudiaBot.js"
click node_commands "https://github.com/modzie/claudia/blob/main/TeamsBot/src/commands.js"
click node_powershell "https://github.com/modzie/claudia/blob/main/TeamsBot/src/powershell.js"
click node_internal_ai "https://github.com/modzie/claudia/blob/main/activity-story-map/web/internal-ai/portal.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_installer,node_tenant,node_security_controls,node_teams_user toneBlue
class node_personas,node_scenario,node_content,node_browser,node_persona_context,node_m365_activity toneAmber
class node_adx,node_telemetry_tools,node_graph_api toneMint
class node_story_map,node_visit_counter,node_teams_bot,node_commands,node_powershell,node_internal_ai toneRose
class node_engineer toneIndigo
```

## Components

### Lab foundation

- [Lab deployment](https://github.com/modzie/claudia/tree/main/modules): `modules`
- **Microsoft 365 tenant**
- [Security scenarios](https://github.com/modzie/claudia/blob/main/modules/Configure-DLP.ps1): `modules/Configure-DLP.ps1`

### Activity simulation

- [Synthetic personas](https://github.com/modzie/claudia/blob/main/config/agents.json): `config/agents.json`
- [Storyline scenarios](https://github.com/modzie/claudia/tree/main/Storyline): `Storyline`
- [Synthetic content pack](https://github.com/modzie/claudia/tree/main/synthetic-m365-purview-pack): `synthetic-m365-purview-pack`
- [Browser agents](https://github.com/modzie/claudia/tree/main/BrowserAgents): `BrowserAgents`
- [Persona context](https://github.com/modzie/claudia/blob/main/BrowserAgents/lib/personaContext.js): `BrowserAgents/lib/personaContext.js`
- **M365 activity**

### Telemetry and analysis

- **Azure Data Explorer**
- [Telemetry operations](https://github.com/modzie/claudia/tree/main/tools): `tools`
- [Activity Graph API](https://github.com/modzie/claudia/blob/main/activity-story-map/api/ActivityGraph/index.js): `activity-story-map/api/ActivityGraph/index.js`

### User experiences

- [Activity Story Map](https://github.com/modzie/claudia/blob/main/activity-story-map/web/app.js): `activity-story-map/web/app.js`
- [Portal visit counter](https://github.com/modzie/claudia/blob/main/activity-story-map/api/VisitCounter/index.js): `activity-story-map/api/VisitCounter/index.js`
- [Teams bot](https://github.com/modzie/claudia/blob/main/TeamsBot/src/claudiaBot.js): `TeamsBot/src/claudiaBot.js`
- [Bot commands](https://github.com/modzie/claudia/blob/main/TeamsBot/src/commands.js): `TeamsBot/src/commands.js`
- [PowerShell runner](https://github.com/modzie/claudia/blob/main/TeamsBot/src/powershell.js): `TeamsBot/src/powershell.js`
- [AI workbench](https://github.com/modzie/claudia/blob/main/activity-story-map/web/internal-ai/portal.js): `activity-story-map/web/internal-ai/portal.js`

### Other components

- **Lab operator**
- **Teams user**

## Connections

- Lab operator → Lab deployment: deploys lab (evidence: `README.md`)
- Lab deployment → Microsoft 365 tenant: provisions (evidence: `README.md`)
- Microsoft 365 tenant → Synthetic personas: hosts personas (evidence: `README.md`)
- Synthetic personas → Storyline scenarios: guides behavior (evidence: `README.md`)
- Storyline scenarios → Synthetic content pack: uses scenarios (evidence: `README.md`)
- Browser agents → Persona context: loads context (evidence: `BrowserAgents/scripts/status-report.js`)
- Persona context → Synthetic personas: reads config
- Browser agents → M365 activity: simulates workflows (evidence: `README.md`)
- Synthetic content pack → M365 activity: supplies content (evidence: `README.md`)
- Microsoft 365 tenant → M365 activity: hosts activity (evidence: `README.md`)
- M365 activity → Security scenarios: triggers signals (evidence: `README.md`)
- M365 activity → Azure Data Explorer: emits telemetry (evidence: `README.md`)
- Security scenarios → Azure Data Explorer: produces signals (evidence: `README.md`)
- Telemetry operations → Azure Data Explorer: operates telemetry (evidence: `README.md`)
- Activity Graph API → Azure Data Explorer: queries events (evidence: `activity-story-map/api/ActivityGraph/index.js`)
- Activity Story Map → Activity Graph API: requests activity
- Activity Graph API → Activity Story Map: returns graph (evidence: `README.md`)
- Lab operator → Activity Story Map: explores activity (evidence: `README.md`)
- Teams user → Teams bot: sends commands (evidence: `TeamsBot/src/claudiaBot.js`)
- Teams bot → Bot commands: dispatches text (evidence: `TeamsBot/src/claudiaBot.js`)
- Bot commands → PowerShell runner: runs scripts (evidence: `TeamsBot/src/commands.js`)
- PowerShell runner → Microsoft 365 tenant: operates lab
- Lab operator → AI workbench: tries AI scenarios (evidence: `README.md`)
- Activity Story Map → Portal visit counter: records visits
