# intuitem/ciso-assistant-community architecture

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

- Interactive diagram: https://gitdiagram.com/intuitem/ciso-assistant-community
- Repository: https://github.com/intuitem/ciso-assistant-community

## Overview

#### Purpose and entry points
CISO Assistant is an API-first cybersecurity GRC platform: it manages reusable controls, compliance assessments, risks, evidence, remediation, third parties, privacy, and reporting. The primary server entry points are the Django project at `backend/manage.py`, `backend/ciso_assistant/urls.py`, and ASGI/WSGI modules in `backend/ciso_assistant/asgi.py` and `backend/ciso_assistant/wsgi.py`. The user-facing application is a SvelteKit frontend rooted at `frontend/src/routes/+layout.svelte`, with the authenticated app under `frontend/src/routes/(app)`.

#### Delivery topology and runtimes
The core runtime is Python/Django behind Gunicorn, plus a Node/SvelteKit SSR frontend. Huey executes asynchronous/background tasks, including notifications, integrations, and domain work. Docker Compose is the standard local/self-hosted deployment path (`docker-compose.yml`, `backend/startup.sh`); generated deployment variants live in `config/templates`. Kubernetes is supported through Helm (`charts/ciso-assistant-next/templates/backend/deployment.yaml`, `charts/ciso-assistant-next/templates/frontend/deployment.yaml`). Caddy is the default reverse-proxy/TLS boundary (`Caddyfile`, `frontend/Caddyfile`).

Persistent data uses SQLite by default or PostgreSQL in production; attachments can remain filesystem-backed or use S3-compatible/AWS S3 or Azure Blob storage. The database schema is Django-model/migration driven.

#### Core GRC domain and API boundary
`backend/core/models.py` is the central domain model for assets, perimeters, controls, evidence, assessments, risks, findings, incidents, tasks, and related shared concepts. `backend/core/views.py`, `backend/core/serializers.py`, and `backend/core/urls.py` expose the main REST surface. The frontend’s generic model routes proxy/render these resources through `frontend/src/routes/(app)/(internal)/[model=urlmodel]`.

A defining design principle is separation of reusable control implementation from framework-specific compliance assessment. Assessment results, applied controls, evidence, risk scenarios, and action plans can therefore be related across scopes rather than duplicated. Mapping logic is a dedicated cross-framework boundary in `backend/core/mappings/engine.py` and `backend/core/mappings/merge.py`.

#### Libraries, frameworks, and assessment lifecycle
Versioned YAML libraries provide frameworks, control catalogs, threat catalogs, mappings, risk matrices, presets, quick forms, and workflow templates under `backend/library/libraries`. The library subsystem parses/builds/stores these artifacts and exposes import/load operations through `backend/library/builder.py`, `backend/library/models.py`, and `backend/library/views.py`.

Libraries instantiate framework structures used by compliance assessments; assessments collect requirement-level answers/evidence, calculate scores, derive mappings and remediation, then export reports. The interactive framework builder is implemented in `frontend/src/lib/components/FrameworkBuilder/FrameworkBuilder.svelte`; library authoring/import is available through `frontend/src/routes/(app)/(internal)/experimental/library-builder`.

#### Identity, tenancy/scoping, and portals
IAM is an architectural gate before domain access: users, roles, assignments, folders, service accounts, SSO, MFA, and SCIM are implemented in `backend/iam/models.py`, `backend/iam/authentication.py`, and `backend/iam/scim/views.py`. Folder/domain scope and permission checks constrain API queries and UI context. Authentication supports local accounts plus OIDC/SAML (`backend/iam/sso/oidc/views.py`, `backend/iam/sso/saml/views.py`).

The frontend separates internal users from constrained third-party/auditee experiences in `frontend/src/routes/(app)/(third-party)`. Public trust/portal publication is a separate exposure boundary via `backend/portals/views.py` and `frontend/src/routes/trust`.

#### Automation, events, and integrations
The workflow engine models executable graphs with triggers, actions, scheduling, authorization, validation, and run state in `backend/automation/workflows/engine.py`, `backend/automation/workflows/graph.py`, and `backend/automation/workflows/triggers.py`. Its visual editor is `frontend/src/routes/(app)/(internal)/workflows/[id=uuid]/WorkflowCanvas.svelte`. Shipped workflow-library YAML can instantiate operational automations.

