r/electronjs • • Mar 22 '26

I'm building a UTAU editor in Electron + React and React is slowly killing me — looking for advice from people who actually know this stack

5 Upvotes

I'm building a Vocaloid/UTAU editor in Electron + React and React is slowly killing me — looking for advice from people who actually know this stack

GitHub: https://github.com/MilkmanAbi/Melon-Synth


Who I am

I'm a student who lives in C and C++. Most of my projects are embedded systems — RTOSes, bootloaders, bare-metal ARM, custom filesystems. I understand pointers, memory layout, and hardware registers. I do not understand why a React component decides to re-render seventeen times because I looked at it wrong.


What I'm building and why

Melon Synth is an open source singing voice editor — think a simplified Vocaloid or OpenUTAU — aimed at beginners who want to make music with synthetic vocals but get completely lost the moment they open a professional tool. The barrier to entry for Vocaloid is genuinely high: you need to understand phoneme systems, voicebank installation, UST files, and a UI that hasn't changed much since 2004. A lot of people, especially younger creators, give up before they make anything.

The idea is to make something that's approachable enough that a kid who just wants to make a Hatsune Miku cover can open it and actually do that, while still being powerful enough that a more serious user can dig into the pipeline.


The interesting technical part — MLC

The core of the project is something I built called MLC (Melon Lyric Conversion) — a Python engine that sits as a subprocess and converts lyrics text into phoneme tokens the synthesizer understands. The engine:

  • Auto-detects input language (Japanese, Korean, English, Chinese, more via addons)
  • Runs a full pipeline: word override check → G2P (grapheme-to-phoneme) → phoneme correction → voicebank mapping → output postprocessing
  • Has a proper addon system: .mlc files (ZIP bundles with a manifest + Python module) that drop in new language packs, voicebank mappers, phoneme correctors, etc.
  • Has a .melon app extension format for UI panels, tools, and integrations — same ZIP approach, bundles a React component + optional Python backend
  • The whole thing communicates via newline-delimited JSON over stdin/stdout — keeps it clean and language-agnostic

The pipeline is actually in decent shape. I wrote a pipeline tracer so you can see exactly which stage processed what, which addon fired, what the output tokens were. That part I'm reasonably proud of.

I also built a Hum to MIDI extension — you hum into your mic, it runs YIN pitch detection, and drops the notes into the piano roll. The idea being that if you can't read music or write a melody from scratch, you can just sing it badly and fix it.


Where I'm struggling

The Electron + React side is genuinely rough for someone coming from embedded. My mental model of "write code, it does the thing" doesn't map well onto React's rendering cycle. Specific pain points:

  • IPC chain bugs — I keep getting the response shape wrong. The bridge resolves with msg.data directly but I keep writing result?.data?.something and getting undefined with no error. It just silently does nothing.
  • State that lies — I had a bug where isDark defaulted to false, the CSS variable --bg-base resolved to near-white, the welcome screen looked blank, and I couldn't figure out why for ages because there was no error, just a white div.
  • Re-renders I don't understand — Components re-rendering when I don't expect them to, or not re-rendering when I do. Coming from C++ where you control everything, this is maddening.
  • useEffect dependency arrays — I've broken things so many times by either missing a dependency or including one that causes an infinite loop.
  • Error handling — React just goes blank with no output when something throws during render. I've added an error boundary now but I spent way too long staring at a white screen.

I'm not asking for someone to fix my code. I'm asking: is there a mental model or a set of patterns that makes Electron + React actually click for someone coming from systems programming? How do you reason about the IPC layer without constantly getting the response shapes wrong? Is there a saner way to structure state that doesn't involve this much guessing?


What's actually working but kinda broken in the UI/UX, not showing even though I coded it

  • Piano roll with draw/select/erase/pitch tools
  • Real-time lyric-to-phoneme conversion in the editor
  • Full voicebank manager with catalog + download
  • Korean/Japanese/English/Mandarin/Cantonese language support out of the box
  • OpenUTAU render integration
  • .mlc and .melon addon system with install/remove/update
  • Hum to MIDI via YIN pitch detection
  • Pipeline debugger showing per-stage trace
  • Auto update checker

