# rumunius/gingerworkbenchpro architecture

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

- Interactive diagram: https://gitdiagram.com/rumunius/gingerworkbenchpro
- Repository: https://github.com/rumunius/gingerworkbenchpro

## Overview

Ginger Workbench Pro is a local research application for reading and annotating Ginger dictionary and corpus data. A researcher uses the Vue interface to search dictionary entries, edit glosses, review and translate passages, and run text through the Playground; the frontend sends requests to FastAPI, which serves the relevant data and operations. Separate graph views expose definition references and workspace layouts, while POS inference supports dictionary and corpus analysis. The README documents the broader capabilities; sampled excerpts do not show every endpoint implementation, so uncertain internal wiring is omitted.

Main entry points: [`backend/app.py`](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/app.py) (FastAPI endpoints), [`frontend/src/App.vue`](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/App.vue) (Dictionary view), [`frontend/src/main.js`](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/main.js) (Route setup), [`frontend/src/CorpusPage.vue`](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/CorpusPage.vue) (Corpus review)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Research interface"]
  node_router["Route setup<br/>[main.js]"]
  node_dictionary_ui["Dictionary view<br/>[App.vue]"]
  node_corpus_ui["Corpus review<br/>[CorpusPage.vue]"]
  node_graph_ui["Graph and workspaces<br/>[GraphPage.vue]"]
  node_playground_ui["Playground dialog"]
  node_transfer_ui["Gloss transfer<br/>[TransferDialog.vue]"]
  node_token_view["Token rendering<br/>[TokenView.vue]"]
end

subgraph group_api["Application API"]
  node_api["FastAPI endpoints<br/>[app.py]"]
  node_gingerzh["Gloss packages<br/>[gingerzh.py]"]
end

subgraph group_analysis["Language analysis"]
  node_tokenizer["Ginger tokenizer<br/>[tokenizer.py]"]
  node_pos_pipeline["POS inference"]
  node_graph_service["Reference graph<br/>[graph_service.py]"]
end

subgraph group_persistence["Local state and data"]
  node_user_state["User preferences<br/>[user_state.py]"]
  node_dictionary_data[("Dictionary and corpus")]
  node_user_state_data[("Local user state<br/>[user_state.py]")]
end

node_researcher(("Researcher"))

node_researcher -->|"opens app"| node_router
node_router -->|"routes to"| node_dictionary_ui
node_router -->|"routes to"| node_corpus_ui
node_router -->|"routes to"| node_graph_ui
node_dictionary_ui -->|"requests dictionary"| node_api
node_dictionary_ui -->|"opens"| node_playground_ui
node_dictionary_ui -->|"opens"| node_transfer_ui
node_dictionary_ui -->|"renders tokens"| node_token_view
node_corpus_ui -->|"requests corpus"| node_api
node_graph_ui -->|"requests graph and workspaces"| node_api
node_playground_ui -->|"requests tagging"| node_api
node_transfer_ui -->|"requests gloss transfer"| node_api
node_api -->|"reads and updates"| node_dictionary_data
node_api -->|"tokenizes text"| node_tokenizer
node_api -->|"requests POS inference"| node_pos_pipeline
node_api -->|"requests graph data"| node_graph_service
node_api -->|"validates packages"| node_gingerzh
node_api -->|"loads and saves state"| node_user_state
node_user_state -->|"persists preferences"| node_user_state_data
node_graph_service -->|"reads definitions"| node_dictionary_data

click node_router "https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/main.js"
click node_dictionary_ui "https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/App.vue"
click node_corpus_ui "https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/CorpusPage.vue"
click node_graph_ui "https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/GraphPage.vue"
click node_playground_ui "https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/PlaygroundDialog.vue"
click node_transfer_ui "https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/TransferDialog.vue"
click node_token_view "https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/TokenView.vue"
click node_api "https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/app.py"
click node_tokenizer "https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/tokenizer.py"
click node_pos_pipeline "https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/ginger_pos_pipeline.py"
click node_graph_service "https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/graph_service.py"
click node_gingerzh "https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/gingerzh.py"
click node_user_state "https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/user_state.py"
click node_dictionary_data "https://github.com/rumunius/gingerworkbenchpro/tree/main/data"
click node_user_state_data "https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/user_state.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_router,node_dictionary_ui,node_corpus_ui,node_graph_ui,node_playground_ui,node_transfer_ui,node_token_view toneBlue
class node_api,node_gingerzh toneAmber
class node_tokenizer,node_pos_pipeline,node_graph_service toneMint
class node_user_state,node_dictionary_data,node_user_state_data toneRose
class node_researcher toneIndigo
```

## Components

### Research interface

- [Route setup](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/main.js): `frontend/src/main.js`
- [Dictionary view](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Corpus review](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/CorpusPage.vue): `frontend/src/CorpusPage.vue`
- [Graph and workspaces](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/GraphPage.vue): `frontend/src/GraphPage.vue`
- [Playground dialog](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/PlaygroundDialog.vue): `frontend/src/PlaygroundDialog.vue`
- [Gloss transfer](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/TransferDialog.vue): `frontend/src/TransferDialog.vue`
- [Token rendering](https://github.com/rumunius/gingerworkbenchpro/blob/main/frontend/src/TokenView.vue): `frontend/src/TokenView.vue`

### Application API

- [FastAPI endpoints](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/app.py): `backend/app.py`
- [Gloss packages](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/gingerzh.py): `backend/gingerzh.py`

### Language analysis

- [Ginger tokenizer](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/tokenizer.py): `backend/tokenizer.py`
- [POS inference](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/ginger_pos_pipeline.py): `backend/ginger_pos_pipeline.py`
- [Reference graph](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/graph_service.py): `backend/graph_service.py`

### Local state and data

- [User preferences](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/user_state.py): `backend/user_state.py`
- [Dictionary and corpus](https://github.com/rumunius/gingerworkbenchpro/tree/main/data): `data`
- [Local user state](https://github.com/rumunius/gingerworkbenchpro/blob/main/backend/user_state.py): `backend/user_state.py`

### Other components

- **Researcher**

## Connections

- Researcher → Route setup: opens app
- Route setup → Dictionary view: routes to
- Route setup → Corpus review: routes to
- Route setup → Graph and workspaces: routes to
- Dictionary view → FastAPI endpoints: requests dictionary
- Dictionary view → Playground dialog: opens
- Dictionary view → Gloss transfer: opens
- Dictionary view → Token rendering: renders tokens
- Corpus review → FastAPI endpoints: requests corpus
- Graph and workspaces → FastAPI endpoints: requests graph and workspaces
- Playground dialog → FastAPI endpoints: requests tagging
- Gloss transfer → FastAPI endpoints: requests gloss transfer
- FastAPI endpoints → Dictionary and corpus: reads and updates
- FastAPI endpoints → Ginger tokenizer: tokenizes text
- FastAPI endpoints → POS inference: requests POS inference
- FastAPI endpoints → Reference graph: requests graph data
- FastAPI endpoints → Gloss packages: validates packages
- FastAPI endpoints → User preferences: loads and saves state
- User preferences → Local user state: persists preferences
- Reference graph → Dictionary and corpus: reads definitions
