Skip to content
Table of contents

D2COpenAIPlugin: Routing text to diagram backends

D2COpenAIPlugin is a FastAPI diagram service with a plugin manifest and an OpenAPI surface. Its implementation selects among PlantUML, Mermaid and Kroki paths based on the request’s diagram language.

Application and services
  • Updated
  • 9
  • Python · 100%
  • MIT
Documented components
2Explore modules
Source documents
2Read the instructions
Repository languagesPython 100%1

Shares calculated from GitHub Linguist bytes.

Python100%
100%60,743 bytes
Language%Bytes
Python100%60,743

1. Overview

1.1. Why it exists

OpenAI ChatGPT plugin manifest and OpenAPI endpoint handler for text-to-diagram conversion.

1.2. Best fit

ChatGPT Plus GPT Store integration for software architects.

2. Use cases

FastAPI ChatGPT-plugin backend that turns PlantUML, Mermaid, D2 or Kroki source into diagram links.

Use-case diagram for D2COpenAIPlugin: Get a PlantUML image link; Open Mermaid in Live Editor; Render D2 or Kroki types; Serve the plugin manifest; Run and test locallyD2COpenAIPluginGet a PlantUML image linkOpen Mermaid in Live EditorRender D2 or Kroki typesServe the plugin manifestRun and test locallyDeveloper«system»ChatGPT plugin client«system»Diagram renderers
People on the left, external systems on the right; each oval is a use case backed by the files cited below.
Get a PlantUML image link
ChatGPT plugin clientDiagram renderers

POST /generate_diagram with lang plantuml encodes the code for the public PlantUML server (theme blueprint by default) and returns url, content and playground.

Open Mermaid in Live Editor
ChatGPT plugin clientDiagram renderers

For lang mermaid, mermaid/mermaid.py builds an encoded editor state (theme dark by default) and returns Mermaid Live Editor links.

Render D2 or Kroki types
ChatGPT plugin clientDiagram renderers

D2 aliases and every language in KROKI_LANGUAGE_SUPPORT go through generate_kroki_diagram in kroki/kroki.py and return an SVG link.

Serve the plugin manifest
ChatGPT plugin client

app.py serves /.well-known/ai-plugin.json, /openapi.yaml, /openapi.json, /logo.png and /.well-known/privacy.txt so a ChatGPT client can load the plugin.

Run and test locally
Developer

uvicorn app:app serves the API on port 5003 with docs at /; test_app.py covers the endpoints in CI, and vercel.json routes every path to app.py.

2.1. Scenario: Connect the plugin to ChatGPT on localhost

  1. Create a virtualenv, run pip install -r requirements-dev.txt and python -m pytest.
  2. Start the API with uvicorn app:app --host 127.0.0.1 --port 5003.
  3. In ChatGPT, choose Develop your own plugin and enter localhost:5003 to load /.well-known/ai-plugin.json.
  4. Ask for a sequence diagram; ChatGPT calls POST /generate_diagram with lang plantuml.
  5. The API returns the image URL and a playground link that ChatGPT shows to the user.

Files readREADME.mdapp.pyplantuml/__init__.pymermaid/mermaid.pykroki/kroki.py.well-known/ai-plugin.jsontest_app.pyvercel.json

3. Try it

Address published in the repository README. The page opens in a sandboxed frame, only when you ask.

Open in a new tab https://openai-uml-plugin.vercel.app

4. Getting started

These commands come from the repository documentation. They were not run during this review.

README.md · Quick start
git clone https://github.com/antoinebou12/D2COpenAIPlugin.git
cd D2COpenAIPlugin
python -m venv .venv
README.md · Quick start
.\.venv\Scripts\Activate.ps1
README.md · Quick start
source .venv/bin/activate
README.md · Quick start
pip install -r requirements-dev.txt
python -m pytest
uvicorn app:app --host 127.0.0.1 --port 5003
README.md · Quick start
python app.py
plantuml/README.md · Installation
pip install plantumlapi
plantuml/README.md · Command Line Usage
usage: plantuml.py [-h] [-o OUT] [-s SERVER] filename [filename ...]
Generate images from PlantUML defined files using PlantUML server
positional arguments: 
  filename            file(s) to generate images from