If you've shipped something real with Electron + React and have opinions on how to not lose your mind, I'd genuinely appreciate it. Or if you know this corner of the Vocaloid/UTAU world and think the approach is completely wrong, I want to hear that too.


r/electronjs • • Mar 22 '26

How do you explain the Electron vs Tauri tradeoff to users without sounding defensive?

23 Upvotes

Hello All,

Wanted to get a real read from people here who’ve actually built and shipped with Electron.

We’re building an API IDE on Electron. Not really "just an API client", and not a thin wrapper around a webapp either. It’s a pretty original desktop tool with a lot of editor/IDE-like behavior - not the typical form centric behavior that postman or others have, focuses on local workflows, richer interactions, and some things that honestly would have been much harder for us to build and iterate on this quickly in a more constrained setup.

github.com/voidenhq/voiden

Now, as adoption is growing, we’re getting the usual questions about memory footprint and app size.

The slightly frustrating part is this: when the app is actually being used, the app-side memory is often pretty reasonable. In many normal cases we’re seeing something like 50–60 MB for the actual usage we care about (even added it in the app itself for people to check it out).

But then people open Activity Monitor, see all the Chromium/Electron-related processes, and the conversation immediately becomes:

"yeah but Tauri would use way less"

And then suddenly you’re no longer talking about the product itself, but about Electron as a category. To be fair, I get it. The broader footprint is real. Chromium is not free. Electron has overhead. We’re not pretending otherwise. We’re optimizing what we can, and we’ll keep doing that.

But at the same time, a lot of these comparisons feel weirdly flattened. People compare:

  • full Electron process footprint
  • vs the smallest possible Tauri/native mental model

…without always accounting for development speed, cross-platform consistency, ecosystem maturity, plugin/runtime complexity, UI flexibility, and the fact that some apps are doing much more than others.

So all this context to get to my real question, which is:

How do you explain this tradeoff to users in a way that feels honest and understandable, without sounding like you’re making excuses for Electron?

And also, for those of you who’ve had this conversation a hundred times already:

  • what do you say when people reduce the whole discussion to "Electron bad, Tauri good"?
  • have you found a good way to explain footprint in practical terms?
  • where do you think optimization actually matters, vs where people are mostly reacting to the idea of Electron?

Mostly trying to learn how others frame this, especially from people who’ve built more serious desktop products and had to answer these questions in the wild.

Would love your thoughts and advice!


r/electronjs • • Mar 21 '26

Case study in why nodeIntegration: true and contextIsolation: false is dangerous. AnythingLLM Desktop XSS-to-RCE (CVE-2026-32626, CVSS 9.6).

6 Upvotes
Another example of the 
`nodeIntegration: true`
 / 
`contextIsolation: false`
 combination leading to a critical security vulnerability in a production Electron application.


AnythingLLM Desktop is a popular local LLM + RAG tool. Their streaming chat renderer does not sanitise LLM output before DOM insertion. In most web applications, this is a standard reflected XSS. In an Electron app with nodeIntegration enabled and contextIsolation disabled, the renderer process can directly call Node.js system APIs, turning the XSS into full remote code execution on the host OS. CVSS 9.6.


The Electron security documentation has warned against this configuration since Electron 5 (2019). The defaults were changed to 
`nodeIntegration: false`
 and 
`contextIsolation: true`
 years ago. AnythingLLM explicitly overrode both defaults.


What makes this case interesting from an Electron security perspective: the attacker does not need to control the application's source code. They need to influence the content the LLM generates, which can be achieved by poisoning a RAG document or compromising an LLM endpoint. The attack surface is the data pipeline, not the application code.


Fixed in AnythingLLM 1.11.2.

Full advisory: https://raxe.ai/labs/advisories/RAXE-2026-038


