{"id":14978523,"url":"https://github.com/itw-creative-works/electron-manager","last_synced_at":"2026-06-10T06:01:45.491Z","repository":{"id":46696040,"uuid":"329405215","full_name":"itw-creative-works/electron-manager","owner":"itw-creative-works","description":"An NPM module with tools, helper functions, and utilities for building a flawless Electron app 🚀","archived":false,"fork":false,"pushed_at":"2026-05-12T02:44:35.000Z","size":2476,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-12T03:29:42.205Z","etag":null,"topics":["css","electron","electron-app","electronjs","front-end","html","javascript","module","npm","npm-package"],"latest_commit_sha":null,"homepage":"https://itwcreativeworks.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itw-creative-works.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-13T19:03:51.000Z","updated_at":"2026-05-12T02:43:18.000Z","dependencies_parsed_at":"2025-04-19T03:05:23.034Z","dependency_job_id":"e38e7ec7-7d1e-499b-b393-8298dada3941","html_url":"https://github.com/itw-creative-works/electron-manager","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"334719a8a8bc0d58821a39f7a8c0137f4212ed4c"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/itw-creative-works/electron-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itw-creative-works%2Felectron-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itw-creative-works%2Felectron-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itw-creative-works%2Felectron-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itw-creative-works%2Felectron-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itw-creative-works","download_url":"https://codeload.github.com/itw-creative-works/electron-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itw-creative-works%2Felectron-manager/sbom","scorecard":{"id":497700,"data":{"date":"2025-08-11","repo":{"name":"github.com/itw-creative-works/electron-manager","commit":"f164cbe95b5cf38a80b4bbae0af522e6d50dc6c4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T20:55:06.983Z","repository_id":46696040,"created_at":"2025-08-19T20:55:06.983Z","updated_at":"2025-08-19T20:55:06.983Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34139179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","electron","electron-app","electronjs","front-end","html","javascript","module","npm","npm-package"],"created_at":"2024-09-24T13:57:50.793Z","updated_at":"2026-06-10T06:01:45.486Z","avatar_url":"https://github.com/itw-creative-works.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://itwcreativeworks.com\"\u003e\n    \u003cimg src=\"https://cdn.itwcreativeworks.com/assets/itw-creative-works/images/logo/itw-creative-works-brandmark-black-x.svg\" width=\"100px\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eElectron Manager\u003c/strong\u003e — all-in-one development framework for Electron apps. Sister project to\n  \u003ca href=\"https://github.com/itw-creative-works/browser-extension-manager\"\u003eBrowser Extension Manager\u003c/a\u003e and\n  \u003ca href=\"https://github.com/itw-creative-works/ultimate-jekyll-manager\"\u003eUltimate Jekyll Manager\u003c/a\u003e.\n\u003c/p\u003e\n\n## What it does\n\n- **One-line bootstrap** per Electron process: `require('electron-manager/main')`, `/preload`, `/renderer`.\n- **Modular feature library** — storage, IPC, tray, menu, context menu, window manager, startup, app-state, deep-link, auto-updater, web-manager auth, Sentry, **analytics, context, usage, remote-config, restart-manager**. Each feature is its own module with documented API.\n- **Cross-platform analytics identity.** GA4 Measurement Protocol with `client_id = uuidv5(deviceId, projectIdNamespace)` and `user_id = uuidv5(firebaseUid, projectIdNamespace)`. Same Firebase project ID in BEM/UJM/web-manager/EM produces identical `user_id` outputs everywhere → unified events for one human across desktop + web + backend, no manual stitching.\n- **\"Hot config\"** fetched from your brand site (`\u003cbrand.url\u003e/data/resources/main.json`) and polled hourly — flip a force-update version, default user-agent, ad rotation, etc. without re-releasing. `manager.remoteConfig.get('versionRequired')`. Cached to storage so offline boots still have last-known values.\n- **File-based feature definitions** — trays, menus, and context-menus are JS files (full power, no DSL): `src/integrations/{tray,menu,context-menu}/index.js`. All three ship sensible **id-tagged defaults** (legacy-EM-style: about, preferences, check-for-updates, dev menu w/ inspector + log folders, etc.) and share the same **id-path mutation API**: `find`, `update`, `remove`, `enable`, `show`, `hide`, `insertBefore`, `insertAfter`, `appendTo`. Any default item is one line away from removal, customization, or repositioning.\n- **Lazy windows + Discord-style hide-on-close.** EM doesn't auto-create any windows — your `main.js` calls `windows.create('main', { show: !startup.isLaunchHidden() })`. The `main` window's X button hides instead of quitting on every platform; real quit only via Cmd+Q / menu Quit / tray Quit / auto-update install. Inset titlebar by default (mac `hiddenInset` traffic lights / win native overlay buttons / linux native frame) with a draggable topbar in the page template.\n- **Zero-bounce hidden-launch on macOS.** `startup.mode = 'hidden'` bakes `LSUIElement: true` into Info.plist at build time → app launches completely invisible (no dock icon, no Cmd+Tab, no taskbar). Tray + notifications + networking still work. When the user double-clicks the running app's icon, EM's `app.on('activate')` (macOS) / `app.on('second-instance')` (win/linux) handler surfaces the `main` window and the dock icon appears alongside it. CleanMyMac-style \"tray-only at login, full window when manually opened\" is the default.\n- **Auto-update background install.** When a download finishes from a background poll (not user-initiated), EM auto-relaunches into the new version after 5s — apps update overnight without bothering the user. User-initiated checks skip this so your UI can prompt instead.\n- **Webpack-bundled** main / preload / renderer for source protection.\n- **Built-in test framework** — Jest-like syntax, four layers: `build` (plain Node), `main` (spawned Electron), `renderer` (hidden BrowserWindow), and `boot` (spawns the consumer's actual built `dist/main.bundle.js` for end-to-end smoke tests against the live manager — no `npm start \u0026\u0026 sleep \u0026\u0026 kill` shell hacks). Boot layer always rebuilds the bundle first so tests never see stale code.\n- **Schema-validated config.** Every field in `config/electron-manager.json` is declared in a canonical schema. Validation runs at app boot AND during `gulp audit` — a misconfigured app never reaches the \"white window of confusion\" stage; it tells you exactly which field is broken with a numbered list. Simple flag model — `required: true | false | (config) =\u003e bool` — and `match` / `enum` / `type` only fire on field presence so consumers never see a flood of redundant errors for the same field. Pure-JS validator, no Ajv/Joi/Zod dep. See [config-schema](docs/config-schema.md).\n- **Multi-platform build/release** via GitHub Actions — macOS sign + notarize, Linux (deb + AppImage + optional Snap), Windows EV-token signing (self-hosted runner now, cloud-signing pluggable). Sensible installer defaults out of the box: NSIS one-click install on Windows (desktop + start menu shortcut, launch on finish), universal mac binary (one .dmg for Intel + Apple Silicon), `app.category` automatically mapped to per-platform values, copyright `{YEAR}` token always current. Snap Store publishing is on by default in the scaffold and auto-skipped at build time when `SNAPCRAFT_STORE_CREDENTIALS` isn't set — drop the credential blob into `.env`, run `mgr push-secrets`, and the next release ships to the Snap Store. See [installer-options](docs/installer-options.md).\n\n## Quick start (consumer)\n\nEM auto-syncs your system Node version to match whatever Node Electron's bundled runtime ships with. `npx mgr setup` queries the official Electron releases feed using your installed Electron version, then writes the corresponding Node major to `.nvmrc`. Run `nvm use` afterward to switch your shell.\n\n```bash\nnpm install electron-manager --save-dev\nnpx mgr setup            # scaffolds project; auto-resolves \u0026 writes correct .nvmrc from electron version\nnvm use                  # switch to the Node version Electron uses (one-time per shell)\nnpm start                # dev: gulp → webpack → electron .\nnpm run build            # local production build (bundles only, no installer)\nnpm run package:quick    # fast packaged build for host platform/arch (.app/.exe-folder/linux-unpacked, ~20-30s) — for smoke-testing packaged behavior\nnpm run package          # full local production package (DMG/zip/universal-mac, NSIS-win, deb+AppImage-linux)\nnpm run release          # signed + published release via GitHub Actions\nnpx mgr test             # run framework + project test suites\n```\n\n## Icons\n\nConvention-only. Drop PNGs at:\n\n```\nconfig/icons/\n  global/             ← used by any platform with no platform-specific override\n    icon.png\n    tray.png\n  macos/              ← macOS overrides (beats global)\n    icon.png\n    tray.png          ← 32×32 — EM renames to trayTemplate.png in dist for OS dark-mode magic\n    dmg.png           ← 1080×760 DMG background\n  windows/            ← Windows overrides\n    icon.png\n    tray.png\n  linux/              ← Linux overrides (otherwise falls back to global → windows)\n    icon.png\n    tray.png\n```\n\nResolution per slot/platform (most specific wins): `\u003cplatform\u003e/\u003cslot\u003e` → `global/\u003cslot\u003e` → (Linux only) `windows/\u003cslot\u003e` → EM bundled default. Tray missing falls back to app icon.\n\n**Ship native (@2x) size only — EM downscales the @1x sibling automatically.** macOS tray must be 32×32; macOS DMG must be 1080×760. EM emits both `\u003cslot\u003e.png` and `\u003cslot\u003e@2x.png` into `dist/config/icons/\u003cplatform\u003e/`. No `app.icons` config block — files are the source of truth.\n\n## Logs\n\nThree logs in `\u003cprojectRoot\u003e/logs/`, each with its own purpose:\n\n| File | What | Lifetime |\n|---|---|---|\n| `runtime.log` | Your packaged app's runtime — main + preload + renderer all converge here via electron-log | Persistent, rotates at 10 MB |\n| `dev.log` | Gulp pipeline output — sass, webpack, html, electron child stdout from `npm start` | Truncated each run |\n| `build.log` | `npm run release` — streamed GH Actions output during a CI release | Truncated each run |\n\n```bash\nnpx mgr logs                  # tail last 50 of runtime.log\nnpx mgr logs --tail           # follow runtime.log live\ntail -f logs/dev.log          # gulp pipeline output\ngrep -i error logs/runtime.log\n```\n\nIn production, `runtime.log` lives at `app.getPath('logs')`:\n- macOS: `~/Library/Logs/\u003cAppName\u003e/runtime.log`\n- Windows: `%APPDATA%\\\u003cAppName\u003e\\logs\\runtime.log`\n- Linux: `~/.config/\u003cAppName\u003e/logs/runtime.log`\n\nSee [docs/logging.md](docs/logging.md) for the full picture (renderer forwarding, log levels, programmatic path access).\n\nOverride gulp's `dev.log` path via `EM_LOG_FILE=\u003cpath\u003e`; disable entirely via `EM_LOG_FILE=false`. The default `.gitignore` includes `logs/`.\n\n## Per-process imports\n\n```js\n// src/main.js\nnew (require('electron-manager/main'))().initialize();\n\n// src/preload.js\nnew (require('electron-manager/preload'))().initialize();\n\n// src/assets/js/components/\u003cview\u003e/index.js\nnew (require('electron-manager/renderer'))().initialize();\n```\n\n## Documentation\n\nEach subsystem has its own API reference under [`docs/`](docs/):\n\n- [storage](docs/storage.md) — KV store, sync in main, async (via IPC) in renderer, dot-notation paths, change broadcasts\n- [ipc](docs/ipc.md) — typed channel bus, `handle` / `invoke` / `broadcast`\n- [windows](docs/windows.md) — lazy named-window registry (no auto-create), bounds persistence, inset titlebar, hide-on-close\n- [tray](docs/tray.md) — file-based tray definition, dynamic items, runtime mutators\n- [menu](docs/menu.md) — file-based application menu, platform-aware default template\n- [context-menu](docs/context-menu.md) — file-based right-click menus, called per-event with `params`\n- [startup](docs/startup.md) — launch modes (`normal` / `hidden`), LSUIElement on macOS, login-item handling\n- [app-state](docs/app-state.md) — first-launch / launch-count / crash-sentinel flags\n- [deep-link](docs/deep-link.md) — cross-platform deep links, single-instance, pattern routing, built-in routes\n- [web-manager-bridge](docs/web-manager-bridge.md) — Firebase auth state synchronized across main + every renderer\n- [auto-updater](docs/auto-updater.md) — startup + periodic checks, 30-day max-age gate, dev simulation\n- [analytics](docs/analytics.md) — GA4 Measurement Protocol with cross-platform `uuidv5` identity (same human → same `user_id` across desktop/web/backend)\n- [context](docs/context.md) — runtime info block (geolocation, client, session, app) — BEM-shaped\n- [usage](docs/usage.md) — opens / hoursTotal / hoursThisSession; clean-exit accumulation\n- [remote-config](docs/remote-config.md) — \"hot config\" fetched from brand site for runtime flag flips without re-releases\n- [restart-manager](docs/restart-manager.md) — auxiliary helper app for relaunches; auto-installs via signed mac.zip / NSIS exe / browser-opened .deb\n- [config-schema](docs/config-schema.md) — canonical schema + validator for `config/electron-manager.json`. Hard-fails boot AND `gulp audit` on missing required fields, regex mismatches, enum violations, type mismatches. Single source of truth in `src/config/schema.js`\n- [templating](docs/templating.md) — `{{ var }}` token replacement, page template, body-only views\n- [themes](docs/themes.md) — classy + bootstrap themes, `@use 'electron-manager' as * with (...)` overrides, per-page CSS bundles\n- [sentry](docs/sentry.md) — error/crash reporting, dev-mode gating, auto auth attribution, release tagging\n- [hooks](docs/hooks.md) — lifecycle hooks (build/pre, build/post, release/pre, release/post, notarize)\n- [installer-options](docs/installer-options.md) — installer/distribution config: NSIS one-click defaults, ia32 inclusion, app.category mapping, `{YEAR}` copyright token, snap publishing (default-on with cred-gated auto-skip), MAS roadmap\n- [signing](docs/signing.md) — macOS + Windows code signing reference, cert files, env vars\n- [releasing](docs/releasing.md) — end-to-end release walkthrough (`.env` → GitHub Release)\n- [runner](docs/runner.md) — Windows EV-token signing runner — `npx mgr runner install`, auto-onboards new GH orgs, `npx mgr runner monitor` for a live signing event tail\n- [test-framework](docs/test-framework.md) — writing tests, running them, layers\n- [test-boot-layer](docs/test-boot-layer.md) — boot test layer (spawns the consumer's actual built bundle for end-to-end smoke tests)\n- [build-system](docs/build-system.md) — gulp, webpack, electron-builder pipeline\n\n## Status\n\nActive development on `v1`. See [`PROGRESS.md`](PROGRESS.md) for pass-by-pass progress.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitw-creative-works%2Felectron-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitw-creative-works%2Felectron-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitw-creative-works%2Felectron-manager/lists"}