Rectron is a customized Electron + React template focused on type safety, clean preload APIs, and fast development workflow.
- 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
Rectron automatically generates window.d.ts based on src/main/preload.ts.
Write APIs once in preload.ts — typings stay in sync automatically.
contextBridge.exposeInMainWorld("electron", {
dialog: {
pickImage: async (): Promise<PickImageResult> => {}
}
});Auto-generated:
declare global {
interface Window {
electron: {
dialog: {
pickImage: () => Promise<PickImageResult>;
};
};
}
}yarn installyarn devyarn package
yarn make