How wwwoper/notesearch works
NoteSearch is a native macOS desktop app for searching text in one user-selected folder. The main workflow is global hotkey → search query → ranked file results → highlighted preview → open or reveal the file. Indexing reconciles files at launch and watches for changes; settings configure the folder, exclusions, hotkey, and app behavior. The graph includes the visible UI, state, search, and indexing layers. Some service internals and view behavior were not fully sampled, so those links rely on README statements where available.
Main entry points: AppState.swift App state · NoteSearchApp.swift App and panel · SearchService.swift Query and snippets · IndexService.swift Index service
Components 17
App interaction
- App and panel
NoteSearch/NoteSearchApp.swift - App state
NoteSearch/Models/AppState.swift - Search window
NoteSearch/Views/ContentView.swift - Search bar
NoteSearch/Views/SearchBarView.swift - Results list
NoteSearch/Views/ResultsListView.swift
Search and preview
- Result preview
NoteSearch/Views/PreviewView.swift - Search models
NoteSearch/Models/SearchModels.swift - Query and snippets
NoteSearch/Services/SearchService.swift
Index and storage
- Index service
NoteSearch/Services/IndexService.swift - File change watcher
NoteSearch/Services/IndexService.swift - Selected folder
- SQLite FTS index
Settings and system
- Global hotkey
NoteSearch/Services/GlobalHotkeyHandler.swift - Settings UI
NoteSearch/Views/SettingsView.swift - App logging
NoteSearch/Services/AppLog.swift
Other components
- User
- macOS services
Connections 27
- User → Global hotkey: presses
README.md - Global hotkey → App and panel: triggers panel
NoteSearch/NoteSearchApp.swift - App and panel → Search window: hosts
NoteSearch/NoteSearchApp.swift - App and panel → Settings UI: opens
NoteSearch/NoteSearchApp.swift - User → Search bar: enters query
README.md - Search bar → App state: updates query
NoteSearch/Views/SearchBarView.swift - Search window → Search bar: displays
NoteSearch/Views/ContentView.swift - Search window → Results list: displays
NoteSearch/Views/ContentView.swift - Search window → Result preview: displays
NoteSearch/Views/ContentView.swift - App state → Query and snippets: runs search
NoteSearch/Models/AppState.swift - App state → Index service: reconciles and reindexes
NoteSearch/Models/AppState.swift - Results list → App state: reads results
NoteSearch/Views/ResultsListView.swift - Result preview → App state: reads selection
NoteSearch/Views/PreviewView.swift - Result preview → Query and snippets: builds snippets
NoteSearch/Views/PreviewView.swift - Query and snippets → Search models: produces results
- Index service → Selected folder: scans and reads
README.md - File change watcher → Selected folder: watches changes
NoteSearch/Services/IndexService.swift - App state → File change watcher: applies changes
NoteSearch/Models/AppState.swift - Index service → SQLite FTS index: writes index
NoteSearch/Services/IndexService.swift - Query and snippets → SQLite FTS index: queries FTS
README.md - Settings UI → App state: changes settings
NoteSearch/Views/SettingsView.swift - Settings UI → Index service: configures index
NoteSearch/Views/SettingsView.swift - Settings UI → Global hotkey: configures shortcut
NoteSearch/Views/SettingsView.swift - App and panel → Global hotkey: starts handler
NoteSearch/NoteSearchApp.swift - App and panel → macOS services: opens files and menus
README.md - Query and snippets → App logging: logs search
NoteSearch/Services/SearchService.swift - Index service → App logging: logs indexing
NoteSearch/Services/IndexService.swift