Browse docs
Getting Started

Project Structure

A short tour of the folders, what belongs where, and why.

Updated Jul 2026
On this page

Every Electron app has the same three big actors: a main process (Node.js), a preload script (the bridge), and a renderer (your React UI). The boilerplate enforces that split with consistent folders so AI coding tools never have to guess where things go.

Top-level tour

src/
├── main/        # Node.js — windows, native menus, file system, IPC handlers
├── preload/     # contextBridge — safely exposes IPC to renderer
├── renderer/    # Your React UI (sandboxed)
├── shared/      # Types, Zod schemas, and constants shared by main + renderer
├── features/    # One folder per screen (about, ai-demo, settings, ...)
└── logging/     # Logging engine (file + console + Sentry hooks)

Other folders you'll touch occasionally:

  • docs/ — per-subsystem docs (auth, signing, security, distribution, …)
  • e2e/ — Playwright end-to-end tests
  • resources/icon.png (the source for all platform icons)
  • brand/ — logos and screenshots (see Rebranding)

The "5-place IPC pattern"

When you add a new IPC channel — e.g. notes:save — code lands in five places, always the same:

  1. src/shared/ipc/channels.ts — the channel name constant
  2. src/shared/validation/notes.ts — Zod schema for the payload
  3. src/main/ipc/notes.ts — the handler that runs the work
  4. src/preload/index.ts — exposes the channel through contextBridge
  5. src/renderer/hooks/useNotes.ts — typed hook your React code calls

Sound like a lot? It's one command. Plop scaffolds all five:

npm run new:ipc -- --name notes:save

Same for screens:

npm run new:feature -- --name notes

This creates src/features/notes/, registers it in the screens index, and adds a sidebar entry.

Tip

Read CLAUDE.md in the repo root once. It documents every rule (where to put files, what to import, the dependency direction). Tools like Claude Code, Cursor, and Copilot read it automatically and produce code that matches the existing patterns.

Ask your AI assistant

"I want to add a feature that lets users save bookmarks with tags. Following the 5-place IPC pattern in CLAUDE.md, scaffold the channels and the React hook. Don't write UI yet."

What's next

Want everything wired up?

Get the full Desktop App Boilerplate — auto-update, code-signing, license activation, AI primitives, 26 UI components — for $49.

Get it for $49 →