A boilerplate for building desktop apps with Electron and NextJS.
MIT License
[!TIP] Nextron has been around for long, and has developed quite the userbase (2.8k stars as of writing). Therefore, its a very valid question: why not just use Nextron? And the only valid answer is: flexibiliy. With Nextron, there's a limit to how much you can tweak your code, and it might actually be a plus point if you want to focus on getting a basic app done. However, if you're like me, and you like having full control of your project, and not being at the mercy of a third-party project mantainer, then welcome aboard mate—this is just the thing you were searching for!
This repo is a public template and you can easily use it create a new repo. A bit about that in this article.
Once you're done, just clone your repo (not this template) and install the dependencies (with yarn install
) to get started
.
├── assets
│ ├── icon.icns
│ ├── icon.ico
│ └── icon.png
├── backend
│ ├── main.ts
│ ├── preload.ts
│ ├── README.md
│ ├── tsconfig.json
│ └── .eslintrc.json
├── frontend
│ ├── app
│ │ ├── assets
│ | │ ├── edit.svg
│ | │ └── menhera.png
│ │ ├── favicon.ico
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── page.module.css
│ │ └── page.tsx
│ ├── context.d.ts
│ ├── .eslintrc.json
│ └── tsconfig.json
├── next.config.js
├── electron-builder.yml
├── package.json
├── README.md
└── yarn.lock
assets/
: Contains app icons used during run and build times.backend/
: This is where your electron main processes reside.frontend/
: This is where your NextJS app lives.next.config.js
: NextJS config file.electron-builder.yml
: Electron builder config file.There's more information about frontend
and backend
parts in the README files in their respective directories.
You can run these scripts from your terminal using
yarn <SCRIPT_NAME>
This repository is released under the MIT license, which grants the following permissions:
For more convoluted language, see the LICENSE.
Inspirations taken from the famous React+Electron Boilerplate repo.