Electron in all its glory. Everything you will need to develop your beautiful desktop application.
To develop a Electron app, you probably will need some UI, test, formatter, style or other kind of library or framework, so let me install and configure some of them to you.
- Pre-configured GitHub Actions workflow, for test with Playwright
- Use Context isolation
- React Compiler is enabled by default.
titleBarStyle
: hidden (Using custom title bar)- Geist as default font
- Some default styles was applied, check the
styles
directory
If you don't know some of these libraries or tools, I recommend you to check their documentation to understand how they work and how to use them.
.
└── ./src/
├── ./src/assets/
│ └── ./src/assets/fonts/
├── ./src/components/
│ └── ./src/components/ui/
├── ./src/helpers/
│ └── ./src/helpers/ipc/
├── ./src/layout/
├── ./src/lib/
├── ./src/pages/
├── ./src/style/
└── ./src/tests/
src/
: Main directoryassets/
: Store assets like images, fonts, etc.components/
: Store UI componentsui/
: Store Shadcn UI components (this is the default direcotry used by Shadcn UI)
helpers/
: Store IPC related functions to be called in the renderer processipc/
: Directory to store IPC context and listener functions- Some implementations are already done, like
theme
andwindow
for the custom title bar
- Some implementations are already done, like
layout/
: Directory to store layout componentslib/
: Store libraries and other utilitiespages/
: Store app's pagesstyle/
: Store global stylestests/
: Store tests (from Jest and Playwright)
To run any of those scripts:
npm run <script>
start
: Start the app in development modepackage
: Package your application into a platform-specific executable bundle and put the result in a folder.make
: Generate platform-specific distributables (e.g. .exe, .dmg, etc) of your application for distribution.publish
: Electron Forge's way of taking the artifacts generated by themake
command and sending them to a service somewhere for you to distribute or use as updates.lint
: Run ESLint to lint the codeformat
: Run Prettier to check the code (it doesn't change the code)format:write
: Run Prettier to format the codetest
: Run the default unit-test script (Jest)test:watch
: Run the default unit-test script in watch mode (Jest)test:unit
: Run the Jest teststest:e2e
: Run the Playwright teststest:all
: Run all tests (Jest and Playwright)
The test scripts involving Playwright require the app be builded before running the tests. So, before run the tests, run the
package
,make
orpublish
script.
- Clone this repository
git clone https://github.com/LuanRoger/electron-shadcn.git
Or use it as a template on GitHub
- Install dependencies
npm install
- Run the app
npm run start
- yaste - yaste (Yet another super ₛᵢₘₚₗₑ text editor) is a text editor, that can be used as an alternative to the native text editor of your SO, maybe.
- eletric-drizzle - shadcn-ui and Drizzle ORM with Electron.
Does you've used this template in your project? Add it here and open a PR.
This project is licensed under the MIT License - see the LICENSE file for details.