How paranext/paranext-core works
Project type and purpose
• This is a full-stack, extensible desktop application built on Electron (“Platform.Bible”), combining:
• An Electron shell with Main and Renderer processes (TypeScript/React)
• An Extension Host that dynamically loads and runs extensions via a Plugin/API (PAPI)
• A .NET library (C#) for data providers and business logic
• A collection of first-party extensions in the extensions folder
• Shared libraries (lib/platform-bible-react, lib/platform-bible-utils, lib/papi-dts)
Top-level components (from the file tree)
• .erb/configs, scripts and build tools (Webpack, ESLint, etc.)
• src/ – application source split into:
• main/ – Electron main process and native services (RPC server, data-protection, dotnet provider)
• extension-host/ – manages extensions, provides PAPI, RPC over WebSocket to Renderer
• renderer/ – React UI, Web-View host, state/hooks, services bridging to PAPI
• node/ – auxiliary Node services (file system, execution token)
• client/ – RPC client code
• shared/ – common models, services, RPC definitions used by all processes
• c-sharp/ & c-sharp-tests/ – .NET library code and tests, compiled separately
• extensions/ – dozens of packaged first-party extensions, each with its own build (Webpack, TS, assets)
• lib/ – published libraries (React components, utilities, PAPI type definitions)
Key interactions and architectural patterns
• Electron’s Main ⇄ Renderer via IPC and custom RPC WebSocket (RPC-server in Main, RPC-client in Renderer)
• Extension Host loaded into Main (separate process or thread) ⇄ Extensions via PAPI, also uses RPC/WebSocket
• Main spawns or calls .NET data provider (via dotnet-data-provider.service-host) for heavy processing
• Shared services and models unify communication contracts (RPC models, network objects, project-data providers)
• Renderer uses React + custom Hooks to consume PAPI services (data providers, settings, localization)
• Extensions register contributions (menus, settings, web views) through the Extension Host’s contribution service
Final checklist
• All primary processes/components labeled
• Notes on protocols (IPC, WebSocket-RPC, file-system, dotnet process spawn)
• Adequate detail: Main services, key React components, extension entry points, shared contracts