https://github.com/ashishantil07/electron-react-ts-tw-template
A ready-to-go template for Electron, React, Typescript and TailwindCSS Application.
https://github.com/ashishantil07/electron-react-ts-tw-template
desktop-app electron react react-app-rewired tailwindcss typescript
Last synced: 5 months ago
JSON representation
A ready-to-go template for Electron, React, Typescript and TailwindCSS Application.
- Host: GitHub
- URL: https://github.com/ashishantil07/electron-react-ts-tw-template
- Owner: AshishAntil07
- License: wtfpl
- Created: 2024-08-28T15:56:47.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-30T17:05:38.000Z (almost 2 years ago)
- Last Synced: 2025-04-07T22:03:40.612Z (about 1 year ago)
- Topics: desktop-app, electron, react, react-app-rewired, tailwindcss, typescript
- Language: HTML
- Homepage:
- Size: 210 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# electron-react-typescript-tailwind Template
## Overview
This is a ready-to-go template to build ElectronJS Application by leveraging ReactJS, Typescript and TailwindCSS. Organized file structure pre-defined path aliases further contribute to the developer experience.
## Features
- **Electron**: Used for building the desktop application.
- **React**: Frontend library for building user interfaces.
- **TypeScript**: Provides static type checking.
- **Tailwind CSS**: Utility-first CSS framework for styling.
- **Custom Webpack Configuration**: Managed with `react-app-rewired` for customized build setups.
- **Content Security Policy (CSP)**: Configured to handle inline styles and WebSocket connections securely.
## Installation
1. **Clone the repository:**
```bash
git clone https://github.com/AshishAntil07/electron-react-ts-tw-template.git
```
2. **Navigate to the project directory:**
```bash
cd electron-react-ts-tw-template
```
3. **Install dependencies:**
```bash
npm install
```
## Development
To start the development server and open the Electron app:
```bash
npm run dev
```
The development server will be accessible at `http://localhost:3000`, and Electron will load the app from this URL.
## Building for Production
To create a production build of the React app:
```bash
npm run build
```
Then, you can run Electron with the built files:
```bash
npm run electron
```
## Packaging for distribution
To Package the app for distribution:
```bash
npm run package
```
## Configuration
- **Content Security Policy**: Updated in `index.html` to allow specific resources. Modify the `meta` tag in `index.html` if needed.
## Contributing
If you would like to contribute to this project, please fork the repository and submit a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.