# rinkokawa/uml-oj architecture

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

- Interactive diagram: https://gitdiagram.com/rinkokawa/uml-oj
- Repository: https://github.com/rinkokawa/uml-oj
- Video tour (about a minute): https://gitdiagram.com/rinkokawa/uml-oj/video

## Overview

UML OJ is a browser-based UML practice and autograding application. Learners choose a tutorial or challenge, model a class diagram in the native canvas or PlantUML/Mermaid source, and submit a shared diagram model for per-requirement results. The app also supports local drafts and progress, source/canvas synchronization, member editing, and downloadable backups. The documented workflow and sampled imports establish the main connections; some UI-internal behaviors and storage wiring are not fully shown, so those links are omitted where their ownership is unclear.

Main entry points: [`src/App.vue`](https://github.com/rinkokawa/uml-oj/blob/main/src/App.vue) (Practice Workspace), [`src/uml/model.ts`](https://github.com/rinkokawa/uml-oj/blob/main/src/uml/model.ts) (Diagram Model), [`src/NativeCanvas.vue`](https://github.com/rinkokawa/uml-oj/blob/main/src/NativeCanvas.vue) (Native Canvas), [`src/judge.ts`](https://github.com/rinkokawa/uml-oj/blob/main/src/judge.ts) (Test Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_practice["Practice Content"]
  node_problems["Problem Catalog<br/>[problems.ts]"]
end

subgraph group_workspace["Modeling Workspace"]
  node_entry["Application Entry<br/>[main.ts]"]
  node_app["Practice Workspace<br/>[App.vue]"]
  node_canvas["Native Canvas<br/>[NativeCanvas.vue]"]
  node_member_editor["Member Editor<br/>[member-editor.ts]"]
end

subgraph group_uml["UML Processing"]
  node_diagram_model["Diagram Model<br/>[model.ts]"]
  node_conversion["PlantUML Parser<br/>[conversion.ts]"]
  node_plantuml["PlantUML Adapter<br/>[plantuml.ts]"]
  node_mermaid["Mermaid Adapter<br/>[mermaid.ts]"]
  node_drawio["Legacy draw.io Adapter<br/>[drawio.ts]"]
end

subgraph group_assessment["Assessment and State"]
  node_judge["Test Runner<br/>[judge.ts]"]
  node_browser_storage[("Browser Storage")]
  node_report["Test Results<br/>[App.vue]"]
  node_backup["Draft Backup<br/>[App.vue]"]
end

node_learner(("Learner"))

node_learner -->|"chooses and edits"| node_app
node_entry -->|"mounts"| node_app
node_app -->|"loads problems"| node_problems
node_app -->|"renders editor"| node_canvas
node_canvas -->|"validates diagrams"| node_diagram_model
node_canvas -->|"edits members"| node_member_editor
node_app -->|"parses and writes"| node_plantuml
node_app -->|"parses and writes"| node_mermaid
node_plantuml -->|"delegates parsing"| node_conversion
node_plantuml -->|"validates model"| node_diagram_model
node_conversion -->|"validates diagrams"| node_diagram_model
node_mermaid -->|"validates model"| node_diagram_model
node_app -->|"submits model"| node_judge
node_judge -->|"reads requirements"| node_problems
node_judge -->|"accepts diagram"| node_diagram_model
node_judge -->|"returns test results"| node_report
node_app -->|"stores local drafts"| node_browser_storage
node_canvas -->|"stores pending edits"| node_browser_storage
node_app -->|"downloads draft"| node_backup

click node_entry "https://github.com/rinkokawa/uml-oj/blob/main/src/main.ts"
click node_app "https://github.com/rinkokawa/uml-oj/blob/main/src/App.vue"
click node_canvas "https://github.com/rinkokawa/uml-oj/blob/main/src/NativeCanvas.vue"
click node_member_editor "https://github.com/rinkokawa/uml-oj/blob/main/src/uml/member-editor.ts"
click node_problems "https://github.com/rinkokawa/uml-oj/blob/main/src/problems.ts"
click node_diagram_model "https://github.com/rinkokawa/uml-oj/blob/main/src/uml/model.ts"
click node_conversion "https://github.com/rinkokawa/uml-oj/blob/main/src/conversion.ts"
click node_plantuml "https://github.com/rinkokawa/uml-oj/blob/main/src/uml/adapters/plantuml.ts"
click node_mermaid "https://github.com/rinkokawa/uml-oj/blob/main/src/uml/adapters/mermaid.ts"
click node_drawio "https://github.com/rinkokawa/uml-oj/blob/main/src/uml/adapters/drawio.ts"
click node_judge "https://github.com/rinkokawa/uml-oj/blob/main/src/judge.ts"
click node_report "https://github.com/rinkokawa/uml-oj/blob/main/src/App.vue"
click node_backup "https://github.com/rinkokawa/uml-oj/blob/main/src/App.vue"

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_problems toneBlue
class node_entry,node_app,node_canvas,node_member_editor toneAmber
class node_diagram_model,node_conversion,node_plantuml,node_mermaid,node_drawio toneMint
class node_judge,node_browser_storage,node_report,node_backup toneRose
class node_learner toneIndigo
```

## Components

### Practice Content

- [Problem Catalog](https://github.com/rinkokawa/uml-oj/blob/main/src/problems.ts): `src/problems.ts`

### Modeling Workspace

- [Application Entry](https://github.com/rinkokawa/uml-oj/blob/main/src/main.ts): `src/main.ts`
- [Practice Workspace](https://github.com/rinkokawa/uml-oj/blob/main/src/App.vue): `src/App.vue`
- [Native Canvas](https://github.com/rinkokawa/uml-oj/blob/main/src/NativeCanvas.vue): `src/NativeCanvas.vue`
- [Member Editor](https://github.com/rinkokawa/uml-oj/blob/main/src/uml/member-editor.ts): `src/uml/member-editor.ts`

### UML Processing

- [Diagram Model](https://github.com/rinkokawa/uml-oj/blob/main/src/uml/model.ts): `src/uml/model.ts`
- [PlantUML Parser](https://github.com/rinkokawa/uml-oj/blob/main/src/conversion.ts): `src/conversion.ts`
- [PlantUML Adapter](https://github.com/rinkokawa/uml-oj/blob/main/src/uml/adapters/plantuml.ts): `src/uml/adapters/plantuml.ts`
- [Mermaid Adapter](https://github.com/rinkokawa/uml-oj/blob/main/src/uml/adapters/mermaid.ts): `src/uml/adapters/mermaid.ts`
- [Legacy draw.io Adapter](https://github.com/rinkokawa/uml-oj/blob/main/src/uml/adapters/drawio.ts): `src/uml/adapters/drawio.ts`

### Assessment and State

- [Test Runner](https://github.com/rinkokawa/uml-oj/blob/main/src/judge.ts): `src/judge.ts`
- **Browser Storage**
- [Test Results](https://github.com/rinkokawa/uml-oj/blob/main/src/App.vue): `src/App.vue`
- [Draft Backup](https://github.com/rinkokawa/uml-oj/blob/main/src/App.vue): `src/App.vue`

### Other components

- **Learner**

## Connections

- Learner → Practice Workspace: chooses and edits (evidence: `README.md`)
- Application Entry → Practice Workspace: mounts (evidence: `src/main.ts`)
- Practice Workspace → Problem Catalog: loads problems (evidence: `src/App.vue`)
- Practice Workspace → Native Canvas: renders editor (evidence: `src/App.vue`)
- Native Canvas → Diagram Model: validates diagrams (evidence: `src/NativeCanvas.vue`)
- Native Canvas → Member Editor: edits members (evidence: `src/NativeCanvas.vue`)
- Practice Workspace → PlantUML Adapter: parses and writes (evidence: `src/App.vue`)
- Practice Workspace → Mermaid Adapter: parses and writes (evidence: `src/App.vue`)
- PlantUML Adapter → PlantUML Parser: delegates parsing (evidence: `src/uml/adapters/plantuml.ts`)
- PlantUML Adapter → Diagram Model: validates model (evidence: `src/uml/adapters/plantuml.ts`)
- PlantUML Parser → Diagram Model: validates diagrams (evidence: `src/conversion.ts`)
- Mermaid Adapter → Diagram Model: validates model (evidence: `src/uml/adapters/mermaid.ts`)
- Practice Workspace → Test Runner: submits model (evidence: `src/App.vue`)
- Test Runner → Problem Catalog: reads requirements (evidence: `src/judge.ts`)
- Test Runner → Diagram Model: accepts diagram (evidence: `src/judge.ts`)
- Test Runner → Test Results: returns test results (evidence: `src/judge.ts`)
- Practice Workspace → Browser Storage: stores local drafts (evidence: `README.md`)
- Native Canvas → Browser Storage: stores pending edits (evidence: `src/NativeCanvas.vue`)
- Practice Workspace → Draft Backup: downloads draft (evidence: `README.md`)