External boundaries include Jira and ServiceNow synchronization (`backend/integrations/itsm/jira/integration.py`, `backend/integrations/itsm/servicenow/integration.py`), outbound webhooks (`backend/webhooks/service.py`), and Kafka command ingestion through the standalone dispatcher (`dispatcher/dispatcher.py`, `dispatcher/utils/kafka.py`). The Python CLI/MCP server provides programmatic and agent-facing API access (`cli/clica.py`, `cli/ca_mcp/server.py`). n8n and Power BI connectors are maintained integration packages under `automation/n8n/n8n-nodes-ca` and `automation/powerbi/connector`.

#### Specialized intelligence and domain modules
Risk extends from qualitative assessments in core to EBIOS RM (`backend/ebios_rm/models.py`), quantitative cyber risk (`backend/crq/models.py`), resilience/BIA and DORA reporting (`backend/resilience/models.py`), and third-party risk (`backend/tprm/models.py`). Privacy processing/register functionality is isolated in `backend/privacy/models.py`.

AI/chat is a bounded subsystem: provider abstraction, scoped RAG, embeddings, knowledge graph, tool calls, and background indexing reside in `backend/chat/providers.py`, `backend/chat/rag.py`, and `backend/chat/knowledge_graph.py`; it can use external/local AI providers and Qdrant indexing. Security-intelligence feeds enrich advisory/vulnerability data through `backend/sec_intel/feeds.py`.

