# nexelofficial/dmn-cpp architecture

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

- Interactive diagram: https://gitdiagram.com/nexelofficial/dmn-cpp
- Repository: https://github.com/nexelofficial/dmn-cpp

## Overview

dmn-cpp is a C++23 RAII wrapper for the HCL Domino C API. An application opens or creates a database, then works with notes, queries, views, or ACLs; other documented capabilities include mail, agents, and add-ins. Internally, database handles are cached per thread, and scoped handles enforce cleanup and thread ownership. The graph combines README capability statements with shown source references; several capability modules were not sampled, so their internal call paths are not inferred.

Main entry points: [`src/database.cpp`](https://github.com/nexelofficial/dmn-cpp/blob/main/src/database.cpp) (Database), [`src/design/view.cpp`](https://github.com/nexelofficial/dmn-cpp/blob/main/src/design/view.cpp) (View Design), [`src/note.cpp`](https://github.com/nexelofficial/dmn-cpp/blob/main/src/note.cpp) (Notes), [`src/messaging/mail.cpp`](https://github.com/nexelofficial/dmn-cpp/blob/main/src/messaging/mail.cpp) (Mail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_database["Database Access"]
  node_database_api["Database<br/>[database.cpp]"]
  node_dql["DQL Queries<br/>[dql.cpp]"]
end

subgraph group_content["Notes and Views"]
  node_note["Notes<br/>[note.cpp]"]
  node_value["Item Values<br/>[value.cpp]"]
  node_view["Views<br/>[view.cpp]"]
  node_formula["Formulas<br/>[formula.cpp]"]
end

subgraph group_security["ACL and Design"]
  node_design_view["View Design<br/>[view.cpp]"]
  node_acl["ACL Manager<br/>[manager.cpp]"]
  node_acl_names["ACL Names<br/>[names.cpp]"]
end

subgraph group_integrations["Messaging and Add-ins"]
  node_agent["Agents<br/>[agent.cpp]"]
  node_mail["Mail<br/>[mail.cpp]"]
  node_mime["MIME Content<br/>[mime.cpp]"]
  node_addin["Add-ins<br/>[addin.cpp]"]
end

subgraph group_internals["Runtime Internals"]
  node_thread_context["Thread Handle Cache<br/>[thread_context.cpp]"]
  node_scoped_handle["Scoped Handles<br/>[scoped_handle.hpp]"]
  node_lmbcs["LMBCS Conversion<br/>[lmbcs.cpp]"]
  node_ods["ODS Encoding<br/>[ods.cpp]"]
end

node_application(("Application"))
node_domino["Domino C API"]

node_application -->|"opens database"| node_database_api
node_database_api -->|"uses API"| node_domino
node_database_api -->|"caches handles"| node_thread_context
node_database_api -->|"manages handles"| node_scoped_handle
node_database_api -->|"runs query"| node_dql
node_database_api -->|"opens and creates"| node_note
node_database_api -->|"reads ACL"| node_acl
node_database_api -->|"opens agent"| node_agent
node_note -->|"reads and writes"| node_value
node_database_api -->|"opens view"| node_view
node_design_view -->|"creates note"| node_database_api
node_design_view -->|"writes design note"| node_note
node_design_view -->|"builds selection"| node_formula
node_acl -->|"looks up access"| node_acl_names
node_mail -->|"uses MIME"| node_mime
node_addin -.->|"uses API"| node_domino
node_mail -.->|"sends mail"| node_domino
node_dql -.->|"queries database"| node_domino
node_view -.->|"accesses views"| node_domino
node_lmbcs -.->|"converts text"| node_domino
node_design_view -.->|"encodes formats"| node_ods

click node_database_api "https://github.com/nexelofficial/dmn-cpp/blob/main/src/database.cpp"
click node_dql "https://github.com/nexelofficial/dmn-cpp/blob/main/src/dql.cpp"
click node_thread_context "https://github.com/nexelofficial/dmn-cpp/blob/main/src/detail/thread_context.cpp"
click node_scoped_handle "https://github.com/nexelofficial/dmn-cpp/blob/main/include/dmn/detail/scoped_handle.hpp"
click node_note "https://github.com/nexelofficial/dmn-cpp/blob/main/src/note.cpp"
click node_value "https://github.com/nexelofficial/dmn-cpp/blob/main/src/value.cpp"
click node_view "https://github.com/nexelofficial/dmn-cpp/blob/main/src/view.cpp"
click node_design_view "https://github.com/nexelofficial/dmn-cpp/blob/main/src/design/view.cpp"
click node_formula "https://github.com/nexelofficial/dmn-cpp/blob/main/src/formula.cpp"
click node_acl "https://github.com/nexelofficial/dmn-cpp/blob/main/src/acl/manager.cpp"
click node_acl_names "https://github.com/nexelofficial/dmn-cpp/blob/main/src/acl/names.cpp"
click node_agent "https://github.com/nexelofficial/dmn-cpp/blob/main/src/agent.cpp"
click node_mail "https://github.com/nexelofficial/dmn-cpp/blob/main/src/messaging/mail.cpp"
click node_mime "https://github.com/nexelofficial/dmn-cpp/blob/main/src/messaging/mime.cpp"
click node_addin "https://github.com/nexelofficial/dmn-cpp/blob/main/src/addin/addin.cpp"
click node_lmbcs "https://github.com/nexelofficial/dmn-cpp/blob/main/src/lmbcs.cpp"
click node_ods "https://github.com/nexelofficial/dmn-cpp/blob/main/src/detail/ods.cpp"

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_database_api,node_dql toneBlue
class node_note,node_value,node_view,node_formula toneAmber
class node_design_view,node_acl,node_acl_names,node_domino toneMint
class node_agent,node_mail,node_mime,node_addin toneRose
class node_thread_context,node_scoped_handle,node_lmbcs,node_ods,node_application toneIndigo
```

## Components

### Database Access

- [Database](https://github.com/nexelofficial/dmn-cpp/blob/main/src/database.cpp): `src/database.cpp`
- [DQL Queries](https://github.com/nexelofficial/dmn-cpp/blob/main/src/dql.cpp): `src/dql.cpp`

### Notes and Views

- [Notes](https://github.com/nexelofficial/dmn-cpp/blob/main/src/note.cpp): `src/note.cpp`
- [Item Values](https://github.com/nexelofficial/dmn-cpp/blob/main/src/value.cpp): `src/value.cpp`
- [Views](https://github.com/nexelofficial/dmn-cpp/blob/main/src/view.cpp): `src/view.cpp`
- [Formulas](https://github.com/nexelofficial/dmn-cpp/blob/main/src/formula.cpp): `src/formula.cpp`

### ACL and Design

- [View Design](https://github.com/nexelofficial/dmn-cpp/blob/main/src/design/view.cpp): `src/design/view.cpp`
- [ACL Manager](https://github.com/nexelofficial/dmn-cpp/blob/main/src/acl/manager.cpp): `src/acl/manager.cpp`
- [ACL Names](https://github.com/nexelofficial/dmn-cpp/blob/main/src/acl/names.cpp): `src/acl/names.cpp`

### Messaging and Add-ins

- [Agents](https://github.com/nexelofficial/dmn-cpp/blob/main/src/agent.cpp): `src/agent.cpp`
- [Mail](https://github.com/nexelofficial/dmn-cpp/blob/main/src/messaging/mail.cpp): `src/messaging/mail.cpp`
- [MIME Content](https://github.com/nexelofficial/dmn-cpp/blob/main/src/messaging/mime.cpp): `src/messaging/mime.cpp`
- [Add-ins](https://github.com/nexelofficial/dmn-cpp/blob/main/src/addin/addin.cpp): `src/addin/addin.cpp`

### Runtime Internals

- [Thread Handle Cache](https://github.com/nexelofficial/dmn-cpp/blob/main/src/detail/thread_context.cpp): `src/detail/thread_context.cpp`
- [Scoped Handles](https://github.com/nexelofficial/dmn-cpp/blob/main/include/dmn/detail/scoped_handle.hpp): `include/dmn/detail/scoped_handle.hpp`
- [LMBCS Conversion](https://github.com/nexelofficial/dmn-cpp/blob/main/src/lmbcs.cpp): `src/lmbcs.cpp`
- [ODS Encoding](https://github.com/nexelofficial/dmn-cpp/blob/main/src/detail/ods.cpp): `src/detail/ods.cpp`

### Other components

- **Application**
- **Domino C API**

## Connections

- Application → Database: opens database
- Database → Domino C API: uses API
- Database → Thread Handle Cache: caches handles (evidence: `src/database.cpp`)
- Database → Scoped Handles: manages handles (evidence: `src/database.cpp`)
- Database → DQL Queries: runs query (evidence: `src/database.cpp`)
- Database → Notes: opens and creates (evidence: `src/database.cpp`)
- Database → ACL Manager: reads ACL (evidence: `src/database.cpp`)
- Database → Agents: opens agent (evidence: `src/database.cpp`)
- Notes → Item Values: reads and writes (evidence: `src/note.cpp`)
- Database → Views: opens view
- View Design → Database: creates note (evidence: `src/design/view.cpp`)
- View Design → Notes: writes design note (evidence: `src/design/view.cpp`)
- View Design → Formulas: builds selection (evidence: `src/design/view.cpp`)
- ACL Manager → ACL Names: looks up access (evidence: `src/acl/manager.cpp`)
- Mail → MIME Content: uses MIME (evidence: `src/messaging/mail.cpp`)
- Add-ins → Domino C API: uses API
- Mail → Domino C API: sends mail
- DQL Queries → Domino C API: queries database
- Views → Domino C API: accesses views
- LMBCS Conversion → Domino C API: converts text
- View Design → ODS Encoding: encodes formats