optional arguments: 
  -h, --help          show this help message and exit 
  -o OUT, --out OUT   directory to put the files into 
  -s SERVER, --server SERVER 
                      server to generate from; defaults to plantuml.com 
Tasks declared in manifests

5. Repository references

Excerpts from the repository’s guides, in their original language. Links open the inspected source revision.

Prerequisites and first run

5.1. Requirements

README.md

  • Python 3.10+ (CI uses 3.12)
  • pip and a virtual environment (recommended) Optional:
  • D2/main — small helper binary expected at ./D2/main for D2 encoding in D2/run_d2.py (only needed if you use the D2 code paths locally)

Read the full instructions ↗

5.2. Quick start

README.md

Activate the venv (Windows PowerShell): Activate the venv (macOS / Linux): Install dependencies and run the API: Equivalent one-liner after activation:

Read the full instructions ↗

5.3. Installation

plantuml/README.md

To install, run the following command:
Read the full instructions ↗
API and integration

5.4. API

README.md

FieldTypeRequiredDescription
langstringyese.g. plantuml, mermaid, d2, or a Kroki type allowed by the server
typestringyese.g. class, sequence, activity (used for validation / logging)
codestringyesDiagram source (max length enforced in app.py)
themestringnoPlantUML / Mermaid theming where applicable
Example (PlantUML) with curl (bash / Git Bash):
Example with PowerShell:

POST /generate_diagram JSON body:

Read the full instructions ↗
Development and contributions

5.5. Contributing / security

README.md

  • Tests: python -m pytest (see .github/workflows/CI.yml)
  • Security policy: SECURITY.md

Read the full instructions ↗
Source documentation

2 documents read from 2 candidates.

6. Features and components 2

Request model
DiagramRequest contains lang, type, code and theme. Validators check the language and source length. /generate_diagram rejects missing fields before dispatching to a backend; the code then builds result and playground links.
Backend adapters
PlantUML uses its dedicated client, Mermaid builds an editor state, and D2 aliases are normalized to the Kroki d2 renderer. Other supported languages use the Kroki language registry. The adapters isolate differing URL and encoding conventions.

7. Architecture

Expand a component to follow its connections, or explore the full diagram.

System components Context
Mermaid Interactive diagram

System overview of the components and connections verified in the repository.

Static architecture view for D2COpenAIPlugin
Static preview. The interactive diagram replaces it after Mermaid loads.
flowchart LR
node_client(("Plugin client"))

subgraph group_api["API surface"]
  node_api["FastAPI endpoint<br/>[app.py]"]
  node_request["Request validation<br/>[app.py]"]
  node_response["Diagram response<br/>[app.py]"]
end

subgraph group_formats["Diagram formats"]
  node_plantuml["PlantUML renderer<br/>[__init__.py]"]
  node_mermaid["Mermaid state and links<br/>[mermaid.py]"]
  node_d2encoder["D2 encoder<br/>[d2.py]"]
  node_d2runner["D2 binary runner<br/>[run_d2.py]"]
  node_kroki["Kroki client<br/>[kroki.py]"]
end

subgraph group_integration["Rendering services"]
  node_plantservice["PlantUML server"]
  node_mermaidink["Mermaid image service"]
  node_mermaidlive["Mermaid Live Editor"]
  node_krokiservice["Kroki service"]
end

subgraph group_assets["Plugin assets"]
  node_pluginassets["Plugin metadata<br/>[ai-plugin.json]"]
  node_openapi["OpenAPI specification<br/>[openapi.yaml]"]
  node_privacy["Privacy policy<br/>[privacy.txt]"]
  node_logo["Plugin logo"]
end

node_client -->|"submits request"| node_api
node_api -->|"validates"| node_request
node_api -->|"returns result"| node_response
node_d2runner -.->|"runs encoder binary"| node_d2encoder
group_api --> group_formats
group_formats --> group_integration
group_assets --> group_api
class node_api,node_request,node_response,node_client toneBlue
class node_plantuml,node_mermaid,node_d2encoder,node_d2runner,node_kroki toneAmber
class node_plantservice,node_mermaidink,node_mermaidlive,node_krokiservice toneMint
class node_pluginassets,node_openapi,node_privacy,node_logo toneRose

