KunalSin9h / tauri-app-template

Template for Tauri App with React + TailwindCSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tauri App Template

publish

Features

  1. Vite + React
  2. Tailwind Css
  3. pnpm
  4. Prettier
  5. Eslint
  6. Rspc with Tauri + React Integration
  7. GoLang CLI for scripting
  8. Husky for pre commit
  9. GitHub Workflow
  10. Tauri vscode debug
  11. Shadcn UI

Auto Updater Info

Replace the {username} and {repo} in the ./src-tauri/tauri.conf.json's updater endpoint with you username and repo name to get latest version info rom the github releases.

"endpoints": [
    "https://github.com/{username}/{repo}/releases/latest/download/latest.json"
],

In this template Auto Updater Is enabled by default. So you need to setup keys for auto-updater from the Tauri Docs.

And Update the public key in ./src-tauri/tauri.conf.json and put TAURI_PRIVATE_KEY and TAURI_KEY_PASSWORD in GitHub Secrets.

These will be used in build process, like this.

- uses: tauri-apps/tauri-action@v0
    env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
        TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}

Warning

You have to manually trigger publish workflow for publishing builds, as the workflow has workflow_dispatch trigger.

Local Setup

Clone the repository

git clone https://github.com/KunalSin9h/tauri-app-template

Download Dependencies

pnpm install # for frontend

cd src-tauri
cargo fetch # for backend

cd ../ # come back to home repo

Run the development app

pnpm tauri dev

Application will be build by GitHub Action

Tauri Docs

Skip Pre-commit

To Skip pre-commit use --no-verify flag when doing git commit

git commit -m "message" --no-verify

Go Cli for Scripting, particularly for updating version

# check version of app
go run scripts/app.go version
# update app version (it changes 3 files)
go run scripts/app.go version update 1.2.0

instructions

About

Template for Tauri App with React + TailwindCSS

License:MIT License


Languages

Language:Go 30.6%Language:TypeScript 22.8%Language:JavaScript 20.9%Language:Shell 9.6%Language:CSS 9.1%Language:Rust 4.8%Language:HTML 2.3%