# fullbleed-engine/fullbleed-official architecture

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

- Interactive diagram: https://gitdiagram.com/fullbleed-engine/fullbleed-official
- Repository: https://github.com/fullbleed-engine/fullbleed-official

## Overview

Fullbleed is a deterministic HTML/CSS-to-PDF engine with Python and Rust APIs, plus a Python CLI and authoring components. The principal workflow accepts document markup and styles, lays them out, produces PDF bytes, and can generate previews; the CLI adds project, variable-data, and print-profile workflows. Accessibility auditing and component authoring are major supporting capabilities. The graph reflects README claims and source-index references; many runtime internals were not sampled, so uncertain implementation links are omitted.

Main entry points: [`src/canvas.rs`](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/canvas.rs) (Page drawing), [`python/fullbleed/__init__.py`](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/__init__.py) (Python API), [`src/pdf.rs`](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/pdf.rs) (PDF generation), [`python/fullbleed_cli/cli.py`](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed_cli/cli.py) (Python CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Document authoring"]
  node_html_css["HTML and CSS input"]
  node_components["Python UI components<br/>[core.py]"]
  node_ui_accessibility["Component accessibility<br/>[accessibility.py]"]
end

subgraph group_engine["Rendering engine"]
  node_html_parse["HTML parsing<br/>[html_dom.rs]"]
  node_css["CSS processing<br/>[css_native.rs]"]
  node_layout["Layout and flow<br/>[flowable.rs]"]
  node_canvas["Page drawing<br/>[canvas.rs]"]
  node_tables["Table semantics<br/>[table_semantics.rs]"]
  node_images["Image decoding<br/>[image_native.rs]"]
  node_fonts["Font parsing<br/>[sfnt.rs]"]
end

subgraph group_output["PDF and previews"]
  node_pdf["PDF generation<br/>[pdf.rs]"]
  node_pdf_links["PDF links<br/>[pdf_links.rs]"]
  node_raster["Raster previews<br/>[raster.rs]"]
  node_authoring_preview["In-memory preview<br/>[authoring.rs]"]
end

subgraph group_accessibility["Accessibility"]
  node_accessibility_engine["Accessibility engine<br/>[engine.py]"]
  node_audit["PDF audit<br/>[audit_prototype.py]"]
  node_audit_contract["Audit contract<br/>[lib.rs]"]
end

subgraph group_interfaces["APIs and CLI"]
  node_python_api["Python API<br/>[__init__.py]"]
  node_python_abi["Python ABI dispatch<br/>[abi_exports.rs]"]
  node_rust_api["Rust API<br/>[lib.rs]"]
  node_cli["Python CLI<br/>[cli.py]"]
end

node_user(("Document author"))
node_external_services["Optional JS and .NET packages"]

node_user -->|"provides markup"| node_html_css
node_user -->|"authors with"| node_components
node_html_css -->|"renders via"| node_python_api
node_python_api -.->|"binds through"| node_python_abi
node_python_abi -->|"dispatches operations"| node_css
node_components -->|"uses"| node_ui_accessibility
node_ui_accessibility -->|"uses primitives"| node_components
node_rust_api -->|"renders markup"| node_html_css
node_html_css -.->|"parsed by"| node_html_parse
node_html_css -.->|"styles processed"| node_css
node_layout -->|"feeds drawing"| node_canvas
node_canvas -->|"uses flowables"| node_layout
node_canvas -->|"uses semantics"| node_tables
node_canvas -->|"uses link handling"| node_pdf_links
node_images -.->|"supports PDF assets"| node_pdf
node_fonts -.->|"supports font handling"| node_pdf
node_pdf -.->|"previews output"| node_raster
node_authoring_preview -->|"uses drawing"| node_canvas
node_authoring_preview -->|"uses PDF generation"| node_pdf
node_accessibility_engine -->|"uses engine API"| node_python_api
node_audit -->|"uses engine API"| node_python_api
node_audit -.->|"uses contract"| node_audit_contract
node_cli -->|"renders documents"| node_python_api
node_cli -.->|"offers accessibility workflows"| node_accessibility_engine
node_user -->|"runs commands"| node_cli
node_external_services -.->|"integrate optionally"| node_rust_api

click node_components "https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/ui/core.py"
click node_ui_accessibility "https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/ui/accessibility.py"
click node_html_parse "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/html_dom.rs"
click node_css "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/css_native.rs"
click node_layout "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/flowable.rs"
click node_canvas "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/canvas.rs"
click node_tables "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/table_semantics.rs"
click node_images "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/image_native.rs"
click node_fonts "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/sfnt.rs"
click node_pdf "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/pdf.rs"
click node_pdf_links "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/pdf_links.rs"
click node_raster "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/raster.rs"
click node_authoring_preview "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/authoring.rs"
click node_accessibility_engine "https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/accessibility/engine.py"
click node_audit "https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/audit_prototype.py"
click node_audit_contract "https://github.com/fullbleed-engine/fullbleed-official/blob/master/crates/fullbleed_audit_contract/src/lib.rs"
click node_python_api "https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/__init__.py"
click node_python_abi "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/python/abi_exports.rs"
click node_rust_api "https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/lib.rs"
click node_cli "https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed_cli/cli.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_html_css,node_components,node_ui_accessibility toneBlue
class node_html_parse,node_css,node_layout,node_canvas,node_tables,node_images,node_fonts toneAmber
class node_pdf,node_pdf_links,node_raster,node_authoring_preview toneMint
class node_accessibility_engine,node_audit,node_audit_contract toneRose
class node_python_api,node_python_abi,node_rust_api,node_cli,node_user,node_external_services toneIndigo
```

## Components

### Document authoring

- **HTML and CSS input**
- [Python UI components](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/ui/core.py): `python/fullbleed/ui/core.py`
- [Component accessibility](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/ui/accessibility.py): `python/fullbleed/ui/accessibility.py`

### Rendering engine

- [HTML parsing](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/html_dom.rs): `src/html_dom.rs`
- [CSS processing](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/css_native.rs): `src/css_native.rs`
- [Layout and flow](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/flowable.rs): `src/flowable.rs`
- [Page drawing](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/canvas.rs): `src/canvas.rs`
- [Table semantics](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/table_semantics.rs): `src/table_semantics.rs`
- [Image decoding](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/image_native.rs): `src/image_native.rs`
- [Font parsing](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/sfnt.rs): `src/sfnt.rs`

### PDF and previews

- [PDF generation](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/pdf.rs): `src/pdf.rs`
- [PDF links](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/pdf_links.rs): `src/pdf_links.rs`
- [Raster previews](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/raster.rs): `src/raster.rs`
- [In-memory preview](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/authoring.rs): `src/authoring.rs`

### Accessibility

- [Accessibility engine](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/accessibility/engine.py): `python/fullbleed/accessibility/engine.py`
- [PDF audit](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/audit_prototype.py): `python/fullbleed/audit_prototype.py`
- [Audit contract](https://github.com/fullbleed-engine/fullbleed-official/blob/master/crates/fullbleed_audit_contract/src/lib.rs): `crates/fullbleed_audit_contract/src/lib.rs`

### APIs and CLI

- [Python API](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed/__init__.py): `python/fullbleed/__init__.py`
- [Python ABI dispatch](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/python/abi_exports.rs): `src/python/abi_exports.rs`
- [Rust API](https://github.com/fullbleed-engine/fullbleed-official/blob/master/src/lib.rs): `src/lib.rs`
- [Python CLI](https://github.com/fullbleed-engine/fullbleed-official/blob/master/python/fullbleed_cli/cli.py): `python/fullbleed_cli/cli.py`

### Other components

- **Document author**
- **Optional JS and .NET packages**

## Connections

- Document author → HTML and CSS input: provides markup
- Document author → Python UI components: authors with
- HTML and CSS input → Python API: renders via
- Python API → Python ABI dispatch: binds through
- Python ABI dispatch → CSS processing: dispatches operations (evidence: `src/python/abi_exports.rs`)
- Python UI components → Component accessibility: uses (evidence: `python/fullbleed/ui/accessibility.py`)
- Component accessibility → Python UI components: uses primitives (evidence: `python/fullbleed/ui/accessibility.py`)
- Rust API → HTML and CSS input: renders markup
- HTML and CSS input → HTML parsing: parsed by
- HTML and CSS input → CSS processing: styles processed
- Layout and flow → Page drawing: feeds drawing (evidence: `src/canvas.rs`)
- Page drawing → Layout and flow: uses flowables (evidence: `src/canvas.rs`)
- Page drawing → Table semantics: uses semantics (evidence: `src/canvas.rs`)
- Page drawing → PDF links: uses link handling (evidence: `src/canvas.rs`)
- Image decoding → PDF generation: supports PDF assets
- Font parsing → PDF generation: supports font handling
- PDF generation → Raster previews: previews output
- In-memory preview → Page drawing: uses drawing (evidence: `src/authoring.rs`)
- In-memory preview → PDF generation: uses PDF generation (evidence: `src/authoring.rs`)
- Accessibility engine → Python API: uses engine API (evidence: `python/fullbleed/accessibility/engine.py`)
- PDF audit → Python API: uses engine API (evidence: `python/fullbleed/audit_prototype.py`)
- PDF audit → Audit contract: uses contract
- Python CLI → Python API: renders documents (evidence: `python/fullbleed_cli/cli.py`)
- Python CLI → Accessibility engine: offers accessibility workflows
- Document author → Python CLI: runs commands
- Optional JS and .NET packages → Rust API: integrate optionally