A FastAPI diagram backend that validates requests, selects a PlantUML, Mermaid, D2 or Kroki path, and returns rendered content plus editor links. The service also publishes plugin, OpenAPI and privacy assets.

Components
17
Connections
15
Evidence-backed links
13/15
Text version of the diagram

The diagram merges parallel links between groups, so it shows 7 of 15. Full list:

  • Plugin client → FastAPI endpoint (submits request)
  • FastAPI endpoint → Request validation (validates)
  • FastAPI endpoint → PlantUML renderer (dispatches PlantUML)
  • PlantUML renderer → PlantUML server (requests rendering)
  • FastAPI endpoint → Mermaid state and links (dispatches Mermaid)
  • FastAPI endpoint → Kroki client (dispatches D2 or allow-list)
  • Kroki client → Kroki service (requests rendering)
  • Mermaid state and links → Mermaid image service (creates image URL)
  • Mermaid state and links → Mermaid Live Editor (creates editor URL)
  • FastAPI endpoint → Diagram response (returns result)
  • Plugin metadata → FastAPI endpoint (served by)
  • OpenAPI specification → FastAPI endpoint (describes API)
  • Privacy policy → FastAPI endpoint (served by)
  • Plugin logo → FastAPI endpoint (served by)
  • D2 binary runner → D2 encoder (runs encoder binary)
Follow one path through the code

Compare the PlantUML and D2 branches in app.py. They accept the same request model but use different rendering adapters. The type validator logs an invalid type rather than raising, so it is not equivalent to strict language validation.

8. Technical dossier

Built from the source at commit 7d15ee1 (23 files). Each item comes from a pattern match in the code, so open the linked file before relying on it.

8.1. Layers and modules

Folders are sorted into layers by name, from the user interface down to data access. Because the sorting uses names only, the diagram says nothing about calls between layers.

Mermaid Layered view
flowchart TB
  subgraph L_interface["Entry points and API"]
    direction TB
    interface_0["(root)<br/>1 file"]
  end
  subgraph L_core["Core source"]
    direction TB
    core_0["D2<br/>3 files"]
    core_1["kroki<br/>2 files"]
    core_2["mermaid<br/>2 files"]
    core_3["plantuml/themes<br/>2 files"]
    core_more["+2"]
  end
  subgraph L_tests["Tests"]
    direction TB
    tests_0["(root)<br/>1 file"]
  end
  subgraph L_hosting["Build, CI and hosting"]
    direction TB
    hosting_0["(root)<br/>1 file"]
    hosting_1[".github<br/>1 file"]
  end
  L_interface ~~~ L_core
  L_core ~~~ L_tests
  L_core ~~~ L_hosting
Modules and their main layer
ModuleLayerFilesTypesExtensions
D2Core source32.py
(root)Core source21.py
krokiCore source24.py
mermaidCore source23.py
plantuml/themesCore source27.py
plantumlCore source14.py

8.2. C4 model

From system context to code declarations. Each level reflects the available source evidence.

UML 1 · System context
1 · System context

The widest C4 view: who uses the project and which outside systems and data stores it relies on. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Context>
LAYOUT_LEFT_RIGHT()
Person(P_http, "HTTP client")
System(SYS, "D2COpenAIPlugin", "D2COpenAIPlugin is a FastAPI diagram service with a plugin manifest a…")
System_Ext(E0, "PlantUML server")
System_Ext(E1, "Kroki")
Rel(P_http, SYS, "Uses")
Rel(SYS, E0, "Calls")
Rel(SYS, E1, "Calls")
@enduml
UML 2 · Containers
2 · Containers

One level closer: the parts that run separately inside the project, their main language and how calls flow between them. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Container>
LAYOUT_LEFT_RIGHT()
Person(P_http, "HTTP client")
System_Boundary(SYS, "D2COpenAIPlugin") {
  Container(APP, "D2COpenAIPlugin", "Python")
}
System_Ext(E0, "PlantUML server")
System_Ext(E1, "Kroki")
Rel(P_http, APP, "Uses")
Rel(APP, E0, "Calls")
Rel(APP, E1, "Calls")
@enduml
UML 3 · Components and layers
3 · Components and layers

