sindresorhus/electron-store

Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 12 minutes ago
Added to GitGenius on September 13th, 2026
Created on May 25th, 2016
Open Issues & Pull Requests: 0 (+0)
GitHub issues: Enabled
Number of forks: 166
Total Stargazers: 5,018 (+0)
Total Subscribers: 22 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.5 days
Mean response time: 155.3 days
90th percentile: 420.5 days
Tracked items: 26

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 16
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 923 days
Stale 30+ days: 16
Stale 90+ days: 16

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (2)
  • help wanted (2)
  • :gift: Rewarded on Issuehunt (1)
  • question (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

electron-store is a data persistence library for Electron applications that saves and loads user settings, app state, and cache to a JSON file.

Electron lacks built-in mechanisms for persisting user data across sessions. electron-store solves this by automatically managing a JSON configuration file stored in the user data directory, handling all read and write operations. The library writes changes atomically to prevent corruption if the process crashes during a write. It supports schema validation using JSON Schema draft-2020-12 through the ajv validator, allowing you to enforce data structure and type constraints. The tool works in both the main and renderer processes, though renderer-process-only usage requires initialization in the main process.

The tool suits small data storage scenarios like user preferences and application state. The README explicitly notes that electron-store is not a database and reads and writes the entire JSON file on every change, making it unsuitable for large datasets; SQLite or similar solutions are recommended for that use case. Adoption requires Electron 30 or later and native ESM support, as the package no longer provides CommonJS exports. The library offers optional migration support for handling data structure changes across application versions, though the README indicates this feature has known bugs and limited maintenance.

Development activity shows consistent engagement with bug fixes and feature refinements. The project maintains responsiveness to issues and pull requests. Migration support remains available but explicitly lacks active maintenance, with the maintainer welcoming community contributions for improvements. The codebase prioritizes atomic writes and data integrity as core reliability features.