A simple data persistence module for Electron apps to save and load user preferences, app state, and cache.
Electron Store is a Node.js module that provides simple data persistence for Electron applications. It solves the problem of saving and loading user preferences, application state, and cache by writing to a JSON file in the app's user data directory, as Electron does not include a built-in solution for this.
Electron developers building desktop applications who need a straightforward way to manage user settings, app state, or small cached data without setting up a database.
Developers choose Electron Store for its dead-simple API, cross-process support, and optional features like JSON Schema validation and encryption, which handle common persistence needs with minimal configuration.
Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Offers a minimal, intuitive key-value store with dot-notation support, allowing developers to persist data quickly without complex setup, as shown in the basic usage example.
Integrates JSON Schema draft-2020-12 via AJV to validate config data, ensuring data integrity and providing defaults, which is detailed in the schema option documentation.
Handles IPC communication automatically with initRenderer() or direct instance creation, enabling seamless data access between Electron's main and renderer processes without manual IPC setup.
Allows customization of serialization via serialize/deserialize functions, supporting formats like YAML, as demonstrated in the FAQ for using YAML instead of JSON.
Reads and writes the entire JSON file on every change, making it inefficient for data over 1 MB, as the README explicitly warns against using it for large amounts of data.
No longer provides CommonJS export, forcing projects to convert to ESM, which can be a barrier for legacy codebases or specific tooling, as noted in the install section.
The migrations feature has known bugs and is unsupported by the maintainer, with a note in the API docs advising caution and limited plans for fixes.