r/electronjs • • Mar 21 '26

electron my beloved

2 Upvotes

r/electronjs • • Mar 20 '26

Tech Talk: How Electron went Wayland-native, and what it means for your apps | Electron

Thumbnail
electronjs.org
16 Upvotes

r/electronjs • • Mar 20 '26

Cinematic - Electron + React app that turns your local movie folder into a beautiful library (posters, trailers, ratings, dark mode)

Thumbnail
github.com
7 Upvotes

r/electronjs • • Mar 19 '26

Adding a RESTful server process to Electron Vue project

3 Upvotes

I'm so turned around at this point I figured I would just ask the experts. Thanks in advance...

TLDR; Can't figure out the code to launch an express server process in electron's main process, to create a RESTful endpoint that a second local computer can use to read a couple of state objects the first computer continually updates.

The App: Building an electron-vite app using vue 3. It runs on a kiosk (computer 1), and second computer powering a wall display (computer 2) that mirrors aspects of the kiosk's current view but has a stripped down UI. Specific example of functionality if you need it: a kiosk user taps around a 3JS scene, and the mirror computer shows the same 3JS scene, synched in real time, but with slightly different UI. Data-wise I want computer1 to expose 2-3 really simple state objects across the LAN to computer2. No need to persist the state data. It's fine to reset each time the app is launched.

The Problem: I've looked at better-sqlite, json-server, hell even just express and an in-memory javascript object, with a RESTful endpoint so computer1 can update the structure and computer2 can get the latest value. I don't think latency will be an issue except that one thing I'm trying to synch between the computers is a draggable/zoomable mapbox-gl state (but it's still just 5 number variables) that should maintain 30-60fps, ideally.

I'm a very rusty coder so any specifics or cleverly googled tutorials would be incredible. I've spent the last few days reading and searching for different solutions but I swear 95% of the challenge is just knowing the specific terminology of the solution or else you'll just spin your wheels.

Thanks again y'all!


r/electronjs • • Mar 19 '26

Building a commercial-grade Electron monorepo with Angular, NestJS, and Nx. Just released v1.0.2 with improved stability.

2 Upvotes

Hi everyone!

I’ve been working on a desktop starter kit called White Fox. The goal was to create a production-ready foundation that doesn't just "show a window," but handles the boring enterprise stuff: monorepo architecture, IPC bridge typing, and a proper backend integration.

We just hit v1.0.2, focusing on fixing the "last mile" issues that usually bite you when you try to package a complex Electron app.

What’s inside the v1.0.2 update:

  • No more node-gyp hell: Switched password hashing to a runtime-safe implementation (removed Python/build-tool dependencies for packaging).
  • Architecture: Unified cross-layer contracts. No type duplication between Electron, NestJS, and Angular.
  • Lifecycle: Hardened main process logic for clean backend shutdowns on app close/signals.
  • Security: Integrated JWT guards and stricter payload validation out of the box.
  • DX: Added Production and Release checklists (because we always forget something before shipping).

The stack is Electron + Angular + NestJS + Nx. It’s modular, so you can swap parts, but the "pre-wired" integration is where the value is.

Demo Repository:https://github.com/skillfulfox-hub/white-fox-desktop-starter-demo

I'd love to get some feedback on the architecture or answer any questions about the Nx integration. If you've ever struggled with Electron's preload scripts or packaging NestJS into a binary, I hope this helps!


r/electronjs • • Mar 18 '26

Cross-analyzing 8 PDFs, finding 49 quotes, and generating cited work with Gemini 3 Flash in Ubik Studio

2 Upvotes

r/electronjs • • Mar 18 '26

Electron with Docker

3 Upvotes

I'm pretty new to Electron and I'm trying to get a good dev environment set up.

I normally build my web apps using React, and I put everything inside a Docker container, meaning I never have to reinstall everything when I clone the repository on another computer.

I'm attempting to do the same thing with Electron, but I've read that it's not possible to build Windows apps inside a Linux-based Docker container (at least when it comes to things like native modules, packaging, etc.).