Modules grouped by source-layer classification. Boundaries show organization, not runtime isolation or call relationships. Rendered with uml-mcp.

PlantUML source
@startuml
!include <C4/C4_Component>
LAYOUT_TOP_DOWN()
System_Boundary(SYS, "D2COpenAIPlugin") {
Boundary(L0, "Entry points and API", "layer") {
Component(M0_0, "(root)", "Python", "1 files")
}
Boundary(L1, "Core source", "layer") {
Component(M1_0, "D2", "Python", "3 files")
Component(M1_1, "kroki", "Python", "2 files")
Component(M1_2, "mermaid", "Python", "2 files")
Component(M1_3, "plantuml/themes", "Python", "2 files")
Component(M1_4, "(root)", "Python", "1 files")
Component(M1_5, "plantuml", "Python", "1 files")
}
Boundary(L2, "Tests", "layer") {
Component(M2_0, "(root)", "Python", "1 files")
}
Boundary(L3, "Build, CI and hosting", "layer") {
Component(M3_0, "(root)", ".json", "1 files")
Component(M3_1, ".github", ".yml", "1 files")
}
}
@enduml
UML 4 · Code
4 · Code

Selected declarations, fields and methods grouped by source file. No inheritance or call edges are inferred. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
top to bottom direction
hide empty members
package "D2COpenAIPlugin" {
package "kroki/kroki.py" as F0 {
class "Kroki" as T0_0 {
  get_url()
  get_playground_url()
  render_diagram()
  generate_diagram()
  deflate_and_encode()
  encode_plantuml()
}
}
package "plantuml/__init__.py" as F1 {
class "PlantUML" as T1_0 {
  get_url()
  process()
  process_file()
  deflate_and_encode()
  encode()
  _encode3bytes()
}
}
package "mermaid/mermaid.py" as F2 {
class "PakoSerde" as T2_0 {
  serialize()
  deserialize()
  pako_deflate()
  pako_inflate()
}
class "Base64Serde" as T2_1 {
  serialize()
  deserialize()
}
}
package "app.py" as F3 {
class "DiagramRequest" as T3_0 {
  lang
  type
  code
  theme
}
}
package "plantuml/themes/theme.py" as F4 {
class "EXTERNAL_THEMES" as T4_0 {
}
class "THEMES" as T4_1 {
}
}
package "D2/d2.py" as F5 {
class "Layout" as T5_0 {
}
class "Theme" as T5_1 {
}
}
}
@enduml

8.3. Data flow

The calls from the GitDiagram graph, in the order you meet them from the entry points. GitDiagram generates the graph with AI; the file paths it cites were checked against the repository tree.

Mermaid Sequence diagram
sequenceDiagram
  autonumber
  participant P0 as D2 binary runner
  participant P1 as D2 encoder
  participant P2 as Plugin metadata
  participant P3 as FastAPI endpoint
  participant P4 as OpenAPI specification
  participant P5 as Privacy policy
  participant P6 as Plugin logo
  participant P7 as Plugin client
  participant P8 as Request validation
  participant P9 as PlantUML renderer
  participant P10 as Mermaid state and links
  participant P11 as Kroki client
  participant P12 as Diagram response
  participant P13 as PlantUML server
  participant P14 as Mermaid image service
  participant P15 as Mermaid Live Editor
  participant P16 as Kroki service
  P0--)P1: runs encoder binary
  P2->>P3: served by
  P4->>P3: describes API
  P5->>P3: served by
  P6->>P3: served by
  P7->>P3: submits request
  P3->>P8: validates
  P3->>P9: dispatches PlantUML
  P3->>P10: dispatches Mermaid
  P3->>P11: dispatches D2 or allow-list
  P3->>P12: returns result
  P9->>P13: requests rendering
  P10->>P14: creates image URL
  P10->>P15: creates editor URL
  P11->>P16: requests rendering
