코딩 · 개발원문 · prompts.chat
안전한 Electron 데스크톱 앱 개발 규칙
보안성과 유지보수성을 갖춘 Electron 데스크톱 앱을 개발하기 위한 컨벤션을 제시합니다.
원제 · Electron App taste
- 추천 툴
- 코딩 에이전트형식 기준 추천
프롬프트 원문
# Electron App taste of a desktop developer who takes security seriously - Keep `contextIsolation: true` and `nodeIntegration: false` on every `BrowserWindow`; these are non-negotiable defaults. Confidence: 0.98 - Enable `sandbox: true` for renderers and give each window the smallest preload script it needs. Confidence: 0.90 - Expose a narrow, typed API from the preload with `contextBridge.exposeInMainWorld` instead of passing `ipcRenderer` through. Confidence: 0.95 - Use `ipcMain.handle` and `ipcRenderer.invoke` for request and response calls, and validate every argument in the main process. Confidence: 0.90 - Check the sender frame on IPC messages so only your own pages can call privileged handlers. Confidence: 0.80 - Set a strict Content Security Policy and never load remote code into a window with privileged preload access. Confidence: 0.90 - Block unexpected navigation with `will-navigate` and `setWindowOpenHandler`, and open external links in the system browser with `shell.openExternal` after allowlisting the URL. Confidence: 0.90 - Serve local content through a custom protocol instead of `file://` so origin rules and CSP behave predictably. Confidence: 0.75 - Write the main, preload and renderer code in TypeScript, sharing IPC channel types from one module. Confidence: 0.85 - Use Electron Forge or electron-builder with Vite for building and packaging rather than a hand-rolled script. Confidence: 0.80 - Keep heavy work out of the main process; use utility processes or worker threads so the UI never freezes. Confidence: 0.85 - Track the latest supported Electron major and upgrade at least every quarter, since each release carries Chromium security fixes. Confidence: 0.85 - Sign and notarize macOS builds and sign Windows installers before anyone outside the team installs them. Confidence: 0.95 - Ship auto-updates through `autoUpdater` or electron-updater with signed releases and a staged rollout. Confidence: 0.80 - Enable Electron fuses to disable `RunAsNode` and Node CLI inspection in production builds. Confidence: 0.75 - Persist settings and window state in the user data directory, and store secrets with `safeStorage` or the OS keychain, never in plain JSON. Confidence: 0.85 - Restore window size and position on launch and handle multiple displays gracefully. Confidence: 0.70 - Respect platform conventions: the macOS app menu, Windows tray behavior and native keyboard shortcuts. Confidence: 0.75 - Watch bundle size and startup time, lazy-load heavy modules and avoid shipping dev dependencies in the app archive. Confidence: 0.75 - Collect crash reports with `crashReporter` or Sentry and log main-process errors to a rotating file. Confidence: 0.75 - Run end-to-end tests with Playwright's Electron support against the packaged app, not only the dev build. Confidence: 0.70
출처 · prompts.chat 공개 프롬프트 모음 · 작성 Fatih Kadir Akın — CC0(저작권 포기)로 공개된 원문을 그대로 싣습니다. 한국어 제목 · 설명은 AI 번역이며, 실행 결과는 아직 없습니다.
같은 분야 프롬프트 코딩 · 개발
더 보기 ›- 텍스트 결과
코딩 · 개발 · Claude Code
전체 코드 버그 종합 분석
프로젝트 코드 전체의 보안 취약점과 로직 오류를 체계적으로 분석하고 수정 보고서를 만듭니다.
기법 · 역할 부여 · 단계별 사고 · 출력 형식 지정
- 텍스트 결과
코딩 · 개발 · Claude Code
레트로 게임 AI 코딩 연출
AI로 웹 게임 개발 시 불필요한 텍스트 연출을 막고 레트로 사운드와 UI를 깔끔하게 구현합니다.
기법 · 네가티브 제약
- 웹 화면(HTML)텍스트 결과
코딩 · 개발 · 공통
공장 AI HMI 시뮬레이터 제작
공장 작업자의 AI 시스템 대응 교육용 단일 HTML 웹 HMI 시뮬레이터를 즉시 구축할 때 활용합니다.
기법 · 역할 부여 · 단계별 지시 · 출력 형식 지정