-
Notifications
You must be signed in to change notification settings - Fork 1
Architecture Overview
Portable scratchpad + prompt workbench. Python 3.11+, PyQt6. SQLite WAL persistence. Zero-install Nuitka EXE. Summon via Alt+X global hotkey, write, close β state persists instantly.
+------------------------------------------------------------------+
| FastPrompter UI (PyQt6) |
| +------------------+ +--------------------+ +---------------+ |
| | SnippetPanel | | VaultTextEdit | | QueuePanel | |
| | (F1-F10 Silos) | | (Markdown + Mixins)| | (Watcher Q) | |
| +------------------+ +--------------------+ +---------------+ |
+----------------------------+-------------------------------------+
| events / state sync
v
+------------------------------------------------------------------+
| FastPrompterState (core) |
| SQLite WAL DB β silos, snippets, settings, themes, queues |
| In-memory cache + undo stack + per-silo state (cursor/scroll) |
+------------------------------------------------------------------+
| | | | |
v v v v v
+--------+ +---------+ +--------+ +---------+ +-----------+
|Hotkeys | | IPC | | Sound | | Watcher | | File |
|(pynput)| |(QLocal) | |Manager | |Engine | | Container |
+--------+ +---------+ +--------+ +---------+ +-----------+
Entry point. QApplication init, single-instance IPC check (QLocalServer), DB connect, global exception hooks, UI window build, system tray, hotkey registration. All mixins compose onto FastPrompter (QMainWindow):
- FormattingMixin β markdown shortcuts (bold, italic, list, code)
- HotkeyMixin β shortcut binding interface
- ScalingMixin β DPI/font scaling
- SearchMixin β multi-word AND search
- SendSelectionMixin β send text via watcher
- SnippetOpsMixin β silo ops (trash, duplicate, reorder, clear)
- ThemeMixin β app stylesheet, 6 retro Win95 themes + custom
- TrayMixin β systray icon + menu
- WatcherMixin β watcher engine integration
- WindowMixin β frameless window, snapping, borderless
QLocalServer on named pipe FastPrompter_Server_V15. Second instance sends SHOW command β existing instance brings its window forward. UUID token in %TEMP%/fastprompter_ipc.token for auth. No more silent no-op on crash (server.removeServer recovers stale socket names).
SQLite DB (data/local_data_v15.db) with WAL + synchronous=NORMAL. Key tables: presets (snippets), settings (k/v), temp_presets_v2 (silo text), archive_temp_presets_v2 (archived silos).
Auto-backup on startup (full DB copy to .bak). Throttled incremental backup every 60s. Per-category data stores: silo_colors_all, pinned_silos_all, silo_ticked_all, silo_children_all, silo_gaps_all, silo_project_paths_all, etc. All aliased to flat keys (temp_presets) for active category.
Two-layer: (1) pynput global listener thread for summon/emergency quit; (2) PyQt6 QShortcut for window-local bindings. HotkeyFilter (Win32 WH_KEYBOARD_LL) intercepts physical VK codes β layout-independent. Works on QWERTY, JCUKEN, AZERTY, QWERTZ.
VaultTextEdit extends QPlainTextEdit. Features:
- MarkdownHighlighter β live syntax (headings, bold, italic, code fences, checkboxes, links, images)
- Line gutter β numbers, fold arrows (βΎ), code-fence copy button
- Section fold β click collapse on header blocks
- Collapsible images β
renders as 150px clickable pill - Drop overlay β 4-option drop target (insert text, insert link, copy file, shortcut)
- Margin marks β line-level pins, ticks, queue anchors, heatmap
- Hide markup mode β toggle
**bold**βbold(T-603)
Up to 100 silos per project tab. Features:
- Pins (π) β anchor to top
- Ticks (β ) β completion marker
- Hierarchy β drag onto another silo to nest (max depth 2)
- Recency heatmap β warm tint on recently edited
- Sidebar gaps β user-defined spacers (Ctrl+drag to move)
- Multi-select β Shift=range, Ctrl=toggle, batch ops
- File containers β per-silo disk folder (
data/silo_files/<cat>/<idx>/) - Kanban (Alt+arrows move cards) + Table builder (Tab walk cells) β T-630
Prompt drainage + target automation. Finite state machine: DISARMED β ARMED β WATCHING β SENDING. Chrome CDP (Electron apps) + Win32 window probes. Queue pinning per target. Rate limits: settle_ms=2500, min_gap_ms=4000, max_sends=25, max_failures=3.
Frameless window, Win95 dark-gold aesthetic. Ctrl+Q cycles snap positions (7 zones + FancyZone picker + user presets). 3-stage Ctrl+D: Zen (minimal editor), Solo (minimise other windows), back. Overflow menu (Β») collects hidden buttons in ultra-narrow mode (<700px). Header density tiers auto-adjust (dense <1280px, ultra <700px).
Countdown timers with color-coded urgency, snooze, toast notifications (Win95 3D bevels). Pomodoro work/break state machine.
Multi-layer: (1) SQLite WAL β crash-safe writes; (2) .bak on startup + every 60s; (3) daily Markdown mirror to ~/Documents/.fastprompter/ (silos + snippets + archive per project); (4) portable backup ZIP builder.
FastPrompter Wiki β Built with SAIPEN Protocol | GitHub Repo