A starter template for cross-platform desktop applications built with:
- Electron
- Vue 3
- Vite
- Tailwind CSS
- DaisyUI
- Prisma
- SQLite
This template is intended for local-first desktop apps with a clean separation between:
- Electron main process for native APIs and database access
- preload bridge for secure IPC exposure
- Vue renderer for the user interface
- Electron Forge packaging for Windows, macOS and Linux
- Vue 3 + Vite renderer setup
- Tailwind CSS + DaisyUI styling
- Prisma ORM with SQLite
- TypeScript-ready project with JavaScript still allowed
- Template-friendly project structure
.
├── electron/
│ ├── main.js
│ ├── preload.js
│ └── db.js
├── prisma/
│ └── schema.prisma
├── src/
│ ├── App.vue
│ ├── renderer.js
│ ├── input.css
│ └── styles/
│ └── output.css
├── index.html
├── vite.config.mjs
├── forge.config.js
├── tsconfig.json
└── package.json
npm installCopy .env.example to .env:
cp .env.example .envOn Windows PowerShell:
Copy-Item .env.example .envnpm run prisma:generatenpm run db:migratenpm run startnpm run build:vitenpm run typechecknpm run prisma:generatenpm run db:migratenpm run db:studionpm run packagenpm run makenpm run publishThis template uses Prisma + SQLite by default.
For development, the database URL points to a local SQLite file. For packaged production builds, you should store user
data inside Electron's userData directory instead of writing into the application folder.
- Keep database access in the Electron main process
- Expose only narrow APIs through preload.js
- Do not import Prisma directly in the Vue renderer
- Keep contextIsolation enabled
You should rename:
nameinpackage.json- productName in
package.json - the GitHub repository URL
- the application title in
index.html
Then update:
- Prisma models in
prisma/schema.prisma - preload APIs
- Vue UI components
MIT