Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abilityapps/tauri-template
Quickly bootstrap personal, local desktop apps!
https://github.com/abilityapps/tauri-template
biomejs bun postgres react shadcn-ui sqlite sqlx tailwindcss tauri vite
Last synced: 15 days ago
JSON representation
Quickly bootstrap personal, local desktop apps!
- Host: GitHub
- URL: https://github.com/abilityapps/tauri-template
- Owner: abilityapps
- Created: 2024-10-06T00:59:40.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T15:37:54.000Z (2 months ago)
- Last Synced: 2024-10-25T21:22:40.732Z (2 months ago)
- Topics: biomejs, bun, postgres, react, shadcn-ui, sqlite, sqlx, tailwindcss, tauri, vite
- Language: TypeScript
- Homepage:
- Size: 13.8 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tauri Template
This template should help get you started developing completely local, cross-platform desktop apps.
## Getting Started
## Starting the app
1. `bun i`
2. `bunx tauri dev`## Database Setup
1. Choose between `SQLite` or `PostgreSQL`
2. Set `DATABASE_URL` in `src-tauri/.env`:`sqlite:.db` for SQLite
`postgres://postgres@localhost/` for Postgres
3. `sqlx database create` creates your new database. Run in `src-tauri/`
(`sqlx database drop` will delete the database specified in `DATABASE_URL`)
4. `sqlx migrate add ` creates a migration file in `migrations/-.sql` . Add your database schema changes here.
5. `sqlx migrate run` applies your migrationsGo [here](https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md#reverting-migrations) for information on migration reverts.
Rust does not support cetain database types. You must create serializers for those data types.
Read here for [Postgres](https://docs.rs/sqlx/latest/sqlx/postgres/types/index.html) and here for [Sqlite](https://docs.rs/sqlx/latest/sqlx/sqlite/types/).You can look in [this repo](https://github.com/shouryan01/weekability/blob/main/src-tauri/src/db/schema.rs) for an example on how to serialize Postgres `Numeric` and `Date` types in Rust using the `time` and `rust_decimal` crates.
## Recommended IDE Setup
[VS Code](https://code.visualstudio.com/)
Install all the recommendations from `.vscode/extensions.json`. This should be an automatic popup.
## Stack
### Backend
- [Tauri](http://tauri.app/)
- [Postgres](https://www.postgresql.org) | [SQLite](https://www.sqlite.org) with [sqlx](https://github.com/launchbadge/sqlx)Easiest way to use Postgres on Mac is [Postgres.app](https://postgresapp.com)
### Frontend
- [React](http://react.dev/)
- [Bun](https://bun.sh) + [Vite](https://vite.dev)
- [Tanstack Router](https://tanstack.com/router/latest)
- [Tailwindcss](https://tailwindcss.com)
- [shadcn/ui](https://ui.shadcn.com)
- [Biomejs](https://biomejs.dev)