Steps as text
  1. D2 binary runner to D2 encoder runs encoder binary
  2. Plugin metadata to FastAPI endpoint served by
  3. OpenAPI specification to FastAPI endpoint describes API
  4. Privacy policy to FastAPI endpoint served by
  5. Plugin logo to FastAPI endpoint served by
  6. Plugin client to FastAPI endpoint submits request
  7. FastAPI endpoint to Request validation validates
  8. FastAPI endpoint to PlantUML renderer dispatches PlantUML
  9. FastAPI endpoint to Mermaid state and links dispatches Mermaid
  10. FastAPI endpoint to Kroki client dispatches D2 or allow-list
  11. FastAPI endpoint to Diagram response returns result
  12. PlantUML renderer to PlantUML server requests rendering
  13. Mermaid state and links to Mermaid image service creates image URL
  14. Mermaid state and links to Mermaid Live Editor creates editor URL
  15. Kroki client to Kroki service requests rendering

8.4. Public interface

Outside code can use everything listed here. The project also declares 21 public types.

UML Use cases
Use cases

Each actor is a kind of caller, linked to what it can ask the project to do. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
left to right direction
actor "HTTP client" as A_http
rectangle "D2COpenAIPlugin" {
  usecase "GET /.well-known (2 routes)" as U0
  usecase "POST /generate_diagram" as U1
  usecase "GET /logo.png" as U2
  usecase "GET /openapi.yaml" as U3
  usecase "GET /openapi.json" as U4
}
A_http --> U0
A_http --> U1
A_http --> U2
A_http --> U3
A_http --> U4
@enduml

HTTP routes 6

Mermaid Route map by prefix
flowchart LR
  api(["HTTP API"])
  g0["/.well-known"]
  api --> g0
  g0r0["GET /.well-known/ai-plugin.json"]
  g0 --> g0r0
  g0r1["GET /.well-known/privacy.txt"]
  g0 --> g0r1
  g1["/generate_diagram"]
  api --> g1
  g1r0["POST /generate_diagram"]
  g1 --> g1r0
  g2["/logo.png"]
  api --> g2
  g2r0["GET /logo.png"]
  g2 --> g2r0
  g3["/openapi.json"]
  api --> g3
  g3r0["GET /openapi.json"]
  g3 --> g3r0
  g4["/openapi.yaml"]
  api --> g4
  g4r0["GET /openapi.yaml"]
  g4 --> g4r0
MethodPathSource
POST/generate_diagramapp.py:82
GET/logo.pngapp.py:133
GET/.well-known/ai-plugin.jsonapp.py:138
GET/openapi.yamlapp.py:144
GET/openapi.jsonapp.py:150
GET/.well-known/privacy.txtapp.py:155

Entry points

8.5. Private interface

These names are internal by the language’s conventions: a leading underscore, private, static or pub(crate).

underscore helper
6

8.6. Entities and data model 5

Mermaid Entity class diagram
classDiagram
  direction LR
  class E0["DiagramRequest"] {
    +str lang
    +str type
    +str code
    +str theme
  }
  class E1["EXTERNAL_THEMES"] {
    <<enumeration>>
  }
  class E2["Layout"] {
    <<enumeration>>
  }
  class E3["THEMES"] {
    <<enumeration>>
  }
  class E4["Theme"] {
    <<enumeration>>
  }

An arrow links a field to the entity its type names.

EntityKindFirst fields
DiagramRequestValidated schemalang, type, code, theme
EXTERNAL_THEMESEnumeration
LayoutEnumeration
THEMESEnumeration
ThemeEnumeration

8.7. Business logic

Once UI code and the services and entities above are set aside, these classes have the most methods.

Kroki Core source, 9 methods
get_url, get_playground_url, render_diagram, generate_diagram, deflate_and_encode, encode_plantuml
PlantUML Core source, 8 methods
get_url, process, process_file, deflate_and_encode, encode, _encode3bytes
PakoSerde Core source, 4 methods
serialize, deserialize, pako_deflate, pako_inflate
Base64Serde Core source, 2 methods
serialize, deserialize

8.8. External integrations

HTTP clients

httpx

Hosts named in the code

8.9. Stack and dependencies

Node.js package.json

node 24.x

Open the manifest

Python requirements.txt 5 runtime

Open the manifest

External dependencies

4 declared packages (4 runtime, 0 development) in package.json, requirements.txt.

Package table 4
External dependencies
PackageVersionScopePurposeRegistry
fastapi==0.136.0runtimeWeb frameworkpypi.org
uvicorn==0.44.0runtimeApplication serverpypi.org
pydantic>=2.10.0,<3runtimeData validationpypi.org
aiofiles—runtimeFile support for asyncio.pypi.org

8.10. CI/CD pipeline

1 GitHub Actions workflow, 1 job. Each box is a job; double-bordered boxes publish or deploy, and arrows follow needs.

Mermaid Pipeline flow
flowchart LR
  subgraph wf0["Python application test with FastAPI and Py…"]
    direction LR
    wf0_build["build<br/>ubuntu-latest"]
  end
  t0(["push · pull request"])
  t0 --> wf0_build
Workflows, triggers, jobs and targets
WorkflowTriggersJobsPublishes to
Python application test with FastAPI and Pytest
.github/workflows/CI.yml
push, pull request
  • build ubuntu-latest
    actions/checkout · Set up Python 3.12 · Install dependencies · Run tests with pytest · Run App with timeout
—

8.11. Deployment

Mermaid Deployment diagram
flowchart LR
  repo[("GitHub repository")]
  ci[["GitHub Actions<br/>1 workflow"]]
  host_Vercel("Vercel<br/>vercel.json")
  repo -->|"push or pull request"| ci
  ci -.->|"configured"| host_Vercel
UML Deployment
Deployment

The outer node is where the code runs. Each base image points to what it builds, solid arrows lead to databases and dashed ones to outside services. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
cloud "Vercel" as H {
  artifact "D2COpenAIPlugin" as APP
}
cloud "PlantUML server" as E0
APP ..> E0
cloud "Kroki" as E1
APP ..> E1
@enduml

Where it runs

8.12. Monitoring

What the code logs, measures and exposes to tell whether it is working.

8.13. Security

Controls

Supply chain

8.14. Testing

Test files
1
Source files
12
Test cases, about
16
Integration tests
1

No measured coverage report in the analyzed sources.

Where the tests are

. 1

Continuous integration

UML CI pipeline
CI pipeline

The main GitHub Actions workflow runs these steps. Jobs that run in parallel sit side by side. Rendered with uml-mcp.

PlantUML source
@startuml
skinparam backgroundColor transparent
skinparam shadowing false
skinparam roundCorner 10
skinparam defaultFontName Arial
skinparam defaultFontSize 13
skinparam ArrowColor #4e6070
skinparam ArrowFontColor #3d4f5f
skinparam titleFontSize 14
skinparam actorBorderColor #006a62
skinparam actorBackgroundColor #e9f3f4
skinparam usecaseBorderColor #006a62
skinparam usecaseBackgroundColor #e9f3f4
skinparam componentBorderColor #006a62
skinparam componentBackgroundColor #e9f3f4
skinparam interfaceBorderColor #006a62
skinparam interfaceBackgroundColor #ffffff
skinparam nodeBorderColor #4e6070
skinparam nodeBackgroundColor #f4f8fb
skinparam databaseBorderColor #006a62
skinparam databaseBackgroundColor #ffffff
skinparam cloudBorderColor #4e6070
skinparam cloudBackgroundColor #f0f5fa
skinparam artifactBorderColor #006a62
skinparam artifactBackgroundColor #ffffff
skinparam rectangleBorderColor #b0c2d3
skinparam activityBorderColor #006a62
skinparam activityBackgroundColor #e9f3f4
skinparam partitionBorderColor #b0c2d3
skinparam stereotypeCBackgroundColor #ffffff
title Python application test with FastAPI and Pytest
start
partition "build" {
  :actions/checkout;
  :Set up Python 3.12;
  :Install dependencies;
  :Run tests with pytest;
  :Run App with timeout;
}
stop
@enduml

Nothing found for: Services, Database.

9. Types and file structure

21 declared types, with 12 in the base-relationship overview.

Type diagram
classDiagram
direction TB
class te235e58dd5f7["DiagramRequest"] {
  validate_lang()
  validate_type()
  validate_code()
}
class t4e73a5f77051["KrokiError"] {
}
class t7b9c286d0daa["KrokiConnectionError"] {
}
class t125669ef086e["KrokiHTTPError"] {
  __init__()
}
class te53f5e9c5fc5["Kroki"] {
  __init__()
  get_url()
  get_playground_url()
  render_diagram()
}
class t8bdd6c0a1a17["Serde"] {
  serialize()
  deserialize()
}
class tb6d1e408057f["Base64Serde"] {
  serialize()
  deserialize()
}
class td8a94fefdf74["PakoSerde"] {
  serialize()
  deserialize()
  pako_deflate()
  pako_inflate()
}
class t3d10982f0435["Layout"] {
}
class tda3378b45b31["Theme"] {
}
class tc157562f2b44["PlantUMLError"] {
}
class t0b0db7ecf15c["PlantUMLConnectionError"] {
}
class bda110f9bf6d7["BaseModel"] {
  <<unresolved_base>>
}
bda110f9bf6d7 <|-- te235e58dd5f7
class b03e969ca3e08["Exception"] {
  <<unresolved_base>>
}
b03e969ca3e08 <|-- t4e73a5f77051
t4e73a5f77051 <|-- t7b9c286d0daa
t4e73a5f77051 <|-- t125669ef086e
t8bdd6c0a1a17 <|-- tb6d1e408057f
t8bdd6c0a1a17 <|-- td8a94fefdf74
class bb5991911b5e9["Enum"] {
  <<unresolved_base>>
}
bb5991911b5e9 <|-- t3d10982f0435
bb5991911b5e9 <|-- tda3378b45b31
class b864a57f6df91["Exception"] {
  <<unresolved_base>>
}
b864a57f6df91 <|-- tc157562f2b44
tc157562f2b44 <|-- t0b0db7ecf15c

Unresolved bases remain labelled; full signatures are not reconstructed.

10. Reference

17 / 17 eligible files read (35 in the tree); 0 oversized, 0 failed reads and 0 syntax diagnostics.

What the scan covers

Known dependency/build folders, credential files and binaries are excluded. The scan covers READMEs, recognized manifests and parser-supported source files.

Linguist statistics cover the whole repository and may include other languages.

12. Files to read 3

13. Glossary

Repository

The versioned source files, configuration, and history of a project.

README

The repository’s entry document, usually covering its purpose and initial setup.

Dependency

A library, tool, or service that another component needs to build or run.

HTTP

A request-and-response protocol used by browsers and web services. A method, path, headers, and optional body describe a request.

Build

The steps that turn source files and dependencies into a runnable program or distributable artifact.

Mermaid

A text-based diagram language. Nodes and connections describe a model; the diagram itself does not execute the project.

GPU

A processor designed for parallel workloads, including graphics rendering and many numerical operations.

Backend

An implementation behind a shared interface. Depending on context, it can mean a server-side service or a graphics, input, or storage implementation.

14. References

  1. antoinebou12. (2026, November 5). D2COpenAIPlugin. [Software repository] github.com.
  2. antoinebou12. (2026, November 5). D2COpenAIPlugin: README. [Repository documentation] github.com.
  3. antoinebou12. (2026, November 5). app.py. [Source file] github.com.
  4. antoinebou12. (2026, November 5). kroki/kroki.py. [Source file] github.com.
  5. antoinebou12. (2026, November 5). mermaid/mermaid.py. [Source file] github.com.
  6. Boucher, A. (2022, September 6). D2C OpenAI plugin — diagrams with PlantUML, Mermaid, and D2. [Project article] antoineboucher.info.
  7. Boucher, A. (2025, October 24). 25k uses for the diagram tool on the GPT Store. [Project article] antoineboucher.info.
  8. Boucher, A. (2021, September 6). D2COpenAIPlugin. [Project article] antoineboucher.info.
  9. Boucher, A. (2026, October 23). D2COpenAIPlugin: Routing text to diagram backends. [Project article] antoineboucher.info.
  10. Boucher, A. (2026, September 2). uml-mcp. [Project article] antoineboucher.info.

Sources without a publication date show the date they were last checked, November 5, 2026. File links retain the inspected revision where available.