$ show appbaseio/dejavu
Dejavu is a single-page web application that provides a modern UI for browsing, searching, and managing data in Elasticsearch and OpenSearch clusters. It is built with React 18, Redux, Redux-Saga, and Ant Design, and leverages the ReactiveSearch library for search UI components. The application runs entirely client-side, communicating directly with the Elasticsearch REST API. It supports CRUD operations, data import/export (JSON/CSV), field mapping management, term-based filtering, global search, and a search preview builder. The codebase is organized as a monorepo with two packages: a reusable browser component library (`@appbaseio/dejavu-browser`) and the main application (`dejavu-main`). The architecture follows a standard Redux pattern with sagas for side effects, and uses react-virtualized for high-performance data grids. While the code is well-structured and feature-rich, it relies on several outdated dependencies (Redux 3.x, redux-saga 0.16, react-router-dom 4.x, emotion 9.x) and uses Flow type annotations, which are now deprecated. The project appears to be in a stale maintenance state with no recent commits.
The LLM identified 3 files worth highlighting for reuse:
Implements a robust search-after pagination mechanism for exporting large datasets from Elasticsearch. It handles version-specific sort logic (ES 5, 6, 7, 8+ and OpenSearch), chunks data into manageable sizes (up to 100k docs), and supports both JSON and CSV export via papaparse and file-saver. The pattern is reusable for any Elasticsearch client needing to export large result sets efficiently.
A smart cell component that maps Elasticsearch field types (boolean, integer, float, date, object, text, keyword, etc.) to appropriate editable or view-only sub-components (BooleanCell, NumberCell, DateCell, TextCell, ObjectCell, ArrayCell). It demonstrates a clean strategy pattern for rendering different data types in a grid, and is easily reusable in any data display context that needs type-aware cell rendering.
Detects the Elasticsearch or OpenSearch version by querying the root endpoint and falling back to index settings if the root fails. It normalizes OpenSearch versions to ES 8.x for feature flagging. This utility is self-contained and can be reused in any JavaScript client that needs to determine the ES/OS version for API compatibility.