# ix-e/filebot architecture

> Architecture diagram of the GitHub repository ix-e/filebot, 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/ix-e/filebot
- Repository: https://github.com/ix-e/filebot

## Overview

FileBot is a local Windows file manager with two user-facing workflows: a Flask web app for indexed search and preview-confirmed folder organization, and a Ctrl+5 desktop launcher for search-only access. Organization categorizes and moves top-level files, records sessions, and supports undo. The in-memory index is shared with the launcher according to the README. The launcher implementation and several web handlers are not sampled, so their internal wiring is shown only where documented.

Main entry points: [`filebot.py`](https://github.com/ix-e/filebot/blob/main/filebot.py) (Web routes), [`filebot_launcher.pyw`](https://github.com/ix-e/filebot/blob/main/filebot_launcher.pyw) (Quick search launcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_web_app["Flask web app<br/>[filebot.py]"]
  node_web_ui["Web pages<br/>[filebot.py]"]
  node_web_routes["Web routes<br/>[filebot.py]"]
end

subgraph group_indexing["Search index"]
  node_search["Indexed search<br/>[filebot.py]"]
  node_index_builder["Index builder<br/>[filebot.py]"]
  node_memory_index[("Memory index<br/>[filebot.py]")]
  node_index_cache[("Index cache<br/>[filebot.py]")]
end

subgraph group_organizing["Organization history"]
  node_organize["Organization flow<br/>[filebot.py]"]
  node_preview["Move preview<br/>[filebot.py]"]
  node_categorizer["File categories<br/>[filebot.py]"]
  node_move_files["File moves<br/>[filebot.py]"]
  node_history[("Session history<br/>[filebot.py]")]
  node_undo["Undo session<br/>[filebot.py]"]
end

subgraph group_launcher["Quick launcher"]
  node_launcher["Quick search launcher"]
  node_popup["Search popup"]
  node_open_result["Open result"]
end

node_web_user(("Web user"))
node_desktop_user(("Desktop user"))
node_filesystem[("Local filesystem")]
node_default_app["Default file app"]
node_keyboard["Global hotkey"]

node_web_user -->|"uses"| node_web_ui
node_web_ui -->|"submits requests"| node_web_routes
node_web_app -->|"serves"| node_web_routes
node_web_routes -->|"queries"| node_search
node_search -->|"reads"| node_memory_index
node_index_builder -->|"scans"| node_filesystem
node_index_builder -->|"builds"| node_memory_index
node_index_builder -->|"reads and writes"| node_index_cache
node_web_routes -->|"starts reindex"| node_index_builder
node_web_routes -->|"handles organize request"| node_organize
node_organize -->|"classifies files"| node_categorizer
node_organize -->|"returns plan"| node_preview
node_organize -->|"moves on confirmation"| node_move_files
node_move_files -->|"moves files"| node_filesystem
node_organize -->|"records session"| node_history
node_web_routes -->|"loads sessions"| node_history
node_web_routes -->|"handles undo request"| node_undo
node_undo -->|"loads and updates"| node_history
node_undo -->|"restores files"| node_filesystem
node_desktop_user -->|"presses Ctrl+5"| node_keyboard
node_keyboard -->|"triggers"| node_launcher
node_launcher -->|"shows"| node_popup
node_popup -->|"provides query"| node_launcher
node_launcher -->|"searches shared index"| node_memory_index
node_launcher -->|"selects result"| node_open_result
node_open_result -->|"opens path"| node_filesystem
node_open_result -->|"launches with"| node_default_app

click node_web_app "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_web_ui "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_web_routes "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_search "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_index_builder "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_memory_index "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_index_cache "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_organize "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_preview "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_categorizer "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_move_files "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_history "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_undo "https://github.com/ix-e/filebot/blob/main/filebot.py"
click node_launcher "https://github.com/ix-e/filebot/blob/main/filebot_launcher.pyw"
click node_popup "https://github.com/ix-e/filebot/blob/main/filebot_launcher.pyw"
click node_open_result "https://github.com/ix-e/filebot/blob/main/filebot_launcher.pyw"

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_web_app,node_web_ui,node_web_routes,node_web_user,node_desktop_user toneBlue
class node_search,node_index_builder,node_memory_index,node_index_cache,node_filesystem toneAmber
class node_organize,node_preview,node_categorizer,node_move_files,node_history,node_undo toneMint
class node_launcher,node_popup,node_open_result toneRose
class node_default_app,node_keyboard toneIndigo
```

## Components

### Web application

- [Flask web app](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Web pages](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Web routes](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`

### Search index

- [Indexed search](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Index builder](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Memory index](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Index cache](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`

### Organization history

- [Organization flow](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Move preview](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [File categories](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [File moves](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Session history](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`
- [Undo session](https://github.com/ix-e/filebot/blob/main/filebot.py): `filebot.py`

### Quick launcher

- [Quick search launcher](https://github.com/ix-e/filebot/blob/main/filebot_launcher.pyw): `filebot_launcher.pyw`
- [Search popup](https://github.com/ix-e/filebot/blob/main/filebot_launcher.pyw): `filebot_launcher.pyw`
- [Open result](https://github.com/ix-e/filebot/blob/main/filebot_launcher.pyw): `filebot_launcher.pyw`

### Other components

- **Web user**
- **Desktop user**
- **Local filesystem**
- **Default file app**
- **Global hotkey**

## Connections

- Web user → Web pages: uses
- Web pages → Web routes: submits requests
- Flask web app → Web routes: serves
- Web routes → Indexed search: queries
- Indexed search → Memory index: reads
- Index builder → Local filesystem: scans
- Index builder → Memory index: builds
- Index builder → Index cache: reads and writes
- Web routes → Index builder: starts reindex
- Web routes → Organization flow: handles organize request
- Organization flow → File categories: classifies files
- Organization flow → Move preview: returns plan
- Organization flow → File moves: moves on confirmation
- File moves → Local filesystem: moves files
- Organization flow → Session history: records session
- Web routes → Session history: loads sessions
- Web routes → Undo session: handles undo request
- Undo session → Session history: loads and updates
- Undo session → Local filesystem: restores files
- Desktop user → Global hotkey: presses Ctrl+5
- Global hotkey → Quick search launcher: triggers
- Quick search launcher → Search popup: shows
- Search popup → Quick search launcher: provides query
- Quick search launcher → Memory index: searches shared index
- Quick search launcher → Open result: selects result
- Open result → Local filesystem: opens path
- Open result → Default file app: launches with
