Hi there, I'm back here to introduce you to electron-app, a ready-to-go with a well-thought-out structure Electron app boilerplate with ReactJS, TypeScript, CSS / SASS modules, SWC, Eslint, Prettier and more.
I really spent a lot of time thinking about this structure and tried to make it the way I felt most productive taking the readability and health of both the code and the structure and with features that I didn't find in the current boilerplates available today. That said, here's some information:
Features
-
Stands out
- π₯βReady-to-go with a well-thought-out structure
- πβAuto reload for main and Hot for renderer process
- πβWindow and Screen routing included
- πβBridge already configured
- πβIPC communication included
- πͺβAbsolute paths supported
-
Technologies
- πβElectron
- π₯βReactJS
- πβReact Router DOM
- π§βReact Developer Tools
- πβTypeScript
- π¦βWebpack
- β‘οΈβSWC as compiler
- β¨βCSS / SASS modules
- π«βEslint / Prettier / EditorConfig / Husky / lint-staged / Commitlint
- π¦βElectron Builder
That's the current structure overview:
src
βββ main
β βββ factories
β β βββ index.ts
β β βββ ipcs
β β β βββ register-window-creation.ts
β β βββ setup.ts
β β βββ windows
β β βββ create.ts
β βββ index.ts
β βββ windows
β βββ About
β β βββ index.ts
β β βββ ipcs
β β βββ index.ts
β β βββ register-window-creation.ts
β βββ Main
β β βββ index.ts
β βββ index.ts
βββ renderer
β βββ assets
β β βββ images
β β βββ illustration.svg
β βββ bridge
β β βββ index.ts
β β βββ ipcs
β β βββ about-window
β β β βββ create.ts
β β β βββ when-close.ts
β β βββ index.ts
β βββ components
β β βββ Button
β β β βββ index.tsx
β β β βββ styles.module.sass
β β βββ Container
β β β βββ index.tsx
β β β βββ styles.module.sass
β β βββ Heading
β β β βββ index.tsx
β β β βββ styles.module.sass
β β βββ index.ts
β βββ index.html
β βββ index.tsx
β βββ routes
β β βββ index.tsx
β β βββ modules
β β βββ index.tsx
β βββ screens
β β βββ About
β β β βββ index.tsx
β β β βββ styles.module.sass
β β βββ Another
β β β βββ index.tsx
β β βββ Main
β β β βββ index.tsx
β β βββ index.ts
β βββ store
β β βββ index.tsx
β βββ styles
β βββ animations.sass
β βββ globals.sass
β βββ resets.sass
βββ resources
β βββ icons
β βββ icon.icns
β βββ icon.ico
βββ shared
βββ constants
β βββ environment.ts
β βββ index.ts
β βββ ipc.ts
β βββ platform.ts
βββ index.ts
βββ types
βββ index.ts
What do you think? If you are interested, you can access the boilerplate GitHub repository where there is more information on how to use it, such as creating windows and taking advantage of factories already available, about routing and more.
Thanks π
Top comments (1)
Looks good!