create-next-electron-app
v0.1.2
Published
Next.js + Electron boiler / kick start repo for building desktop apps
Readme
Next Electron App
This repository contains a project that combines Next.js and Electron to create a modern desktop application with web technologies. It leverages the power of Next.js for server-side rendering and Electron for building cross-platform desktop apps.
Features
- Next.js for React-based server-side rendering and routing.
- Electron for creating desktop applications with native capabilities.
- Hot-reloading for both the renderer and main processes during development.
- Cross-platform support (Windows, macOS, and Linux).
Getting Started
Prerequisites
Ensure you have the following installed:
Quick Start with npx
You can quickly create a new Next Electron app using the following command:
npx create-next-electron-app my-appThis will scaffold a new project in the my-app directory with all the necessary configurations to get started.
Manual Installation
Clone the repository:
git clone https://github.com/your-username/next-electron-app.git cd next-electron-appInstall dependencies:
npm install # or yarn install
Development
To start the development environment:
npm run dev
# or
yarn devThis will start both the Next.js development server and the Electron app.
Build
To build the application for production:
npm run package-macThe output will be available in the release-builds/ directory.
Note: You need to first run the app from the terminal inside the macOS app directory:
./release-builds/next-electron-app-darwin-arm64/next-electron-app.app/Contents/MacOS/<appName>After this, the app will be ready to run from the app icon.
Folder Structure
main/: Contains the Electron main process code.renderer/: Contains the Next.js application.public/: Static assets for the Next.js app.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License.
Happy coding!
Buy me a Dosha:
