# electron-shadcn Electron in all its glory. Everything you will need to develop your beautiful desktop application. ![Demo GIF](https://github.com/LuanRoger/electron-shadcn/blob/main/images/demo.gif) ## Libs and tools 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. ### Core ๐Ÿ๏ธ - [Electron 38](https://www.electronjs.org) - [Vite 7](https://vitejs.dev) ### DX ๐Ÿ› ๏ธ - [TypeScript 5.9](https://www.typescriptlang.org) - [Prettier](https://prettier.io) - [ESLint 9](https://eslint.org) - [Zod 4](https://zod.dev) - [React Query (TanStack)](https://react-query.tanstack.com) ### UI ๐ŸŽจ - [React 19](https://reactjs.org) - [Tailwind 4](https://tailwindcss.com) - [Shadcn UI](https://ui.shadcn.com) - [Geist](https://vercel.com/font) as default font - [i18next](https://www.i18next.com) - [TanStack Router](https://tanstack.com/router) - [Lucide](https://lucide.dev) ### Test ๐Ÿงช - [Vitest](https://vitest.dev) - [Playwright](https://playwright.dev) - [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) ### Packing and distribution ๐Ÿ“ฆ - [Electron Forge](https://www.electronforge.io) ### CI/CD ๐Ÿš€ - Pre-configured [GitHub Actions workflow](https://github.com/LuanRoger/electron-shadcn/blob/main/.github/workflows/playwright.yml), for test with Playwright ### Project preferences ๐ŸŽฏ - Use Context isolation - [React Compiler](https://react.dev/learn/react-compiler) is enabled by default. - `titleBarStyle`: hidden (Using custom title bar) - Geist as default font - Some default styles was applied, check the [`styles`](https://github.com/LuanRoger/electron-shadcn/tree/main/src/styles) directory - React DevTools are installed by default ## Directory structure ```plaintext . โ””โ”€โ”€ ./src/ โ”œโ”€โ”€ ./src/assets/ โ”‚ โ””โ”€โ”€ ./src/assets/fonts/ โ”œโ”€โ”€ ./src/components/ โ”‚ โ”œโ”€โ”€ ./src/components/template โ”‚ โ””โ”€โ”€ ./src/components/ui/ โ”œโ”€โ”€ ./src/helpers/ โ”‚ โ””โ”€โ”€ ./src/helpers/ipc/ โ”œโ”€โ”€ ./src/layout/ โ”œโ”€โ”€ ./src/lib/ โ”œโ”€โ”€ ./src/pages/ โ”œโ”€โ”€ ./src/style/ โ””โ”€โ”€ ./src/tests/ ``` - `src/`: Main directory - `assets/`: Store assets like images, fonts, etc. - `components/`: Store UI components - `template/`: Store the all not important components used by the template. It doesn't include the `WindowRegion` or the theme toggler, if you want to start an empty project, you can safely delete this directory. - `ui/`: Store Shadcn UI components (this is the default direcotry used by Shadcn UI) - `helpers/`: Store IPC related functions to be called in the renderer process - `ipc/`: Directory to store IPC context and listener functions - Some implementations are already done, like `theme` and `window` for the custom title bar - `layout/`: Directory to store layout components - `lib/`: Store libraries and other utilities - `pages/`: Store app's pages - `style/`: Store global styles - `tests/`: Store tests (from Vitest and Playwright) ## NPM script To run any of those scripts: ```bash npm run