A fully-featured template for building cross-platform desktop apps with modern web and backend technologies created by me. It's built with:
Tested on Windows and macOS
This project uses Vite + React + TypeScript, so the frontend behaves just like any standard Vite-based React project.
You can freely:
shadcn/ui
with another UI library of your choice (e.g., MUI, Chakra UI, etc.)shadcn/ui
by generating or modifying components using the CLIThis setup gives you full flexibility to build your UI the way you want, while keeping the benefits of a modern Electron integration.
The backend is powered by FastAPI, bundled using PyInstaller for production.
You can:
app.py
filerequirements.txt
Deep FastAPI structuring, such as using multiple modules with
APIRouter
, service layers, and database layers, is now fully tested in production builds with PyInstaller. This feature is stable and ready for use.
Use the backend like you would in any typical FastAPI project — just keep an eye on how imports behave when bundling.
git clone https://github.com/ShakeefAhmedRakin/electron-react-ts-tailwind-shadcn-fastapi-template.git
cd electron-react-ts-tailwind-shadcn-fastapi-template
npm install
Requires Python 3.8.0+ (Tested with 3.8.0)
cd backend
python -m venv venv
venv\Scripts\activate
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Make sure your Python virtual environment is activated before running npm run dev
npm run dev
This will:
To create a production build of the app:
npm run build
Build output will be located under the release/{version}
folder.
The build output is platform-specific.
- Running
npm run build
on Windows will generate a Windows executable.- Running it on macOS will generate a macOS app bundle.
MIT — feel free to fork and build awesome things!