{"id":25949694,"url":"https://github.com/guasam/electron-react-app","last_synced_at":"2025-05-16T03:02:07.508Z","repository":{"id":40638750,"uuid":"265288492","full_name":"guasam/electron-react-app","owner":"guasam","description":"Modern Electron application starter kit with React, Vite, TypeScript, and TailwindCSS","archived":false,"fork":false,"pushed_at":"2025-04-22T21:24:42.000Z","size":12789,"stargazers_count":440,"open_issues_count":0,"forks_count":92,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-22T22:32:27.403Z","etag":null,"topics":["boilerplate","custom-titlebar","desktop-app","electron","electron-react-app","electron-react-typescript","era","react","react-desktop-app","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guasam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"guasam","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-05-19T15:37:00.000Z","updated_at":"2025-04-22T21:23:54.000Z","dependencies_parsed_at":"2022-08-09T23:50:48.163Z","dependency_job_id":"afa05ac7-5266-40b5-8dbd-651b22323547","html_url":"https://github.com/guasam/electron-react-app","commit_stats":null,"previous_names":["codesbiome/electron-react-webpack-typescript-2020","codesbiome/electron-react-webpack-typescript-2023","guasam/electron-react-webpack-typescript-2024","codesbiome/electron-react-webpack-typescript-2024","guasam/electron-react-app"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guasam%2Felectron-react-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guasam%2Felectron-react-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guasam%2Felectron-react-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guasam%2Felectron-react-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guasam","download_url":"https://codeload.github.com/guasam/electron-react-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459077,"owners_count":22074604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","custom-titlebar","desktop-app","electron","electron-react-app","electron-react-typescript","era","react","react-desktop-app","typescript"],"created_at":"2025-03-04T12:15:33.674Z","updated_at":"2025-05-16T03:02:07.466Z","avatar_url":"https://github.com/guasam.png","language":"TypeScript","funding_links":["https://ko-fi.com/guasam"],"categories":[],"sub_categories":[],"readme":"# Electron React App\n\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"resources/build/icon.svg\" width=\"64\" /\u003e\n\u003c/p\u003e\n\nA modern Electron application template with React, Vite, TypeScript, and TailwindCSS. This project provides a solid foundation for developing cross-platform desktop applications.\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"app/assets/era-preview.png\" target=\"_blank\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://imgur.com/B5pGkDk\"\u003eWatch Video Preview\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Features\n\n- 🚀 Electron - Cross-platform desktop application framework\n- ⚛️ React - Component-based UI library\n- 📦 TypeScript - Type-safe JavaScript\n- 🎨 TailwindCSS - Utility-first CSS framework\n- ⚡ Vite - Lightning-fast build tool\n- 🔥 Fast HMR - Hot Module Replacement\n- 🎨 Dark/Light Mode - Built-in theme switching\n- 🪟 Custom Window \u0026 Titlebar - Professional-looking window with custom titlebar \u0026 file menus.\n- 📐 Clean Project Structure - Separation of main and renderer processes\n- 🧩 Path Aliases – Keep your code organized.\n- 🛠️ Electron Builder - Configured for packaging applications\n\n\u003cbr /\u003e\n\n## Prerequisites\n\n- Node.js (v18 or higher)\n- npm, yarn, pnpm, or bun\n\n\u003cbr /\u003e\n\n## Installation\n\nClone the repository and install dependencies:\n\n```bash\n# Clone the repository\ngit clone https://github.com/guasam/electron-react-app\ncd electron-react-app\n\n# Install dependencies\nnpm install\n# or\nyarn\n# or\npnpm install\n# or\nbun install\n```\n\n\u003cbr /\u003e\n\n## Development\n\nStart the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun run dev\n```\n\nThis will start Electron with hot-reload enabled so you can see changes in real time.\n\n\u003cbr /\u003e\n\n## Building for Production\n\nBuild the application for your platform:\n\n```bash\n# For Windows\nnpm run build:win\n\n# For macOS\nnpm run build:mac\n\n# For Linux\nnpm run build:linux\n\n# Unpacked for all platforms\nnpm run build:unpack\n```\n\nDistribution files will be located in the `dist` directory.\n\n\u003cbr /\u003e\n\n## IPC Communication\n\nThe app uses a secure IPC (Inter-Process Communication) system to communicate between the renderer and main processes:\n\n```ts\n// Renderer process (send message to main)\nwindow.api.send('channel-name', ...args)\n\n// Renderer process (receive message from main)\nwindow.api.receive('channel-name', (data) =\u003e {\n  console.log(data)\n})\n\n// Renderer process (invoke a method in main and get a response)\nconst result = await window.api.invoke('channel-name', ...args)\n```\n\n\u003cbr /\u003e\n\n## Custom Window Components\n\nThis template includes a custom window implementation with:\n\n- Custom titlebar with app icon\n- Window control buttons (minimize, maximize, close)\n- Menu system with keyboard shortcuts\n- Dark/light mode toggle\n- Cross-platform support for Windows and macOS\n\n\u003cbr /\u003e\n\n### Titlebar Menu Toggle\n\nThe titlebar menu can be toggled using:\n\n- **Windows**: Press the `Alt` key\n- **macOS**: Press the `Option (⌥)` key\n\nWhen you press the toggle key:\n\n- If the menu is hidden, it becomes visible\n- If the menu is already visible, it gets hidden\n- The menu only toggles if menu items are available\n\n\u003cbr /\u003e\n\n### Customizing Menu Items\n\nTo add, remove or modify menu items, update the `lib/window/titlebarMenus.ts` file.\n\n\u003cbr /\u003e\n\n## Tailwind Styling\n\nThe project supports **TailwindCSS** for styling:\n\n```ts\n// Example component with Tailwind classes\nconst Button = () =\u003e (\n  \u003cbutton className=\"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600\"\u003e\n    Click me\n  \u003c/button\u003e\n);\n```\n\n\u003cbr /\u003e\n\n## Contributing\n\nContributions are welcome! Feel free to submit a Pull Request.\n\n\u003cbr /\u003e\n\n## Project Structure\n\n\u003c!-- prettier-ignore-start --\u003e\n```markdown\n├── app/                        # Renderer process files\n│   ├── assets/                 # Static assets (images, fonts, etc)\n│   ├── components/             # React components\n│   │   ├── App.tsx             # Application component\n│   ├── styles/                 # CSS and Tailwind files\n│   │   ├── app.css             # App stylesheet\n│   │   └── tailwind.css        # Tailwind stylesheet\n│   ├── index.html              # Entry HTML file\n│   └── renderer.tsx            # Renderer process entry\n├── lib/                        # Shared library code\n│   ├── main/                   # Main process code\n│   │   ├── index.ts            # Main entry point for Electron\n│   │   └── ...                 # Other main process modules\n│   ├── preload/                # Preload scripts for IPC\n│   │   ├── index.ts            # Preload script entry\n│   │   └── api.ts              # Exposed API for renderer\n│   ├── welcome/                # Welcome kit components\n│   └── window/                 # Custom window implementation\n├── resources/                  # Build resources\n├── .eslintrc                   # ESLint configuration\n├── .prettierrc                 # Prettier format configuration\n├── electron-builder.yml        # Electron builder configuration\n├── electron.vite.config.ts     # Vite configuration for Electron\n├── package.json                # Project dependencies and scripts\n└── tsconfig.node.json          # Main process tsconfig\n└── tsconfig.web.json           # Renderer process tsconfig\n\n```\n\u003c!-- prettier-ignore-end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguasam%2Felectron-react-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguasam%2Felectron-react-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguasam%2Felectron-react-app/lists"}