# lacania/personal-workbench architecture

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

- Interactive diagram: https://gitdiagram.com/lacania/personal-workbench
- Repository: https://github.com/lacania/personal-workbench

## Overview

Personal Workbench is a local-first Windows desktop AI workspace for organizing files, studying documents, searching imported material, and turning web or video sources into learning resources. The principal flow is user request through the workbench UI and server task runtime, then source-specific ingestion and knowledge processing, with results available as documents or searchable memory. File organization adds a deliberate preview-and-confirm path; artifact review provides a separate evidence and approval capability. README documents Ollama and supported workflows; sampled excerpts do not expose complete route wiring, so uncertain calls are omitted.

Main entry points: [`apps/personal-workbench/server/src/tasks/manager.ts`](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/tasks/manager.ts) (Task manager), [`apps/personal-workbench/web/src/App.tsx`](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/App.tsx) (Workbench UI), [`apps/personal-workbench/web/src/api/client.ts`](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/api/client.ts) (API client), [`apps/personal-workbench/server/src/artifacts/review-queue-service.ts`](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/review-queue-service.ts) (Review workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_app["Workbench UI<br/>[App.tsx]"]
  node_workbench["Workbench page<br/>[WorkbenchPage.tsx]"]
  node_organizer_ui["Organizer page"]
  node_memory_ui["Memory page<br/>[MemoryPage.tsx]"]
  node_video_ui["Video page<br/>[VideoPage.tsx]"]
  node_review_ui["Review queue"]
  node_api["API client<br/>[client.ts]"]
end

subgraph group_runtime["Task runtime"]
  node_server["Server entry<br/>[index.ts]"]
  node_tasks["Task manager<br/>[manager.ts]"]
  node_database[("Workbench database<br/>[database.ts]")]
end

subgraph group_knowledge["Knowledge workflows"]
  node_ingestion["Source ingestion<br/>[service.ts]"]
  node_source_registry["Source adapters<br/>[registry.ts]"]
  node_video["Video processing<br/>[service.ts]"]
  node_documents["Document search<br/>[search-service.ts]"]
  node_knowledge_service["Knowledge extraction<br/>[service.ts]"]
  node_retrieval["Local retrieval<br/>[service.ts]"]
end

subgraph group_workspace["Workspace operations"]
  node_organizer["File organizer<br/>[service.ts]"]
  node_projects["Project workspace<br/>[service.ts]"]
end

subgraph group_assurance["Evidence and review"]
  node_artifacts["Artifact services<br/>[service.ts]"]
  node_review_queue["Review workflow"]
  node_review_policy["Review policy"]
  node_review_changes["Review changes"]
end

node_user(("User"))
node_ollama{{"Ollama"}}

node_user -->|"uses"| node_app
node_app -->|"shows"| node_workbench
node_app -->|"shows"| node_organizer_ui
node_app -->|"shows"| node_memory_ui
node_app -->|"shows"| node_video_ui
node_app -->|"shows"| node_review_ui
node_workbench -->|"requests tasks"| node_api
node_organizer_ui -->|"requests plans"| node_api
node_memory_ui -->|"requests memory"| node_api
node_video_ui -->|"requests video"| node_api
node_review_ui -->|"requests reviews"| node_api
node_api -->|"sends requests"| node_server
node_server -->|"dispatches tasks"| node_tasks
node_tasks -->|"reads and writes"| node_database
node_tasks -.->|"uses local AI"| node_ollama
node_tasks -->|"runs ingestion"| node_ingestion
node_ingestion -->|"resolves sources"| node_source_registry
node_tasks -->|"runs video tasks"| node_video
node_tasks -->|"indexes documents"| node_documents
node_tasks -->|"extracts knowledge"| node_knowledge_service
node_documents -.->|"embeds text"| node_ollama
node_documents -->|"stores vectors"| node_database
node_retrieval -->|"searches memory"| node_database
node_tasks -->|"runs organization"| node_organizer
node_tasks -->|"manages projects"| node_projects
node_tasks -->|"creates artifacts"| node_artifacts
node_review_ui -->|"submits decisions"| node_review_queue
node_review_queue -->|"evaluates policy"| node_review_policy
node_review_queue -->|"captures changes"| node_review_changes
node_review_queue -->|"stores decisions"| node_database
node_review_policy -->|"checks artifacts"| node_artifacts
node_review_changes -->|"compares artifacts"| node_artifacts

click node_app "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/App.tsx"
click node_workbench "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/WorkbenchPage.tsx"
click node_organizer_ui "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/FileOrganizerPage.tsx"
click node_memory_ui "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/MemoryPage.tsx"
click node_video_ui "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/VideoPage.tsx"
click node_review_ui "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/ReviewQueuePage.tsx"
click node_api "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/api/client.ts"
click node_server "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/index.ts"
click node_tasks "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/tasks/manager.ts"
click node_ingestion "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/ingestion/service.ts"
click node_source_registry "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/sources/registry.ts"
click node_video "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/video/service.ts"
click node_documents "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/documents/search-service.ts"
click node_knowledge_service "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/knowledge/service.ts"
click node_retrieval "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/retrieval/service.ts"
click node_database "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/database.ts"
click node_organizer "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/organizer/service.ts"
click node_projects "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/projects/service.ts"
click node_artifacts "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/service.ts"
click node_review_queue "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/review-queue-service.ts"
click node_review_policy "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/review-policy-service.ts"
click node_review_changes "https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/review-change-service.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_workbench,node_organizer_ui,node_memory_ui,node_video_ui,node_review_ui,node_api,node_user toneBlue
class node_server,node_tasks,node_database toneAmber
class node_ingestion,node_source_registry,node_video,node_documents,node_knowledge_service,node_retrieval toneMint
class node_organizer,node_projects toneRose
class node_artifacts,node_review_queue,node_review_policy,node_review_changes,node_ollama toneIndigo
```

## Components

### Desktop interface

- [Workbench UI](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/App.tsx): `apps/personal-workbench/web/src/App.tsx`
- [Workbench page](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/WorkbenchPage.tsx): `apps/personal-workbench/web/src/pages/WorkbenchPage.tsx`
- [Organizer page](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/FileOrganizerPage.tsx): `apps/personal-workbench/web/src/pages/FileOrganizerPage.tsx`
- [Memory page](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/MemoryPage.tsx): `apps/personal-workbench/web/src/pages/MemoryPage.tsx`
- [Video page](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/VideoPage.tsx): `apps/personal-workbench/web/src/pages/VideoPage.tsx`
- [Review queue](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/pages/ReviewQueuePage.tsx): `apps/personal-workbench/web/src/pages/ReviewQueuePage.tsx`
- [API client](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/web/src/api/client.ts): `apps/personal-workbench/web/src/api/client.ts`

### Task runtime

- [Server entry](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/index.ts): `apps/personal-workbench/server/src/index.ts`
- [Task manager](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/tasks/manager.ts): `apps/personal-workbench/server/src/tasks/manager.ts`
- [Workbench database](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/database.ts): `apps/personal-workbench/server/src/database.ts`

### Knowledge workflows

- [Source ingestion](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/ingestion/service.ts): `apps/personal-workbench/server/src/ingestion/service.ts`
- [Source adapters](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/sources/registry.ts): `apps/personal-workbench/server/src/sources/registry.ts`
- [Video processing](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/video/service.ts): `apps/personal-workbench/server/src/video/service.ts`
- [Document search](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/documents/search-service.ts): `apps/personal-workbench/server/src/documents/search-service.ts`
- [Knowledge extraction](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/knowledge/service.ts): `apps/personal-workbench/server/src/knowledge/service.ts`
- [Local retrieval](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/retrieval/service.ts): `apps/personal-workbench/server/src/retrieval/service.ts`

### Workspace operations

- [File organizer](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/organizer/service.ts): `apps/personal-workbench/server/src/organizer/service.ts`
- [Project workspace](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/projects/service.ts): `apps/personal-workbench/server/src/projects/service.ts`

### Evidence and review

- [Artifact services](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/service.ts): `apps/personal-workbench/server/src/artifacts/service.ts`
- [Review workflow](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/review-queue-service.ts): `apps/personal-workbench/server/src/artifacts/review-queue-service.ts`
- [Review policy](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/review-policy-service.ts): `apps/personal-workbench/server/src/artifacts/review-policy-service.ts`
- [Review changes](https://github.com/lacania/personal-workbench/blob/main/apps/personal-workbench/server/src/artifacts/review-change-service.ts): `apps/personal-workbench/server/src/artifacts/review-change-service.ts`

### Other components

- **User**
- **Ollama**

## Connections

- User → Workbench UI: uses
- Workbench UI → Workbench page: shows
- Workbench UI → Organizer page: shows
- Workbench UI → Memory page: shows
- Workbench UI → Video page: shows
- Workbench UI → Review queue: shows
- Workbench page → API client: requests tasks
- Organizer page → API client: requests plans
- Memory page → API client: requests memory
- Video page → API client: requests video
- Review queue → API client: requests reviews
- API client → Server entry: sends requests
- Server entry → Task manager: dispatches tasks
- Task manager → Workbench database: reads and writes
- Task manager → Ollama: uses local AI
- Task manager → Source ingestion: runs ingestion
- Source ingestion → Source adapters: resolves sources
- Task manager → Video processing: runs video tasks
- Task manager → Document search: indexes documents
- Task manager → Knowledge extraction: extracts knowledge
- Document search → Ollama: embeds text
- Document search → Workbench database: stores vectors
- Local retrieval → Workbench database: searches memory
- Task manager → File organizer: runs organization
- Task manager → Project workspace: manages projects
- Task manager → Artifact services: creates artifacts
- Review queue → Review workflow: submits decisions
- Review workflow → Review policy: evaluates policy
- Review workflow → Review changes: captures changes
- Review workflow → Workbench database: stores decisions
- Review policy → Artifact services: checks artifacts
- Review changes → Artifact services: compares artifacts
