Neutralinojs is a cross-platform desktop application framework that enables building native desktop apps using web technologies (HTML, CSS, JavaScript) without bundling a full browser engine. The core is a C++ binary that embeds a WebSocket server, a static file server, and a native API layer. Applications communicate with the backend via JSON-RPC over WebSocket, allowing access to OS-level features like file system, process management, clipboard, system info, and window control. The framework supports multiple deployment modes: window (native webview), browser, cloud, and chrome. The architecture is modular, with API controllers in `api/` (e.g., `app`, `fs`, `os`, `net`, `storage`, `clipboard`, `computer`) that each expose a set of methods. The server (`server/neuserver`) routes incoming WebSocket messages to the appropriate controller based on a method prefix. Authentication is handled via a token-based system (`auth/authbasic`), and permissions are enforced through allow/block lists (`auth/permission`). Extensions can be loaded as separate processes (`extensions_loader`), communicating via WebSocket with a shared token. The framework relies heavily on vendored third-party libraries: Asio for async I/O, WebSocket++ for WebSocket protocol, mbedTLS for TLS/crypto, and platform-specific libraries for hardware info, file watching, and clipboard. The build system uses CMake with platform-specific toolchains. The project includes a test suite using Mocha and a custom runner that launches the binary and executes JavaScript specs.
MemReduct is a Windows desktop application for real-time memory monitoring and cleaning, implemented in C with the Win32 API and the undocumented Native API. It operates as a system tray utility that can manually or automatically purge various Windows memory caches: working sets, standby list, modified page list, system file cache, registry cache (Win8.1+), and combined memory lists (Win10+). The core cleaning logic uses NtSetSystemInformation with specific information classes, supplemented by volume cache flushing via the MOUNTMGR device. The application requires administrator privileges for full functionality and provides a configuration GUI with settings for auto-clean thresholds, intervals, hotkeys, language selection, and tray icon appearance. The architecture is monolithic: a single executable built from source files (main.c, main.h, resource files) that links against a reusable utility library (the 'routine' submodule). This library abstracts common Win32 tasks such as registry/INI config management, localization via .ini files, custom listview controls, theme handling, and device context operations. The application entry point is wWinMain in main.c, which creates the main dialog and processes window messages via DlgProc. Memory status is polled every second via a timer callback, and cleaning actions are triggered either manually through the UI or automatically based on user-defined thresholds. External dependencies are limited to Windows system DLLs (kernel32, user32, ntdll, advapi32) and the two submodules: 'routine' (utility code) and 'builder' (installer packaging). The build system uses Visual Studio 2017 project files with batch scripts for x86, x64, and ARM64 targets. No network dependencies exist except an optional update check. The codebase demonstrates non-obvious skill in low-level Windows system programming, custom GDI tray icon rendering, and conditional feature compilation, but remains maintainable through its separation of concerns in the routine library.