$ show brimdata/zui
Zui (formerly Brim) is an Electron-based desktop application for network security monitoring and data exploration. It provides a graphical interface to query and visualize data stored in a Zed/SuperDB lake, with a focus on Zeek and Suricata log analysis. The application supports importing packet captures (pcap), structured logs (Zeek TSV, NDJSON, CSV, Parquet), and offers a rich query editor (Monaco), histogram, table/inspector views, and export workflows. The codebase is a monorepo (Yarn workspaces, Nx) with packages for type definitions (`superdb-types`), a Node.js client (`superdb-node-client`), sample data, and an e2e test framework (`app-player`). The architecture follows a domain-driven pattern with handlers and operations, a Redux store with versioned state migrations, and a plugin system for extensibility. While the application is actively maintained and functionally rich, it exhibits some technical drift due to a mix of legacy and modern patterns, a large migration history, and tight coupling between core and plugins.
The LLM identified 4 files worth highlighting for reuse:
A generic Redux Toolkit slice factory that generates actions, selectors, and reducers for CRUD operations on entities. It supports nested entities and provides a consistent pattern for state management across the application. This component is self-contained and can be extracted into any Redux project to reduce boilerplate for entity management.
An algorithm for computing the new order of a sortable list after a drag-and-drop operation. It handles insertion, removal, and reordering with minimal state changes. The implementation is framework-agnostic and can be reused in any project requiring drag-and-drop list reordering.
A utility that calculates the optimal position for a popup or tooltip relative to an anchor element, with nudge and flip logic to keep it within the viewport. It is a pure function with no dependencies on the rest of the codebase, making it easily reusable in any frontend project.
A type-safe event emitter implementation that enforces event names and payload types at compile time. It provides a simple API for subscribing and emitting events without external dependencies. This pattern is reusable in any TypeScript project needing typed event handling.