# mgrillo75/organizer architecture

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

- Interactive diagram: https://gitdiagram.com/mgrillo75/organizer
- Repository: https://github.com/mgrillo75/organizer

## Overview

Organizer is a Windows email-to-task application with an Electron UI and a FastAPI backend. Users configure Outlook folders, prioritization signals and an LLM provider, then scan email manually or by schedule. The backend reads Outlook mail, triages it for relevance, extracts tasks from relevant messages, and presents those tasks for approval and reminder management. SQLite stores tasks, reminders and processed-email records; configuration stores encrypted provider keys. The graph preserves the documented provider options; some wiring is supported by the source index rather than excerpts, so unverified subsystem links are omitted.

Main entry points: [`backend/src/llm/factory.py`](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/factory.py) (Provider factory), [`backend/src/api.py`](https://github.com/mgrillo75/organizer/blob/main/backend/src/api.py) (REST API), [`backend/src/processor.py`](https://github.com/mgrillo75/organizer/blob/main/backend/src/processor.py) (Email triage), [`frontend/renderer/app.js`](https://github.com/mgrillo75/organizer/blob/main/frontend/renderer/app.js) (Organizer UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop UI"]
  node_electron["Electron shell<br/>[main.js]"]
  node_ui["Organizer UI<br/>[app.js]"]
  node_api["REST API<br/>[api.py]"]
end

subgraph group_email["Email processing"]
  node_outlook["Outlook reader<br/>[outlook.py]"]
  node_triage["Email triage<br/>[processor.py]"]
  node_extraction["Task extraction<br/>[processor.py]"]
  node_scheduler["Email scheduler<br/>[scheduler.py]"]
end

subgraph group_tasks["Tasks and reminders"]
  node_task_workflow["Task workflow<br/>[tasks.py]"]
  node_reminders["Reminder service<br/>[reminders.py]"]
end

subgraph group_providers["LLM providers"]
  node_factory["Provider factory<br/>[factory.py]"]
  node_openai["OpenAI provider<br/>[openai_provider.py]"]
  node_anthropic["Anthropic provider"]
  node_azure["Azure provider"]
  node_ollama["Ollama provider<br/>[ollama_provider.py]"]
  node_lmstudio["LM Studio provider"]
  node_copilot["GitHub Copilot provider"]
  node_compatible["Compatible provider"]
end

subgraph group_settings["Settings and storage"]
  node_database[("SQLite records<br/>[db.py]")]
  node_config["Encrypted configuration<br/>[config.py]"]
end

node_user(("User"))
node_llm_service{{"LLM services"}}

node_user -->|"uses"| node_ui
node_ui -->|"runs in"| node_electron
node_ui -->|"requests"| node_api
node_api -->|"triggers processing"| node_triage
node_triage -->|"fetches mail"| node_outlook
node_triage -->|"selects relevant mail"| node_extraction
node_extraction -->|"creates tasks"| node_task_workflow
node_api -->|"handles task actions"| node_task_workflow
node_api -->|"controls polling"| node_scheduler
node_api -->|"controls reminders"| node_reminders
node_task_workflow -->|"reads and writes"| node_database
node_reminders -->|"reads and writes"| node_database
node_triage -->|"records processed mail"| node_database
node_api -->|"loads and updates"| node_config
node_triage -->|"gets provider"| node_factory
node_factory -->|"loads settings"| node_config
node_factory -->|"instantiates"| node_openai
node_factory -->|"instantiates"| node_anthropic
node_factory -->|"instantiates"| node_azure
node_factory -->|"instantiates"| node_ollama
node_factory -->|"instantiates"| node_lmstudio
node_factory -->|"instantiates"| node_copilot
node_factory -->|"instantiates"| node_compatible
node_openai -->|"sends completions"| node_llm_service
node_anthropic -->|"sends completions"| node_llm_service
node_azure -->|"sends completions"| node_llm_service
node_ollama -->|"sends completions"| node_llm_service
node_lmstudio -->|"sends completions"| node_llm_service
node_copilot -->|"sends completions"| node_llm_service
node_compatible -->|"sends completions"| node_llm_service

click node_electron "https://github.com/mgrillo75/organizer/blob/main/frontend/main.js"
click node_ui "https://github.com/mgrillo75/organizer/blob/main/frontend/renderer/app.js"
click node_api "https://github.com/mgrillo75/organizer/blob/main/backend/src/api.py"
click node_outlook "https://github.com/mgrillo75/organizer/blob/main/backend/src/outlook.py"
click node_triage "https://github.com/mgrillo75/organizer/blob/main/backend/src/processor.py"
click node_extraction "https://github.com/mgrillo75/organizer/blob/main/backend/src/processor.py"
click node_scheduler "https://github.com/mgrillo75/organizer/blob/main/backend/src/scheduler.py"
click node_task_workflow "https://github.com/mgrillo75/organizer/blob/main/backend/src/tasks.py"
click node_reminders "https://github.com/mgrillo75/organizer/blob/main/backend/src/reminders.py"
click node_database "https://github.com/mgrillo75/organizer/blob/main/backend/src/db.py"
click node_config "https://github.com/mgrillo75/organizer/blob/main/backend/src/config.py"
click node_factory "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/factory.py"
click node_openai "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/openai_provider.py"
click node_anthropic "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/anthropic_provider.py"
click node_azure "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/azure_openai_provider.py"
click node_ollama "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/ollama_provider.py"
click node_lmstudio "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/lmstudio_provider.py"
click node_copilot "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/github_copilot_provider.py"
click node_compatible "https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/compatible_provider.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_electron,node_ui,node_api,node_user toneBlue
class node_outlook,node_triage,node_extraction,node_scheduler toneAmber
class node_task_workflow,node_reminders toneMint
class node_factory,node_openai,node_anthropic,node_azure,node_ollama,node_lmstudio,node_copilot,node_compatible toneRose
class node_database,node_config,node_llm_service toneIndigo
```

## Components

### Desktop UI

- [Electron shell](https://github.com/mgrillo75/organizer/blob/main/frontend/main.js): `frontend/main.js`
- [Organizer UI](https://github.com/mgrillo75/organizer/blob/main/frontend/renderer/app.js): `frontend/renderer/app.js`
- [REST API](https://github.com/mgrillo75/organizer/blob/main/backend/src/api.py): `backend/src/api.py`

### Email processing

- [Outlook reader](https://github.com/mgrillo75/organizer/blob/main/backend/src/outlook.py): `backend/src/outlook.py`
- [Email triage](https://github.com/mgrillo75/organizer/blob/main/backend/src/processor.py): `backend/src/processor.py`
- [Task extraction](https://github.com/mgrillo75/organizer/blob/main/backend/src/processor.py): `backend/src/processor.py`
- [Email scheduler](https://github.com/mgrillo75/organizer/blob/main/backend/src/scheduler.py): `backend/src/scheduler.py`

### Tasks and reminders

- [Task workflow](https://github.com/mgrillo75/organizer/blob/main/backend/src/tasks.py): `backend/src/tasks.py`
- [Reminder service](https://github.com/mgrillo75/organizer/blob/main/backend/src/reminders.py): `backend/src/reminders.py`

### LLM providers

- [Provider factory](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/factory.py): `backend/src/llm/factory.py`
- [OpenAI provider](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/openai_provider.py): `backend/src/llm/openai_provider.py`
- [Anthropic provider](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/anthropic_provider.py): `backend/src/llm/anthropic_provider.py`
- [Azure provider](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/azure_openai_provider.py): `backend/src/llm/azure_openai_provider.py`
- [Ollama provider](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/ollama_provider.py): `backend/src/llm/ollama_provider.py`
- [LM Studio provider](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/lmstudio_provider.py): `backend/src/llm/lmstudio_provider.py`
- [GitHub Copilot provider](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/github_copilot_provider.py): `backend/src/llm/github_copilot_provider.py`
- [Compatible provider](https://github.com/mgrillo75/organizer/blob/main/backend/src/llm/compatible_provider.py): `backend/src/llm/compatible_provider.py`

### Settings and storage

- [SQLite records](https://github.com/mgrillo75/organizer/blob/main/backend/src/db.py): `backend/src/db.py`
- [Encrypted configuration](https://github.com/mgrillo75/organizer/blob/main/backend/src/config.py): `backend/src/config.py`

### Other components

- **User**
- **LLM services**

## Connections

- User → Organizer UI: uses (evidence: `README.md`)
- Organizer UI → Electron shell: runs in
- Organizer UI → REST API: requests (evidence: `README.md`)
- REST API → Email triage: triggers processing (evidence: `backend/src/api.py`)
- Email triage → Outlook reader: fetches mail (evidence: `backend/src/processor.py`)
- Email triage → Task extraction: selects relevant mail (evidence: `backend/src/processor.py`)
- Task extraction → Task workflow: creates tasks (evidence: `backend/src/processor.py`)
- REST API → Task workflow: handles task actions (evidence: `backend/src/api.py`)
- REST API → Email scheduler: controls polling (evidence: `backend/src/api.py`)
- REST API → Reminder service: controls reminders (evidence: `backend/src/api.py`)
- Task workflow → SQLite records: reads and writes (evidence: `backend/src/tasks.py`)
- Reminder service → SQLite records: reads and writes (evidence: `backend/src/reminders.py`)
- Email triage → SQLite records: records processed mail (evidence: `backend/src/processor.py`)
- REST API → Encrypted configuration: loads and updates (evidence: `backend/src/api.py`)
- Email triage → Provider factory: gets provider (evidence: `backend/src/processor.py`)
- Provider factory → Encrypted configuration: loads settings (evidence: `backend/src/llm/factory.py`)
- Provider factory → OpenAI provider: instantiates (evidence: `backend/src/llm/factory.py`)
- Provider factory → Anthropic provider: instantiates (evidence: `backend/src/llm/factory.py`)
- Provider factory → Azure provider: instantiates (evidence: `backend/src/llm/factory.py`)
- Provider factory → Ollama provider: instantiates (evidence: `backend/src/llm/factory.py`)
- Provider factory → LM Studio provider: instantiates (evidence: `backend/src/llm/factory.py`)
- Provider factory → GitHub Copilot provider: instantiates (evidence: `backend/src/llm/factory.py`)
- Provider factory → Compatible provider: instantiates (evidence: `backend/src/llm/factory.py`)
- OpenAI provider → LLM services: sends completions (evidence: `backend/src/llm/openai_provider.py`)
- Anthropic provider → LLM services: sends completions (evidence: `backend/src/llm/anthropic_provider.py`)
- Azure provider → LLM services: sends completions (evidence: `backend/src/llm/azure_openai_provider.py`)
- Ollama provider → LLM services: sends completions (evidence: `backend/src/llm/ollama_provider.py`)
- LM Studio provider → LLM services: sends completions (evidence: `backend/src/llm/lmstudio_provider.py`)
- GitHub Copilot provider → LLM services: sends completions (evidence: `backend/src/llm/github_copilot_provider.py`)
- Compatible provider → LLM services: sends completions (evidence: `backend/src/llm/compatible_provider.py`)