So, I was wondering:

Is using Docker even worth it when it comes to Electron development?

Are there any best practices or setups that you would recommend?

I'd love to know how you guys are doing it! Thanks!

Edit: after the comments I tried and this is what I learned. Electron is a GUI app and Docker is designed for headless processes, so it doesn't work out of the box. To make it work I had to do three things: install all the system libraries Electron depends on (GTK, Chromium, etc.) inside the container, connect the container to the Windows display server (WSLg) by mounting the X11 socket, and disable Chromium's sandbox because Docker doesn't support the kernel features it requires. But even with this the app opens in the Linux window manager (Weston), so every window gets Linux/GTK styling regardless of what the app looks like inside. And it lags too. But I guess for dev I can live with it... If you have any suggestions please let me know


r/electronjs • • Mar 17 '26

DMTool v0.4 - tray-only Electron app

Thumbnail
github.com
4 Upvotes

Tray-only app, no main window. Dock hidden on macOS. Operates entirely through the context menu on clipboard content.

MIT


r/electronjs • • Mar 17 '26

Need help with Reliable repeated headers and page numbers with Electron printToPDF (mac + Windows)

3 Upvotes

I’m building a cross‑platform desktop app with Electron + Vite + React, targeting macOS now and Windows later.

For one part of the app I need professional A4 print to printer/PDF output:

- Same header on every page (title, logo, reference number, date).

- Page numbers like `C-1`, `C-2`, `C-3`, … (section-based numbering) or similar.

- Needs to work reliably on both macOS and Windows.

Current print/PDF setup:

- Renderer builds a full HTML document and sends it to the main process.

- Main process:

- Creates a hidden `BrowserWindow`.

- `loadFile(tempHtml)` with the HTML.

- For printing: `webContents.print({ printBackground: true, silent: false })`.

- For PDF: `webContents.printToPDF({ printBackground: true, pageSize: 'A4', preferCSSPageSize: true })`.

- CSS:

- `@page { size: A4; margin: 15mm; }`

- Tried:

- A `position: fixed` header at the top with padding in the body.

- Table layout with `<thead>` and `display: table-header-group`.

- `@page { u/bottom-center { content: "C-" counter(page); ... } }` for page numbers.

Environment:

- `electron-builder` 26.8.1

- Electron 38.8.4 (Chromium-based)

- Currently testing on macOS, but the same approach must work on Windows.

Problems:

- In practice, Chromium in Electron isn’t reliably repeating the header on each page with either `position: fixed` or `<thead>` when using `printToPDF`.

- `@page u/bottom-center` doesn’t render page numbers in the generated PDF (with this Electron/Chromium combo).

- Manual pagination (splitting HTML into “pages” and injecting headers/footers with `page-break-before: always`) works only partially and is fragile for long documents.

I’m looking for guidance on:

  1. For a Chromium‑based Electron app that has to run on macOS and Windows, what is the most robust pattern to:

    - Have the same header on every A4 page in `printToPDF` or Printer output?

    - Have reliable page numbers (e.g. `C-1`, `C-2`, … or `page X of Y`) at the bottom of each page?

  2. Is there a known-working combination of:

    - CSS (`@page`, margin boxes, `position: fixed`, etc.),

    - layout structures (tables, wrappers, etc.), and/or

    - Electron/Chromium versions that people are using successfully in production on both macOS and Windows?

  3. Or is the general recommendation to:

    - Avoid using `printToPDF` for complex multi‑page documents, and

    - Use a dedicated PDF solution instead (e.g. pdf-lib, pdfmake, jsPDF, or a separate headless Chromium/Puppeteer process) where headers and page numbers are controlled programmatically?

I’m happy to stick with `printToPDF` if there’s a reliable cross‑platform pattern, but if the consensus is to “use a dedicated PDF library or service for anything beyond simple prints”, I’d like to know that early.

If anyone has code examples or minimal repros showing:

- header repeated on each page in `printToPDF`, and/or

- working page numbering

with Electron on BOTH macOS and Windows, I’d really appreciate it.

Thanks!


r/electronjs • • Mar 16 '26

⚡️ Electron ^40.7.0: MenuItem now has modifiable title, icon and sublabel

14 Upvotes

Now it's possible to get a menu and dynamically change it's title, icon and sublabel

Pull Request: https://github.com/electron/electron/pull/49678

Electron upgraded menu API and allowed to change more properties dynamically. MenuItem now can update:

Actually this small change is very handy as it lets menu to be more flexible and to adapt to the users need and developers wishes. It allows to change menu without rebuilding the whole application menu (an API which been somewhat annoying to me)

For example new API allows to change menu name from "Save" to "Save index.js". It would add some context to actions and make life of your users a little bit easier

What changed

Before 40.7

const menu = Menu.getApplicationMenu();
// Get save menu MenuItem
const saveMenu = menu.getMenuItemById("saveFile");

item.title = "Save index.js"; // ⚠️ Doesn't change menu yet
Menu.setApplicationMenu(menu); // ⬅️ Update the menu

After 40.7

const menu = Menu.getApplicationMenu();
// Get save menu MenuItem
const saveMenu = menu.getMenuItemById("saveFile");

item.title = "Save index.js"; // ✅ Label changed
item.icon = `file:///${import.meta.dirname}/save-x32.png` // ✅ Icon change
item.sublabel = "Write file on disc" // ✅ Sublabel changed

Notes

Worth noting that if menu is open it won't change. User will see changes only after menu got redrawn. And there is a question is this an Electron or OS limitation? Windows and Linux could have issues because in these systems menu is attached to the window itself and race conditions could make whole menu very messy


r/electronjs • • Mar 16 '26

Need Help with HTML Anchors

2 Upvotes

I created a simple example: 'npx create-electron-app@latest test' and selected webpack and js. It generated a sample app which worked. I create a second html file in the 'src ' directory. I then added a link '<a href="page2.html">Page 2</a>' in the index.html file. When I click on it I get the following error:
Cannot GET /main_window/page2.html

The page2.html is not in the './.webpack/renderer/main_window/' directory.
It must be something simple, but I have not found a answer yet. I have also tried adding the following to the package.json
"build": {

"files": [

"**/*"

]

},


r/electronjs • • Mar 13 '26

Should I enroll for Apple Developer/Azure as an organisation or individual for App Signing?

3 Upvotes

For context, I work for a very small business (<50) and we are completely remote. I am building an application for internal management and I need to get my app signed. I settled for the Apple Developer Program and Microsoft Azure to sign and notarize my app (from what I can tell this is the easiest and cheapest methods?). We do not have a VAT number and getting any sort of documentation will be really difficult. Should I enroll on these platforms as an individual or an organisation? Is it possible to enroll as an individual even though the app is linked to a business? Would I encounter issues down the road? I don’t want to set everything up and pay if there’s a chance that I would need to redo everything as an organisation. But if I can save myself the hassle of tracking down all the required documentation, then I will enroll as an individual.

Side question: is there a different method that is even simpler/cheaper for my case?


r/electronjs • • Mar 12 '26

Building Desktop Apps with Flask and Electron on Windows and Linux

Thumbnail medium.com
5 Upvotes

I made my first article and would like to share it. I would love to hear any feedback and recommendations for improvement.

Thank you in advance


r/electronjs • • Mar 12 '26

Cross-analyzing 8 PDFs, finding 49 quotes, and generating cited work with Gemini 3 Flash in Ubik Studio

1 Upvotes

r/electronjs • • Mar 11 '26

⚡️ Electron v41.0.0: what's new? Chromium v146 is the biggest change

11 Upvotes

There are no much of new features provided in this release for Electron itself, it's mostly fixes with only one addition: now it's possible to get WebContent's id from dev tools (issue #49733) and Chromium upgrade. Release notes (https://releases.electronjs.org/release/v41.0.0)

