# useminim/project architecture

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

- Interactive diagram: https://gitdiagram.com/useminim/project
- Repository: https://github.com/useminim/project

## Overview

minim is a desktop document-automation application. The documented workflow identifies a document type with a trigger, then runs configured actions such as renaming, moving, converting, extracting text, or emailing. Documents stay local unless a configured action sends them elsewhere; cloud synchronization is limited to metadata. The sampled implementation is largely scaffold code, so workflow components and their documented relationships are represented at the crate-directory level. The README describes these capabilities, but their runtime wiring is not shown in the sampled source.

Main entry points: [`crates/core`](https://github.com/useminim/project/tree/main/crates/core) (Action chain), [`crates/core/src/lib.rs`](https://github.com/useminim/project/blob/main/crates/core/src/lib.rs) (Workflow engine), [`apps/desktop/src/App.tsx`](https://github.com/useminim/project/blob/main/apps/desktop/src/App.tsx) (React interface), [`crates/extract/src/lib.rs`](https://github.com/useminim/project/blob/main/crates/extract/src/lib.rs) (Text extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_desktop_entry["Desktop runtime<br/>[lib.rs]"]
  node_ui["React interface<br/>[App.tsx]"]
end

subgraph group_workflow["Workflow engine"]
  node_workflow["Workflow engine<br/>[lib.rs]"]
  node_trigger["Document trigger"]
  node_action_chain["Action chain"]
end

subgraph group_documents["Document processing"]
  node_file_actions["File actions"]
  node_text_extraction["Text extraction<br/>[lib.rs]"]
  node_local_documents[("Local documents")]
end

subgraph group_sync["Metadata sync"]
  node_sync_types["Sync metadata types<br/>[lib.rs]"]
end

node_user(("User"))
node_email["Email service"]
node_cloud["Cloud service"]

node_user -->|"uses"| node_ui
node_desktop_entry -.->|"hosts"| node_ui
node_ui -.->|"configures"| node_workflow
node_workflow -->|"identifies type"| node_trigger
node_workflow -->|"runs actions"| node_action_chain
node_action_chain -->|"renames, moves, converts"| node_file_actions
node_action_chain -->|"extracts text"| node_text_extraction
node_action_chain -->|"sends email"| node_email
node_file_actions -->|"operates on"| node_local_documents
node_text_extraction -.->|"reads"| node_local_documents
node_sync_types -->|"syncs metadata"| node_cloud

click node_desktop_entry "https://github.com/useminim/project/blob/main/apps/desktop/src-tauri/src/lib.rs"
click node_ui "https://github.com/useminim/project/blob/main/apps/desktop/src/App.tsx"
click node_workflow "https://github.com/useminim/project/blob/main/crates/core/src/lib.rs"
click node_trigger "https://github.com/useminim/project/tree/main/crates/core"
click node_action_chain "https://github.com/useminim/project/tree/main/crates/core"
click node_file_actions "https://github.com/useminim/project/tree/main/crates/core"
click node_text_extraction "https://github.com/useminim/project/blob/main/crates/extract/src/lib.rs"
click node_sync_types "https://github.com/useminim/project/blob/main/crates/shared/src/lib.rs"

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_desktop_entry,node_ui,node_user toneBlue
class node_workflow,node_trigger,node_action_chain toneAmber
class node_file_actions,node_text_extraction,node_local_documents toneMint
class node_sync_types toneRose
class node_email,node_cloud toneIndigo
```

## Components

### Desktop app

- [Desktop runtime](https://github.com/useminim/project/blob/main/apps/desktop/src-tauri/src/lib.rs): `apps/desktop/src-tauri/src/lib.rs`
- [React interface](https://github.com/useminim/project/blob/main/apps/desktop/src/App.tsx): `apps/desktop/src/App.tsx`

### Workflow engine

- [Workflow engine](https://github.com/useminim/project/blob/main/crates/core/src/lib.rs): `crates/core/src/lib.rs`
- [Document trigger](https://github.com/useminim/project/tree/main/crates/core): `crates/core`
- [Action chain](https://github.com/useminim/project/tree/main/crates/core): `crates/core`

### Document processing

- [File actions](https://github.com/useminim/project/tree/main/crates/core): `crates/core`
- [Text extraction](https://github.com/useminim/project/blob/main/crates/extract/src/lib.rs): `crates/extract/src/lib.rs`
- **Local documents**

### Metadata sync

- [Sync metadata types](https://github.com/useminim/project/blob/main/crates/shared/src/lib.rs): `crates/shared/src/lib.rs`

### Other components

- **User**
- **Email service**
- **Cloud service**

## Connections

- User → React interface: uses (evidence: `README.md`)
- Desktop runtime → React interface: hosts
- React interface → Workflow engine: configures
- Workflow engine → Document trigger: identifies type (evidence: `README.md`)
- Workflow engine → Action chain: runs actions (evidence: `README.md`)
- Action chain → File actions: renames, moves, converts (evidence: `README.md`)
- Action chain → Text extraction: extracts text (evidence: `README.md`)
- Action chain → Email service: sends email (evidence: `README.md`)
- File actions → Local documents: operates on (evidence: `README.md`)
- Text extraction → Local documents: reads
- Sync metadata types → Cloud service: syncs metadata (evidence: `README.md`)
