# objective-see/lulu architecture

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

- Interactive diagram: https://gitdiagram.com/objective-see/lulu
- Repository: https://github.com/objective-see/lulu

## Overview

LuLu is a macOS firewall. Its principal workflow is to observe a network-flow event, evaluate it against rules and policy, and present an alert when user action is needed; the user’s choice can then become a rule managed through the app. The tree also shows preferences, profiles, lists, onboarding, updates, and self-defense capabilities. Most implementation files are headers and were not sampled, so only the shown component responsibilities are represented; dashed links indicate unverified runtime wiring.

Main entry points: [`LuLu/Extension/Rules.h`](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Rules.h) (Rule evaluation), [`LuLu/Extension/FilterDataProvider.h`](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/FilterDataProvider.h) (Network flow filter), [`LuLu/Extension/main.h`](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/main.h) (Daemon startup), [`LuLu/App/RulesWindowController.h`](https://github.com/objective-see/lulu/blob/master/LuLu/App/RulesWindowController.h) (Rule management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["User application"]
  node_app["App coordination<br/>[AppDelegate.h]"]
  node_alerts["Flow alerts"]
  node_rulesui["Rule management"]
  node_addrule["Add or edit rule"]
  node_prefsui["Preferences and profiles"]
  node_welcome["Setup onboarding"]
  node_updateui["Update prompts"]
  node_appxpc["Daemon client<br/>[XPCDaemonClient.h]"]
end

subgraph group_daemon["Firewall daemon"]
  node_daemon["Daemon startup<br/>[main.h]"]
  node_filter["Network flow filter"]
  node_rules["Rule evaluation<br/>[Rules.h]"]
  node_process["Process inspection<br/>[procInfo.h]"]
  node_binary["Binary metadata<br/>[Binary.h]"]
  node_alertsdaemon["Alert dispatch<br/>[Alerts.h]"]
  node_userxpc["User alert client<br/>[XPCUserClient.h]"]
  node_xpc["Daemon XPC service<br/>[XPCListener.h]"]
  node_lists["Block and allow lists<br/>[BlockOrAllowList.h]"]
  node_gray["Gray list<br/>[GrayList.h]"]
  node_profiles["Profile policy<br/>[Profiles.h]"]
  node_preferences["Daemon preferences<br/>[Preferences.h]"]
  node_defense["Self defense<br/>[SelfDefense.h]"]
end

subgraph group_shared["Shared domain"]
  node_rulemodel["Rule model<br/>[Rule.h]"]
  node_constants["Shared configuration<br/>[consts.h]"]
  node_utilities["System utilities<br/>[utilities.h]"]
end

node_user(("Mac user"))
node_store[("Rules and preferences")]
node_network(("Network flow"))

node_network -.->|"signals flow"| node_filter
node_daemon -.->|"initializes"| node_filter
node_filter -.->|"checks policy"| node_rules
node_filter -.->|"inspects process"| node_process
node_process -.->|"builds metadata"| node_binary
node_rules -.->|"evaluates rules"| node_rulemodel
node_filter -.->|"requests alert"| node_alertsdaemon
node_alertsdaemon -.->|"dispatches alert"| node_userxpc
node_userxpc -.->|"delivers alert"| node_alerts
node_user -.->|"responds to prompt"| node_alerts
node_alerts -.->|"submits choice"| node_appxpc
node_app -.->|"uses daemon client"| node_appxpc
node_appxpc -.->|"communicates"| node_xpc
node_user -.->|"manages rules"| node_rulesui
node_rulesui -->|"opens editor"| node_addrule
node_user -.->|"configures firewall"| node_prefsui
node_user -.->|"completes setup"| node_welcome
node_user -.->|"reviews update"| node_updateui
node_rules -.->|"consults lists"| node_lists
node_rules -.->|"consults gray list"| node_gray
node_rules -.->|"uses profile policy"| node_profiles
node_daemon -.->|"loads preferences"| node_preferences
node_daemon -.->|"manages protection"| node_defense
node_rulesui -->|"displays rules"| node_rulemodel
node_rules -.->|"persists policy"| node_store
node_preferences -.->|"persists settings"| node_store

click node_app "https://github.com/objective-see/lulu/blob/master/LuLu/App/AppDelegate.h"
click node_alerts "https://github.com/objective-see/lulu/blob/master/LuLu/App/AlertWindowController.h"
click node_rulesui "https://github.com/objective-see/lulu/blob/master/LuLu/App/RulesWindowController.h"
click node_addrule "https://github.com/objective-see/lulu/blob/master/LuLu/App/AddRuleWindowController.h"
click node_prefsui "https://github.com/objective-see/lulu/blob/master/LuLu/App/PrefsWindowController.h"
click node_welcome "https://github.com/objective-see/lulu/blob/master/LuLu/App/WelcomeWindowController.h"
click node_updateui "https://github.com/objective-see/lulu/blob/master/LuLu/App/UpdateWindowController.h"
click node_appxpc "https://github.com/objective-see/lulu/blob/master/LuLu/App/XPCDaemonClient.h"
click node_daemon "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/main.h"
click node_filter "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/FilterDataProvider.h"
click node_rules "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Rules.h"
click node_process "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/procInfo.h"
click node_binary "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Binary.h"
click node_alertsdaemon "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Alerts.h"
click node_userxpc "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/XPCUserClient.h"
click node_xpc "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/XPCListener.h"
click node_lists "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/BlockOrAllowList.h"
click node_gray "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/GrayList.h"
click node_profiles "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Profiles.h"
click node_preferences "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Preferences.h"
click node_defense "https://github.com/objective-see/lulu/blob/master/LuLu/Extension/SelfDefense.h"
click node_rulemodel "https://github.com/objective-see/lulu/blob/master/LuLu/Shared/Rule.h"
click node_constants "https://github.com/objective-see/lulu/blob/master/LuLu/Shared/consts.h"
click node_utilities "https://github.com/objective-see/lulu/blob/master/LuLu/Shared/utilities.h"

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_alerts,node_rulesui,node_addrule,node_prefsui,node_welcome,node_updateui,node_appxpc,node_user toneBlue
class node_daemon,node_filter,node_rules,node_process,node_binary,node_alertsdaemon,node_userxpc,node_xpc,node_lists,node_gray,node_profiles,node_preferences,node_defense,node_store toneAmber
class node_rulemodel,node_constants,node_utilities toneMint
class node_network toneIndigo
```

## Components

### User application

- [App coordination](https://github.com/objective-see/lulu/blob/master/LuLu/App/AppDelegate.h): `LuLu/App/AppDelegate.h`
- [Flow alerts](https://github.com/objective-see/lulu/blob/master/LuLu/App/AlertWindowController.h): `LuLu/App/AlertWindowController.h`
- [Rule management](https://github.com/objective-see/lulu/blob/master/LuLu/App/RulesWindowController.h): `LuLu/App/RulesWindowController.h`
- [Add or edit rule](https://github.com/objective-see/lulu/blob/master/LuLu/App/AddRuleWindowController.h): `LuLu/App/AddRuleWindowController.h`
- [Preferences and profiles](https://github.com/objective-see/lulu/blob/master/LuLu/App/PrefsWindowController.h): `LuLu/App/PrefsWindowController.h`
- [Setup onboarding](https://github.com/objective-see/lulu/blob/master/LuLu/App/WelcomeWindowController.h): `LuLu/App/WelcomeWindowController.h`
- [Update prompts](https://github.com/objective-see/lulu/blob/master/LuLu/App/UpdateWindowController.h): `LuLu/App/UpdateWindowController.h`
- [Daemon client](https://github.com/objective-see/lulu/blob/master/LuLu/App/XPCDaemonClient.h): `LuLu/App/XPCDaemonClient.h`

### Firewall daemon

- [Daemon startup](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/main.h): `LuLu/Extension/main.h`
- [Network flow filter](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/FilterDataProvider.h): `LuLu/Extension/FilterDataProvider.h`
- [Rule evaluation](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Rules.h): `LuLu/Extension/Rules.h`
- [Process inspection](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/procInfo.h): `LuLu/Extension/procInfo.h`
- [Binary metadata](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Binary.h): `LuLu/Extension/Binary.h`
- [Alert dispatch](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Alerts.h): `LuLu/Extension/Alerts.h`
- [User alert client](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/XPCUserClient.h): `LuLu/Extension/XPCUserClient.h`
- [Daemon XPC service](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/XPCListener.h): `LuLu/Extension/XPCListener.h`
- [Block and allow lists](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/BlockOrAllowList.h): `LuLu/Extension/BlockOrAllowList.h`
- [Gray list](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/GrayList.h): `LuLu/Extension/GrayList.h`
- [Profile policy](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Profiles.h): `LuLu/Extension/Profiles.h`
- [Daemon preferences](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/Preferences.h): `LuLu/Extension/Preferences.h`
- [Self defense](https://github.com/objective-see/lulu/blob/master/LuLu/Extension/SelfDefense.h): `LuLu/Extension/SelfDefense.h`

### Shared domain

- [Rule model](https://github.com/objective-see/lulu/blob/master/LuLu/Shared/Rule.h): `LuLu/Shared/Rule.h`
- [Shared configuration](https://github.com/objective-see/lulu/blob/master/LuLu/Shared/consts.h): `LuLu/Shared/consts.h`
- [System utilities](https://github.com/objective-see/lulu/blob/master/LuLu/Shared/utilities.h): `LuLu/Shared/utilities.h`

### Other components

- **Mac user**
- **Rules and preferences**
- **Network flow**

## Connections

- Network flow → Network flow filter: signals flow
- Daemon startup → Network flow filter: initializes
- Network flow filter → Rule evaluation: checks policy
- Network flow filter → Process inspection: inspects process
- Process inspection → Binary metadata: builds metadata
- Rule evaluation → Rule model: evaluates rules
- Network flow filter → Alert dispatch: requests alert
- Alert dispatch → User alert client: dispatches alert
- User alert client → Flow alerts: delivers alert
- Mac user → Flow alerts: responds to prompt
- Flow alerts → Daemon client: submits choice
- App coordination → Daemon client: uses daemon client
- Daemon client → Daemon XPC service: communicates
- Mac user → Rule management: manages rules
- Rule management → Add or edit rule: opens editor (evidence: `LuLu/App/RulesWindowController.h`)
- Mac user → Preferences and profiles: configures firewall
- Mac user → Setup onboarding: completes setup
- Mac user → Update prompts: reviews update
- Rule evaluation → Block and allow lists: consults lists
- Rule evaluation → Gray list: consults gray list
- Rule evaluation → Profile policy: uses profile policy
- Daemon startup → Daemon preferences: loads preferences
- Daemon startup → Self defense: manages protection
- Rule management → Rule model: displays rules (evidence: `LuLu/App/RulesWindowController.h`)
- Rule evaluation → Rules and preferences: persists policy
- Daemon preferences → Rules and preferences: persists settings
