$ show saltyshiomix/nextron
Nextron is a CLI tool and scaffolding system that integrates Next.js with Electron for building cross-platform desktop applications using web technologies. It provides a streamlined development experience by orchestrating Next.js dev server, webpack bundling for Electron main and preload scripts, and optional production packaging with electron-builder. The repository contains the core library (CLI, build helpers, webpack configurations) and a rich set of example projects demonstrating integrations with UI frameworks (Ant Design, Chakra UI, Material UI, Tailwind CSS, Emotion, i18next) and features like window state persistence, static export, and custom build options. The architecture is monolithic, centered around a command-line interface with `dev` and `build` commands, and the codebase shows disciplined engineering with TypeScript, ESLint, Prettier, and lefthook. While primarily a development tool, its examples serve as practical templates for Electron+Next.js application patterns.
The LLM identified 3 files worth highlighting for reuse:
Provides a self-contained, parameterized base webpack configuration for the Electron main process. Handles module resolution for Node builtins, external dependencies, and target-specific compilation using ts-loader. This module can be extracted and reused in any Electron+webpack project with minimal adaptation.
Similar to the main config, this defines the base webpack configuration for Electron preload scripts, adjusting for the sandboxed environment and context bridge pattern. Reusable independently for projects needing a preload webpack setup.
A well-structured helper for creating an Electron BrowserWindow with state persistence using electron-store. It saves and restores window position and size, applies saved state on creation, and watches for move/resize events. This is a clean, reusable pattern that can be dropped into any Electron app with minimal changes.