Skip to content

Architecture

EncodeX is a cross-platform multimedia conversion tool built on FFmpeg, React, TypeScript, and Electron. It is intended for developers who want to understand how the pieces fit together before contributing.

EncodeX architecture

Design Principles

The renderer never spawns processes and never touches the filesystem directly. All privileged operations (file dialogs, FFmpeg execution, probing, window control) live in the main process and are reached through IPC.

  • Three-process separation — main, preload, and renderer, following Electron's security model (contextIsolation: true, nodeIntegration: false).
  • A single abstraction over media backends — the ITranscoder interface hides whether conversion is driven through fluent-ffmpeg, a raw FFmpeg CLI child process, or the BMF framework.
  • IPC as a typed contract — every channel is a constant in src/shared/ipc-channels.ts, and the renderer only ever talks to the main process through the window.electronAPI bridge exposed by the preload script.
  • Shared types and constantssrc/shared/ is imported by all three processes so interfaces stay in sync by construction.
  • Progressive enhancement of the UI — pages are code-split with React.lazy, state lives in Zustand stores, and long-running jobs stream progress back over IPC events.

Deep Dives

The full architecture is split into focused documents:

DocumentTopics
Processes, Build System & StartupProcess model (main/preload/renderer/shared), build system, binary resolution, startup sequence, CLI mode
Transcoder Abstraction & ConversionITranscoder interface, FfmpegCore / FFToolCore / BmfCore, shared flag building, hardware acceleration
Renderer, State & SubsystemsRender tree, pages, hooks, Zustand stores, batch queue, video player, timeline media, image processing

Additional Documentation

DocumentTopics
CLI UsageCLI usage, subcommands, all option tables
IPC ChannelsIPC channels (request/send-only/events), electronAPI bridge
TestingTest suite (123 files, 1603 tests), test setup, E2E specs
Project StructureFull directory tree with annotations
Update ManagerIn-app update manager implementation

Released under the MIT License.