# openc4rd/opencard architecture

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

- Interactive diagram: https://gitdiagram.com/openc4rd/opencard
- Repository: https://github.com/openc4rd/opencard

## Overview

OpenCard is a desktop card-design workbench. Its documented workflow is to open a project, define a reusable card blueprint, create and edit instances, manage shared fonts/icons/dictionary text, and iterate or export. The graph preserves those domain stages and major supporting capabilities. Edges from the README reflect documented workflow; source-level edges use the supplied excerpts or SOURCE INDEX. Unsampled subsystems are represented by supported directory paths, with uncertain implementation links omitted.

Main entry points: [`opencard-app/src/features/card-rendering/renderPipeline.ts`](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/card-rendering/renderPipeline.ts) (Render preparation), [`opencard-app/src/features/workspace/store/projectStore.ts`](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/store/projectStore.ts) (Project state), [`opencard-app/src/main.ts`](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/main.ts) (Desktop application), [`opencard-app/src/entities/card/model.ts`](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/entities/card/model.ts) (Card blueprint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["Desktop application<br/>[main.ts]"]
  node_shellui["Workspace navigation<br/>[OpenCardShell.vue]"]
end

subgraph group_project["Project workspace"]
  node_projectstore["Project state<br/>[projectStore.ts]"]
  node_filesystem["Project file access"]
  node_projectstructure["Project structure"]
end

subgraph group_design["Card design"]
  node_blueprint["Card blueprint<br/>[model.ts]"]
  node_instances["Card instances<br/>[instance.ts]"]
  node_designerui["Visual editor"]
  node_renderpipeline["Render preparation<br/>[renderPipeline.ts]"]
  node_renderers["Card canvas rendering"]
end

subgraph group_resources["Shared resources"]
  node_dictionary["Project dictionary"]
  node_fonts["Font resources"]
  node_icons["Icon resources"]
  node_resourcepackages["Resource packages<br/>[resourcePackage.ts]"]
  node_networkcache[("Network resource cache")]
end

subgraph group_support["Supporting capabilities"]
  node_export["Project export<br/>[exportRunner.ts]"]
  node_templates["Project templates"]
  node_versioncontrol["Version control<br/>[gitService.ts]"]
  node_feedback["Feedback service<br/>[index.ts]"]
end

node_designer(("Card designers"))

node_designer -->|"uses"| node_app
node_app -.->|"starts"| node_shellui
node_shellui -->|"opens project"| node_projectstore
node_projectstore -.->|"reads project"| node_filesystem
node_projectstore -.->|"uses structure"| node_projectstructure
node_designer -->|"designs"| node_blueprint
node_designer -->|"edits visually"| node_designerui
node_designerui -.->|"edits blueprint"| node_blueprint
node_blueprint -->|"creates instances"| node_instances
node_designer -->|"fills content"| node_instances
node_renderpipeline -->|"applies instance"| node_instances
node_renderpipeline -.->|"prepares render"| node_renderers
node_renderpipeline -->|"resolves icons"| node_icons
node_renderpipeline -->|"resolves bindings"| node_dictionary
node_designer -->|"maintains text"| node_dictionary
node_designer -->|"registers fonts"| node_fonts
node_designer -->|"registers icon sets"| node_icons
node_projectstore -.->|"manages packages"| node_resourcepackages
node_designer -->|"exports project"| node_export
node_designer -.->|"uses templates"| node_templates
node_designer -->|"uses Git"| node_versioncontrol
node_app -->|"prunes cache"| node_networkcache
node_designer -.->|"submits feedback"| node_feedback

click node_app "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/main.ts"
click node_shellui "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/shell/OpenCardShell.vue"
click node_projectstore "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/store/projectStore.ts"
click node_filesystem "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/services/fileSystemService.ts"
click node_projectstructure "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/projectStructure.ts"
click node_blueprint "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/entities/card/model.ts"
click node_instances "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/entities/card/instance.ts"
click node_designerui "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/card-designer/CardDesignEditor.vue"
click node_renderpipeline "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/card-rendering/renderPipeline.ts"
click node_renderers "https://github.com/openc4rd/opencard/tree/main/opencard-app/src/features/card-rendering/components"
click node_dictionary "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/projectDictionary.ts"
click node_fonts "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/projectFontRegistry.ts"
click node_icons "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/services/projectIconCatalog.ts"
click node_resourcepackages "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/resourcePackage.ts"
click node_networkcache "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/network-resources/services/networkResourceCacheService.ts"
click node_export "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/exporting/exportRunner.ts"
click node_templates "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/project-templates/services/projectTemplateService.ts"
click node_versioncontrol "https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/version-control/gitService.ts"
click node_feedback "https://github.com/openc4rd/opencard/blob/main/services/feedback-worker/src/index.ts"

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_shellui toneBlue
class node_projectstore,node_filesystem,node_projectstructure toneAmber
class node_blueprint,node_instances,node_designerui,node_renderpipeline,node_renderers toneMint
class node_dictionary,node_fonts,node_icons,node_resourcepackages,node_networkcache toneRose
class node_export,node_templates,node_versioncontrol,node_feedback,node_designer toneIndigo
```

## Components

### App shell

- [Desktop application](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/main.ts): `opencard-app/src/main.ts`
- [Workspace navigation](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/shell/OpenCardShell.vue): `opencard-app/src/features/shell/OpenCardShell.vue`

### Project workspace

- [Project state](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/store/projectStore.ts): `opencard-app/src/features/workspace/store/projectStore.ts`
- [Project file access](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/services/fileSystemService.ts): `opencard-app/src/features/workspace/services/fileSystemService.ts`
- [Project structure](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/projectStructure.ts): `opencard-app/src/features/workspace/model/projectStructure.ts`

### Card design

- [Card blueprint](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/entities/card/model.ts): `opencard-app/src/entities/card/model.ts`
- [Card instances](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/entities/card/instance.ts): `opencard-app/src/entities/card/instance.ts`
- [Visual editor](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/card-designer/CardDesignEditor.vue): `opencard-app/src/features/card-designer/CardDesignEditor.vue`
- [Render preparation](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/card-rendering/renderPipeline.ts): `opencard-app/src/features/card-rendering/renderPipeline.ts`
- [Card canvas rendering](https://github.com/openc4rd/opencard/tree/main/opencard-app/src/features/card-rendering/components): `opencard-app/src/features/card-rendering/components`

### Shared resources

- [Project dictionary](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/projectDictionary.ts): `opencard-app/src/features/workspace/model/projectDictionary.ts`
- [Font resources](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/projectFontRegistry.ts): `opencard-app/src/features/workspace/model/projectFontRegistry.ts`
- [Icon resources](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/services/projectIconCatalog.ts): `opencard-app/src/features/workspace/services/projectIconCatalog.ts`
- [Resource packages](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/workspace/model/resourcePackage.ts): `opencard-app/src/features/workspace/model/resourcePackage.ts`
- [Network resource cache](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/network-resources/services/networkResourceCacheService.ts): `opencard-app/src/features/network-resources/services/networkResourceCacheService.ts`

### Supporting capabilities

- [Project export](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/exporting/exportRunner.ts): `opencard-app/src/features/exporting/exportRunner.ts`
- [Project templates](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/project-templates/services/projectTemplateService.ts): `opencard-app/src/features/project-templates/services/projectTemplateService.ts`
- [Version control](https://github.com/openc4rd/opencard/blob/main/opencard-app/src/features/version-control/gitService.ts): `opencard-app/src/features/version-control/gitService.ts`
- [Feedback service](https://github.com/openc4rd/opencard/blob/main/services/feedback-worker/src/index.ts): `services/feedback-worker/src/index.ts`

### Other components

- **Card designers**

## Connections

- Card designers → Desktop application: uses (evidence: `README.md`)
- Desktop application → Workspace navigation: starts
- Workspace navigation → Project state: opens project (evidence: `README.md`)
- Project state → Project file access: reads project
- Project state → Project structure: uses structure
- Card designers → Card blueprint: designs (evidence: `README.md`)
- Card designers → Visual editor: edits visually (evidence: `README.md`)
- Visual editor → Card blueprint: edits blueprint
- Card blueprint → Card instances: creates instances (evidence: `README.md`)
- Card designers → Card instances: fills content (evidence: `README.md`)
- Render preparation → Card instances: applies instance (evidence: `opencard-app/src/features/card-rendering/renderPipeline.ts`)
- Render preparation → Card canvas rendering: prepares render
- Render preparation → Icon resources: resolves icons (evidence: `opencard-app/src/features/card-rendering/renderPipeline.ts`)
- Render preparation → Project dictionary: resolves bindings (evidence: `opencard-app/src/features/card-rendering/renderPipeline.ts`)
- Card designers → Project dictionary: maintains text (evidence: `README.md`)
- Card designers → Font resources: registers fonts (evidence: `README.md`)
- Card designers → Icon resources: registers icon sets (evidence: `README.md`)
- Project state → Resource packages: manages packages
- Card designers → Project export: exports project (evidence: `README.md`)
- Card designers → Project templates: uses templates
- Card designers → Version control: uses Git (evidence: `README.md`)
- Desktop application → Network resource cache: prunes cache
- Card designers → Feedback service: submits feedback
