Giter Site home page Giter Site logo

tauri-starter-react-router-mui-ts's Introduction

Tauri + React + Typescript Starter Kit

Welcome to the Tauri + React + Typescript Starter Kit! This template is designed to help non-Rust developers quickly get started with building cross-platform desktop applications using Tauri. Below, you'll find everything you need to kickstart your development journey.

Getting Started

Installation

  1. Clone this repository to your local machine.
    git clone https://github.com/angelxmoreno/tauri-starter-react-router-mui-ts.git tauri-app
  2. Navigate to the project directory.
    cd tauri-app
  3. Install dependencies using your preferred package manager:
    bun i
  4. DB migrations are managed by Rust. I extracted the Migrations array to a separate file located in src-tauri/src/migrations.ts to make it easier for non-Rust devs. Migrations will run when you first connect to the database which is when Kysely connects.

Development

To start the development server and launch the application:

bun tauri dev

This will start the tauri app.

Production Build

To build the application for production:

bunx tauri build

Features

This starter kit comes packed with the following features and libraries:

  • React
  • Typescript
  • Vite
  • Material Design Icons
  • Material UI
  • React Router
  • Zustand
  • Path aliases with vite-tsconfig-paths
  • Eslint
  • Prettier
  • lint-staged
  • husky
  • commit-lint
  • Kysely
  • Tauri-Plugin-SQL

Database Integration

We use Kysely for type-safe SQL queries and migrations management. This enables seamless database integration for TypeScript developers. Below are the steps to manage your database:

Creating Migrations

To create a new migration edit the src-tauri/src/migrations.ts:

Generating Kysely Database Types

  1. Edit the .env.local file to point to your app's data directory ( @TODO create a cli to determine this for the dev)
  2. Run bun db:generate

TODOs

  • Consider a modern linter like dprint or biomejs.
  • Streamline the process of identifying and setting the database path outside Tauri for the Kysely CLI tools.
  • discuss using Node.js as a sidecar
  • discuss integration with NativePHP

tauri-starter-react-router-mui-ts's People

Contributors

angelxmoreno avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.