Main entry points: [`backend/ciso_assistant/urls.py`](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/ciso_assistant/urls.py) (Django REST API), [`backend/core/models.py`](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/core/models.py) (Core GRC domain), [`frontend/src/routes/+layout.svelte`](https://github.com/intuitem/ciso-assistant-community/blob/main/frontend/src/routes/%2Blayout.svelte) (SvelteKit SSR frontend), [`backend/library/builder.py`](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/library/builder.py) (Versioned YAML libraries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_edge["Edge &amp; Delivery"]
  node_proxy{{"Caddy reverse proxy<br/>TLS ingress"}}
  node_database[("Operational database<br/>SQLite / PostgreSQL")]
  node_object_storage[("Attachment storage<br/>filesystem / object storage")]
end

subgraph group_backend["Django Platform"]
  node_django_api["Django REST API<br/>Python/Django<br/>[urls.py]"]
  node_iam["IAM and tenancy<br/>Django module<br/>[authentication.py]"]
  node_core_domain["Core GRC domain<br/>Django models<br/>[models.py]"]
  node_mapping_engine["Cross-framework mappings<br/>mapping engine<br/>[engine.py]"]
  node_library["Versioned YAML libraries<br/>library subsystem<br/>[builder.py]"]
  node_assessment_lifecycle["Assessment lifecycle<br/>domain flow<br/>[views.py]"]
end

subgraph group_frontend["SvelteKit Experiences"]
  node_frontend["SvelteKit SSR frontend<br/>Node application<br/>[+layout.svelte]"]
  node_model_routes["Generic model UI<br/>SvelteKit routes"]
  node_framework_builder["Framework builder<br/>Svelte component"]
  node_third_party_ui["Third-party portal UI<br/>SvelteKit routes"]
end

subgraph group_automation["Automation &amp; Integrations"]
  node_huey["Huey workers<br/>background runtime"]
  node_workflows["Workflow engine<br/>automation module<br/>[engine.py]"]
  node_workflow_canvas["Workflow canvas<br/>Svelte component"]
  node_external_integrations{{"ITSM and webhooks<br/>integration boundary<br/>[integration.py]"}}
  node_kafka_dispatcher["Kafka dispatcher<br/>standalone Python service<br/>[dispatcher.py]"]
end

subgraph group_specialized["Specialized Domains"]
  node_specialized_domains["Risk, resilience, privacy<br/>Django domain modules<br/>[models.py]"]
  node_ai_intelligence["AI and security intelligence<br/>enrichment subsystem<br/>[rag.py]"]
  node_external_ai_qdrant{{"AI providers &amp; Qdrant<br/>external services"}}
end

node_proxy -->|"serves UI"| node_frontend
node_proxy -->|"routes API"| node_django_api
node_frontend -->|"hosts"| node_model_routes
node_frontend -->|"separates experience"| node_third_party_ui
node_model_routes -->|"uses REST resources"| node_django_api
node_framework_builder -->|"authors/imports"| node_library
node_third_party_ui -->|"constrained access"| node_django_api
node_django_api -->|"authenticates and scopes"| node_iam
node_django_api -->|"exposes"| node_core_domain
node_django_api -->|"loads and imports"| node_library
node_core_domain -->|"drives"| node_assessment_lifecycle
node_library -->|"instantiates frameworks"| node_assessment_lifecycle
node_assessment_lifecycle -->|"derives mappings"| node_mapping_engine
node_core_domain -->|"persists"| node_database
node_core_domain -->|"stores evidence"| node_object_storage
node_django_api -->|"queues work"| node_huey
node_workflows -->|"runs asynchronously"| node_huey
node_workflow_canvas -->|"edits graphs"| node_workflows
node_huey -->|"syncs and notifies"| node_external_integrations
node_kafka_dispatcher -->|"ingests commands"| node_django_api
node_django_api -->|"serves specialist modules"| node_specialized_domains
node_core_domain -->|"shares GRC context"| node_specialized_domains
node_huey -->|"indexes asynchronously"| node_ai_intelligence
node_ai_intelligence -->|"queries and indexes"| node_external_ai_qdrant

click node_proxy "https://github.com/intuitem/ciso-assistant-community/blob/main/Caddyfile"
click node_frontend "https://github.com/intuitem/ciso-assistant-community/blob/main/frontend/src/routes/%2Blayout.svelte"
click node_model_routes "https://github.com/intuitem/ciso-assistant-community/tree/main/frontend/src/routes/(app)/(internal)/%5Bmodel%3Durlmodel%5D"
click node_framework_builder "https://github.com/intuitem/ciso-assistant-community/blob/main/frontend/src/lib/components/FrameworkBuilder/FrameworkBuilder.svelte"
click node_third_party_ui "https://github.com/intuitem/ciso-assistant-community/tree/main/frontend/src/routes/(app)/(third-party)"
click node_django_api "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/ciso_assistant/urls.py"
click node_iam "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/iam/authentication.py"
click node_core_domain "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/core/models.py"
click node_mapping_engine "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/core/mappings/engine.py"
click node_library "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/library/builder.py"
click node_assessment_lifecycle "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/core/views.py"
click node_workflows "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/automation/workflows/engine.py"
click node_workflow_canvas "https://github.com/intuitem/ciso-assistant-community/blob/main/frontend/src/routes/(app)/(internal)/workflows/%5Bid%3Duuid%5D/WorkflowCanvas.svelte"
click node_external_integrations "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/integrations/itsm/jira/integration.py"
click node_kafka_dispatcher "https://github.com/intuitem/ciso-assistant-community/blob/main/dispatcher/dispatcher.py"
click node_specialized_domains "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/ebios_rm/models.py"
click node_ai_intelligence "https://github.com/intuitem/ciso-assistant-community/blob/main/backend/chat/rag.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_proxy,node_database,node_object_storage toneBlue
class node_django_api,node_iam,node_core_domain,node_mapping_engine,node_library,node_assessment_lifecycle toneAmber
class node_frontend,node_model_routes,node_framework_builder,node_third_party_ui toneMint
class node_huey,node_workflows,node_workflow_canvas,node_external_integrations,node_kafka_dispatcher toneRose
class node_specialized_domains,node_ai_intelligence,node_external_ai_qdrant toneIndigo
```

## Components

### Edge & Delivery

- [Caddy reverse proxy](https://github.com/intuitem/ciso-assistant-community/blob/main/Caddyfile): TLS ingress · Routes browser traffic to frontend and backend services. · `Caddyfile`
- **Operational database**: SQLite / PostgreSQL · Django model and migration managed persistence.
- **Attachment storage**: filesystem / object storage · Filesystem, S3-compatible, AWS S3, or Azure Blob attachments.

### Django Platform

- [Django REST API](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/ciso_assistant/urls.py): Python/Django · Primary API entry point and domain service boundary. · `backend/ciso_assistant/urls.py`
- [IAM and tenancy](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/iam/authentication.py): Django module · Authenticates identities and enforces scoped permissions. · `backend/iam/authentication.py`
- [Core GRC domain](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/core/models.py): Django models · Controls, assessments, evidence, risks, findings, incidents, and tasks. · `backend/core/models.py`
- [Cross-framework mappings](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/core/mappings/engine.py): mapping engine · Derives relationships without duplicating reusable controls. · `backend/core/mappings/engine.py`
- [Versioned YAML libraries](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/library/builder.py): library subsystem · Builds and imports frameworks, catalogs, mappings, and workflow templates. · `backend/library/builder.py`
- [Assessment lifecycle](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/core/views.py): domain flow · Instantiates requirements, captures evidence, scores, and creates remediation. · `backend/core/views.py`

### SvelteKit Experiences

- [SvelteKit SSR frontend](https://github.com/intuitem/ciso-assistant-community/blob/main/frontend/src/routes/%2Blayout.svelte): Node application · Internal GRC app, third-party views, and UI rendering. · `frontend/src/routes/+layout.svelte`
- [Generic model UI](https://github.com/intuitem/ciso-assistant-community/tree/main/frontend/src/routes/(app)/(internal)/%5Bmodel%3Durlmodel%5D): SvelteKit routes · Renders and proxies core resource screens. · `frontend/src/routes/(app)/(internal)/[model=urlmodel]`
- [Framework builder](https://github.com/intuitem/ciso-assistant-community/blob/main/frontend/src/lib/components/FrameworkBuilder/FrameworkBuilder.svelte): Svelte component · `frontend/src/lib/components/FrameworkBuilder/FrameworkBuilder.svelte`
- [Third-party portal UI](https://github.com/intuitem/ciso-assistant-community/tree/main/frontend/src/routes/(app)/(third-party)): SvelteKit routes · `frontend/src/routes/(app)/(third-party)`

### Automation & Integrations

- **Huey workers**: background runtime · Runs notifications, integrations, and deferred domain work.
- [Workflow engine](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/automation/workflows/engine.py): automation module · Executes validated trigger-action graphs and records runs. · `backend/automation/workflows/engine.py`
- [Workflow canvas](https://github.com/intuitem/ciso-assistant-community/blob/main/frontend/src/routes/(app)/(internal)/workflows/%5Bid%3Duuid%5D/WorkflowCanvas.svelte): Svelte component · `frontend/src/routes/(app)/(internal)/workflows/[id=uuid]/WorkflowCanvas.svelte`
- [ITSM and webhooks](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/integrations/itsm/jira/integration.py): integration boundary · Synchronizes Jira/ServiceNow and delivers outbound events. · `backend/integrations/itsm/jira/integration.py`
- [Kafka dispatcher](https://github.com/intuitem/ciso-assistant-community/blob/main/dispatcher/dispatcher.py): standalone Python service · Consumes commands for platform processing. · `dispatcher/dispatcher.py`

### Specialized Domains

- [Risk, resilience, privacy](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/ebios_rm/models.py): Django domain modules · EBIOS RM, quantitative risk, BIA/DORA, TPRM, and privacy registers. · `backend/ebios_rm/models.py`
- [AI and security intelligence](https://github.com/intuitem/ciso-assistant-community/blob/main/backend/chat/rag.py): enrichment subsystem · Scoped RAG, indexing, tool calls, and advisory/vulnerability feeds. · `backend/chat/rag.py`
- **AI providers & Qdrant**: external services

## Connections

- Caddy reverse proxy → SvelteKit SSR frontend: serves UI
- Caddy reverse proxy → Django REST API: routes API
- SvelteKit SSR frontend → Generic model UI: hosts
- SvelteKit SSR frontend → Third-party portal UI: separates experience
- Generic model UI → Django REST API: uses REST resources
- Framework builder → Versioned YAML libraries: authors/imports
- Third-party portal UI → Django REST API: constrained access
- Django REST API → IAM and tenancy: authenticates and scopes
- Django REST API → Core GRC domain: exposes
- Django REST API → Versioned YAML libraries: loads and imports
- Core GRC domain → Assessment lifecycle: drives
- Versioned YAML libraries → Assessment lifecycle: instantiates frameworks
- Assessment lifecycle → Cross-framework mappings: derives mappings
- Core GRC domain → Operational database: persists
- Core GRC domain → Attachment storage: stores evidence
- Django REST API → Huey workers: queues work
- Workflow engine → Huey workers: runs asynchronously
- Workflow canvas → Workflow engine: edits graphs
- Huey workers → ITSM and webhooks: syncs and notifies
- Kafka dispatcher → Django REST API: ingests commands
- Django REST API → Risk, resilience, privacy: serves specialist modules
- Core GRC domain → Risk, resilience, privacy: shares GRC context
- Huey workers → AI and security intelligence: indexes asynchronously
- AI and security intelligence → AI providers & Qdrant: queries and indexes
