Nextron ( Next.Js + Electron ) project boilerplate in TypeScript, with TailwindCSS + Shadcn/ui, web and desktop crossbuild
This repository is a Nextron ( Next.Js + Electron ) project template in TypeScript with a Next.Js 14 App Router that includes TailwindCSS and the Shadcn/ui component library. This project is also configured so that the application can be built for both web and desktop versions with the same code.
The aim of this project is to enable anyone to quickly and easily start up a project using these technologies.
How to create a new application with this template ?
There are two ways to create a new project with this template. This project uses and runs under Node 20, so it's advisable to use NVM to manage and use the correct version of Node.
To create a new project, use the command below :
# with npx
$ npx install-nextron-shadcn-boilerplate
# with yarn
$ SOON
# with pnpm
$ SOON
On GitHub, select this repository as a template.
To create a new project, just copy it by running :
git clone [email protected]:MaximePremont/boilerplate-nextron-shadcn.git
Then, install depedencies by running npm install
in the project folder.
You can use npm run next:dev
to start a next web application in development mode with hot reload.
You can use npm run electron:dev
to start an electron desktop application in development mode with hot reload.
You can build your next web application by using npm run next:build
. Then you can start it in production mode with npm run next:start
.
You can build your Electron desktop application on different systems by using the commands bellow :
npm run electron:build-current Build for current system
npm run electron:build-all Build on all systems
npm run electron:build-win32 Build on Windows x32
npm run electron:build-win64 Build on Windows x64
npm run electron:build-linux Build for linux*
npm run electron:build-mac Build for MacOs**
npm run electron:build-mac-universal Universal build for MacOs**
*For linux, you can change the package type ( snap, deb... ) by editing the electron-builder.yml file. You may need to install some packages ( for exemple rmp to build a rpm
).
**MacOs versions can only be build using a Mac.
For full usage, please read the Nextron documentation.
To install Shadcn/ui components, just use npx shadcn@latest add MY-COMPONENT
as explained in the official documentation.
Eslint and Prettier are installed and configured to work with the project. Feel free to edit configuration files according to your preferences.
Please note that contributors to this project must adhere to the defined standard.
Feel free to improve this project by developing ( contribution guide ) or participating in community discussions.
This project in under the MIT License.