CotEditor is a native macOS text editor written in Swift, designed for code editing with syntax highlighting, file management, find/replace, and scripting support. It uses a hybrid AppKit/SwiftUI architecture, with core editing logic in the EditorCore package, syntax parsing in the Syntax package (supporting both regex-based and tree-sitter incremental parsing), and macOS-specific UI controls in the MacUI package. The application follows an MVVM pattern with @Observable models, async task-based background processing, and extensive localization across 19 languages. Key entry points include the DocumentWindow and DocumentViewController for the main editing interface, the SettingsWindow for configuration, and the command-line tool `cot`. Data flows involve file opening with encoding detection, syntax highlighting via incremental parsers, find/replace operations with progress tracking, and remote editing via the rmate protocol. External dependencies include tree-sitter grammars for 20+ languages, Sparkle for updates, and various macOS system APIs. The codebase demonstrates strong engineering practices: modular package design, protocol-oriented interfaces, reactive state management, and comprehensive test coverage. It is actively maintained with frequent releases and security fixes.
DeaDBeeF is a cross-platform desktop music player with a modular plugin architecture. It supports a vast array of audio formats including MP3, AAC, FLAC, Ogg Vorbis, Opus, WavPack, Musepack, DTS, and numerous chiptune and video game music formats (SID, NSF, VGM, MOD, S3M, XM, IT, PSF, etc.) through bundled emulation libraries. The core player handles playlist management, metadata caching, replaygain, DSP chain processing, and streaming. Two native GUI implementations exist: a GTK2/GTK3 interface for Linux and a Cocoa interface for macOS, both offering full-featured playback controls, media library browsing, cover art display, and visualization (scope, spectrum analyzer). The player also includes a converter plugin, MPRIS integration, and extensive keyboard shortcut customization. The architecture is centered around a lightweight plugin API (DB_plugin_t) that decouples decoders, outputs, DSP effects, and UI components. The core library (libdeadbeef) provides threading, file I/O, configuration, and message passing. Plugins are loaded dynamically and register themselves via a factory pattern. The media library plugin uses SQLite for indexing and file system watchers (inotify on Linux) for automatic updates. Artwork is fetched from embedded tags and online services (Last.fm, MusicBrainz) with a local cache. The build system uses autotools, premake5, and Xcode projects, with Docker-based CI for Linux, macOS, and Windows. Key data flows include: file opening via VFS abstraction → decoder plugin → decoded audio blocks (ring buffer) → DSP chain → output plugin. Metadata flows from file tags through a caching layer to the UI and media library. The player supports CUE sheets, gapless playback, and crossfading. External dependencies include GTK2/GTK3, libcurl, libsamplerate, and various codec libraries (libmpg123, libmad, libvorbis, libFLAC, etc.), many of which are bundled as source for portability.
ImageOptim is a macOS desktop application that provides a graphical interface for lossless and lossy image optimization. It bundles over a dozen external optimization tools (e.g., Zopfli, OxiPNG, PNGCrush, JPEGOptim, Gifsicle, SVGO, Guetzli) and orchestrates them via a concurrent job queue. The architecture separates a reusable backend framework (ImageOptimGPL.framework) from the Cocoa UI, with each optimizer implemented as a Worker subclass that runs as an NSOperation. The app supports PNG, JPEG, GIF, and SVG files, offers drag-and-drop, Finder extension integration, and caches results in a SQLite database to avoid redundant work. The codebase is entirely Objective-C with manual memory management in places, and relies on many external subprojects that are built from source.