{"id":49081112,"url":"https://github.com/codesign-cloud/cdc-electron-starterkit","last_synced_at":"2026-04-20T13:14:19.285Z","repository":{"id":176302215,"uuid":"655299858","full_name":"codesign-cloud/cdc-electron-starterkit","owner":"codesign-cloud","description":"\"Hello world\" Electron app starter kit. Latest versions, inter-process communication, base, React, Jest, Playwright","archived":false,"fork":false,"pushed_at":"2025-07-03T18:52:50.000Z","size":223,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-03T19:38:57.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codesign-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-06-18T13:44:39.000Z","updated_at":"2025-07-03T18:52:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"80555b54-099e-4ecd-91e4-bf437acead58","html_url":"https://github.com/codesign-cloud/cdc-electron-starterkit","commit_stats":null,"previous_names":["codesign-cloud/cdc-electron-starterkit"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codesign-cloud/cdc-electron-starterkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesign-cloud%2Fcdc-electron-starterkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesign-cloud%2Fcdc-electron-starterkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesign-cloud%2Fcdc-electron-starterkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesign-cloud%2Fcdc-electron-starterkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codesign-cloud","download_url":"https://codeload.github.com/codesign-cloud/cdc-electron-starterkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesign-cloud%2Fcdc-electron-starterkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32048566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-20T13:14:16.802Z","updated_at":"2026-04-20T13:14:19.279Z","avatar_url":"https://github.com/codesign-cloud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CDC Electron Starterkit\n\nA modern, secure, and feature-rich Electron + React starter template with best practices built-in.\n\n## 🚀 Features\n\n- **Modern Stack**: Electron 37+ with React 19\n- **Security First**: Context isolation, disabled node integration, CSP headers\n- **Development Experience**: Hot reload, dev tools, source maps\n- **Build System**: Webpack 5 with Babel transpilation\n- **Testing**: Jest setup with example tests\n- **Cross-Platform**: Windows, macOS, and Linux support\n- **Modern UI**: Beautiful gradient design with responsive layout\n\n##### Screenshot\n![Screenshot](assets/screenshot.png \"Screenshot\")\n\n## 📦 What's Included\n\n- ✅ Secure IPC communication between main and renderer processes\n- ✅ Modern React with hooks and error boundaries\n- ✅ Webpack configuration for development and production\n- ✅ Hot reload during development\n- ✅ Professional application menu\n- ✅ CSS modules support\n- ✅ Jest testing framework\n- ✅ Cross-platform build configuration\n- ✅ Security best practices implemented\n\n## 🛠 Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/codesign-cloud/cdc-electron-starterkit.git\ncd cdc-electron-starterkit\n\n# Install dependencies\nnpm install\n```\n\n## 🚀 Development\n\n**Important**: You need to build the React app first before running Electron!\n\n### Quick Start (Recommended)\n```bash\n# This automatically builds the React app AND starts Electron with hot reload\nnpm start\n```\n\n### Manual Process (if needed)\n```bash\n# Step 1: Build the React app first\nnpm run build:renderer:dev\n\n# Step 2: Then start Electron\nnpm run start:electron\n```\n\n### Other Development Commands\n```bash\n# Build renderer for development (with source maps) - REQUIRED before first run\nnpm run build:renderer:dev\n\n# Build renderer for production (optimized)\nnpm run build:renderer\n\n# Clean build artifacts\nnpm run clean\n```\n\n**Note**: The `npm start` command runs both webpack (to build React) and Electron simultaneously with hot reload, so you don't need to build separately when using it.\n\n## 🧪 Testing\n\n```bash\n# Run tests once\nnpm test\n\n# Run tests in watch mode\nnpm run test:watch\n```\n\n## 📦 Building for Production\n\n```bash\n# Build the app for all platforms\nnpm run build\n\n# Build and publish (requires proper GitHub setup)\nnpm run release\n```\n\n## 🏗 Project Structure\n\n```\ncdc-electron-starterkit/\n├── src/\n│   ├── __tests__/          # Test files\n│   ├── main.js             # Electron main process\n│   ├── preload.js          # Secure bridge script\n│   ├── renderer.jsx        # React application\n│   ├── index.html          # HTML template\n│   └── style.css           # Application styles\n├── dist/                   # Built files (auto-generated)\n├── docs/                   # Documentation\n├── package.json            # Dependencies and scripts\n├── webpack.config.js       # Webpack configuration\n├── babel.config.js         # Babel configuration\n└── jest.config.js          # Jest configuration\n```\n\n### File Structure for Development:\n\n```\nsrc/\n├── renderer.jsx     ← Main React app (edit here!)\n├── style.css        ← Styling (edit here!)\n├── index.html       ← HTML template\n├── main.js          ← Electron main process\n└── preload.js       ← Security bridge\n```\n\n## 🔒 Security Features\n\nThis starterkit implements Electron security best practices:\n\n- **Context Isolation**: Enabled to prevent renderer access to Node.js APIs\n- **Node Integration**: Disabled in renderer process\n- **Preload Script**: Secure bridge for IPC communication\n- **Content Security Policy**: Configured for development and production\n- **Sandboxing**: Ready to be enabled for additional security\n- **Menu Security**: Prevents unauthorized window creation\n\n## 🎨 Customization\n\n### Styling\n- Modify `src/style.css` for global styles\n- The app uses a modern gradient design that's fully customizable\n- Responsive design works on all screen sizes\n\n### Adding Features\n- Add new IPC handlers in `src/main.js`\n- Expose them securely through `src/preload.js`\n- Use them in your React components via `window.electronAPI`\n\n### Build Configuration\n- Modify `package.json` build section for app metadata\n- Update `webpack.config.js` for build customizations\n- Configure `babel.config.js` for JavaScript transpilation\n\n## 📋 Scripts Reference\n\n| Script | Description |\n|--------|-------------|\n| `npm start` | Start development with hot reload |\n| `npm run dev` | Alias for start |\n| `npm test` | Run tests once |\n| `npm run test:watch` | Run tests in watch mode |\n| `npm run build:renderer` | Build renderer for production |\n| `npm run build:renderer:dev` | Build renderer for development |\n| `npm run build` | Build app for all platforms |\n| `npm run release` | Build and publish app |\n| `npm run clean` | Clean build artifacts |\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n1. **App won't start**: Make sure you've run `npm install` and `npm run build:renderer`\n2. **Hot reload not working**: Check that both webpack and electron processes are running\n3. **Build fails**: Ensure all dependencies are installed and up to date\n\n### Development Tips\n\n- Use `Ctrl+Shift+I` (or `Cmd+Option+I` on Mac) to open DevTools\n- Check the console for any JavaScript errors\n- Use the Network tab to debug resource loading issues\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## 📄 License\n\nThis project is licensed under the CC0-1.0 License - see the LICENSE file for details.\n\n## 🙏 Acknowledgments\n\n- Built with [Electron](https://electronjs.org/)\n- UI powered by [React](https://reactjs.org/)\n- Bundled with [Webpack](https://webpack.js.org/)\n- Tested with [Jest](https://jestjs.io/)\n\n---\n\n**Happy coding! 🎉**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesign-cloud%2Fcdc-electron-starterkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesign-cloud%2Fcdc-electron-starterkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesign-cloud%2Fcdc-electron-starterkit/lists"}