How just-code-net/poltertype works
PolterType is a cross-platform desktop keyboard-layout auto-corrector. A user types; the app captures key events, buffers a word, detects its intended language/layout, switches the OS layout, and retypes the corrected word. The tray and settings expose configuration and status, while separate subsystems provide suggestions, plugins, sound, and update checks. The graph emphasizes documented product stages and app wiring; several platform backends and settings internals are represented at their directory/module level because their implementations were not sampled.
Main entry points: main.rs App Orchestrator · engine.rs Word Switcher · factory.rs Keyboard Capture · dictionary_detector.rs Language Detection
Components 20
Desktop App
- App Orchestrator
crates/poltertype-app/src/main.rs - Tray Menu
crates/poltertype-app/src/tray.rs
Correction Runtime
- Word Switcher
crates/poltertype-core/src/engine/switcher/engine.rs - Word Buffer
crates/poltertype-core/src/engine/buffer/word_buffer.rs - Language Detection
crates/poltertype-detect/src/dictionary_detector.rs - Optional AI Detectors
crates/poltertype-ai/src/detector.rs
Platform I/O
- Keyboard Capture
crates/poltertype-input/src/factory.rs - Focus Tracking
crates/poltertype-input/src/focus/factory.rs - Layout Switching
crates/poltertype-layout/src/factory.rs
Settings & Extensions
- Settings Window
crates/poltertype-app/src/settings_ui/view.rs - Settings Store
crates/poltertype-core/src/settings/store.rs - Hotkey Handling
crates/poltertype-app/src/hotkeys.rs - Wordlist Profiles
crates/poltertype-core/src/wordlist_profiles/resolve.rs - Plugin Runtime
crates/poltertype-app/src/plugins/supervisor/lifecycle.rs
User Feedback
- Suggestions Popup
crates/poltertype-popup/src/renderer.rs - Correction Audio
crates/poltertype-core/src/audio/worker.rs - Update Checker
crates/poltertype-update/src/manifest.rs
Other components
- Typist
- Operating System
- Release Host
Connections 20
- Typist → Keyboard Capture: types keys
README.md - App Orchestrator → Keyboard Capture: starts listener
crates/poltertype-app/src/main.rs - Keyboard Capture → Word Switcher: sends key events
- Word Switcher → Word Buffer: tracks word
- Word Switcher → Language Detection: decides layout
README.md - Language Detection → Optional AI Detectors: adds optional opinion
- Word Switcher → Layout Switching: switches and retypes
README.md - Layout Switching → Operating System: changes active layout
README.md - App Orchestrator → Word Switcher: runs engine
crates/poltertype-app/src/main.rs - App Orchestrator → Tray Menu: builds tray
crates/poltertype-app/src/main.rs - Typist → Tray Menu: opens controls
README.md - Typist → Settings Window: configures app
README.md - Settings Window → Settings Store: updates preferences
- App Orchestrator → Hotkey Handling: registers hotkeys
crates/poltertype-app/src/main.rs - App Orchestrator → Plugin Runtime: starts extensions
crates/poltertype-app/src/main.rs - App Orchestrator → Wordlist Profiles: watches focus profiles
crates/poltertype-app/src/main.rs - Word Switcher → Suggestions Popup: shows suggestions
README.md - Word Switcher → Correction Audio: plays sound themes
- App Orchestrator → Update Checker: checks for updates
README.md - Update Checker → Release Host: fetches manifest
README.md