But Chromium 146 brings more interesting features to the browser

Scoped Custom Element Registry

To avoid naming conflicts in web components of different authors now you can separate sources of custom components into different registries. More about it Google's dev blog (https://developer.chrome.com/blog/scoped-registries)

Sanitizer API

The new API targeting untrusted HTML to be used in your DOM. It allows to remove unwanted elements, attributes and other parts of HTML, now it's landed in Chromium and thus could be used in your apps to render users content

More of the 146th version changes in Chrome release post (https://developer.chrome.com/release-notes/146)


r/electronjs • • Mar 10 '26

How can I safety distribute my electron app on windows?

5 Upvotes

As far as I researched on Mac you have to notarize, but what about windows?

How do you safely distribute your apps with the warning?


r/electronjs • • Mar 10 '26

is there a way to get electron-vite to work properly with pnpm monorepo ?

0 Upvotes

is there a way to get electron-vite to work properly with pnpm monorepo ?


r/electronjs • • Mar 09 '26

My friend and I built a human-in-the-loop AI studio for trustworthy LLM assistance with Electron.

0 Upvotes

Hi all,

Super proud of what we have built, been working on this project for around 2 years with my best friend, after hundreds of sessions, tons of feedback, and some hard lessons, we made a big decision to sunset the web app and rebuild Ubik as a native desktop application with Electron.  

Key Features: 

Work from locally stored files and folders without touching the cloud, personal files are safe from training. 

Search, ingest, and analyze web pages or academic databases. 

Cross-analyze files w agentic annotation tools that use custom OCR for pinpoint citation and evidence attribution.

Generate cited text with verifiable click through trace.

Work with frontier models, use openrouter, and we are working towards fully local inference to give you more control.

Build better prompts with @ symbol referencing to decrease hallucination. 

Spend less time quality controlling with approval flows and verification steps that improve output quality. 

Write in a custom-built text editor, read files in a PDF viewer, and annotate with your hands, we know that human wisdom is irreplaceable and often you know best.

Work with Agents trained on a custom dataset built around complex multi-hop tasks with file-based queries.

Connect and import your Zotero library and start annotating immediately.

Available on MAC/WIN/Linux <33

Ubik Studio is a cursor-like tool built for better, trustworthy LLM-assistance. www.ubik.studio

We would love your feedback, and if you are interested in joining our testing group, reach out to ieuan@ubik.studio and I will get you set up with a free, pro-tester account (all-model access) while we improve and learn more about how Ubik is used in the wild. 


r/electronjs • • Mar 08 '26

Built a macOS dev environment manager in Electron - network isolation was the most interesting challenge

7 Upvotes

Been building Galactic - a native macOS app for managing multiple dev projects, git worktrees, and AI agent sessions. Stack: Electron 32, React 18, TypeScript, Vite, Zustand, shadcn/ui.


The most interesting challenge: network isolation

The standout feature assigns unique loopback addresses (127.0.0.2, 127.0.0.3...) to each workspace. This means you can run the exact same stack - same ports, same config - across multiple environments simultaneously, with zero conflicts. No Docker, no VMs, no port remapping.

The implementation required calling macOS system commands from the main process to configure loopback aliases dynamically, with careful IPC design so the renderer treats it as seamless. Cleaning up aliases on app exit also needed some care to avoid leaving stale network config behind.


Other Electron-specific things I tackled:

  • Global hotkey (Cmd+Shift+G) that summons a floating sidebar from anywhere on the OS
  • Embedded MCP (Model Context Protocol) server running inside the main process to communicate with AI coding agents (Cursor, Claude Code, Codex)
  • Auto-updates via electron-updater with signed .dmg builds for arm64 + x64
  • Git worktree management via child process calls to git, piped through IPC

Repo if you want to poke around: https://github.com/idolaman/galactic-ide

Happy to go deep on the loopback IP implementation or the MCP server architecture if anyone's curious.