Skip to content

Maks1mio/Rectron

Repository files navigation

image

Rectron

Русская документация

Description

Rectron is a customized Electron + React template focused on type safety, clean preload APIs, and fast development workflow.

Key Features

  • Electron Forge + Webpack
  • React + TypeScript renderer
  • Secure preload bridge (contextIsolation: true)
  • Automatic window.d.ts generation from preload.ts
  • Typed window.electron API without manual sync

New Feature: Automatic window.d.ts Generation

Rectron automatically generates window.d.ts based on src/main/preload.ts.

Write APIs once in preload.ts — typings stay in sync automatically.

Example

contextBridge.exposeInMainWorld("electron", {
  dialog: {
    pickImage: async (): Promise<PickImageResult> => {}
  }
});

Auto-generated:

declare global {
  interface Window {
    electron: {
      dialog: {
        pickImage: () => Promise<PickImageResult>;
      };
    };
  }
}

Installation

yarn install

Development

yarn dev

Packaging

yarn package
yarn make

About

Rectron is an open-source aimed at providing a template for building cross-platform desktop applications using Electron and React.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors