Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrlightful/powersync-tauri
An exhaustive boilerplate project of Tauri + Shadcn UI + PowerSync.
https://github.com/mrlightful/powersync-tauri
local-first offline powersync shadcn-ui tailwindcss tauri vite
Last synced: about 2 months ago
JSON representation
An exhaustive boilerplate project of Tauri + Shadcn UI + PowerSync.
- Host: GitHub
- URL: https://github.com/mrlightful/powersync-tauri
- Owner: MrLightful
- License: mit
- Created: 2024-08-19T20:46:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T08:44:56.000Z (about 2 months ago)
- Last Synced: 2024-11-04T09:31:02.826Z (about 2 months ago)
- Topics: local-first, offline, powersync, shadcn-ui, tailwindcss, tauri, vite
- Language: TypeScript
- Homepage:
- Size: 876 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tauri + Shadcn UI + PowerSync
This template should help get you started developing with [Tauri](https://tauri.app), [React](https://reactjs.org), [Typescript](https://typescriptlang.org), [Shadcn UI](https://ui.shadcn.com) and [PowerSync](https://powersync.com) in [Vite](https://vitejs.dev).
In addition, this template also configures [ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [Husky](https://typicode.github.io/husky/) and [Lint-staged](https://github.com/lint-staged/lint-staged) for pre-commits.
[**Version without PowerSync**](https://github.com/MrLightful/create-tauri-core).
![Demo Screenshot](./assets/demo.png)
## Getting Started
### Basics
#### Tauri
Ensure that you have the [Tauri prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites) installed.
#### Install dependencies
```bash
pnpm install
```#### Start the development server
```bash
pnpm run tauri dev
```### PowerSync setup
This template is set up to work with PowerSync. PowerSync is a sync layer for building local-first apps with simple state management and real-time reactivity.
Ensure that the PowerSync prerequisites are met: [Configure your source database](https://docs.powersync.com/usage/installation/database-setup) and [Connect PowerSync to your database](https://docs.powersync.com/usage/installation/database-connection).
#### Environment variables
Copy the `.env.example` file to `.env` and fill in the required environment variables.
```bash
cp .env.example .env
```Set `VITE_POWERSYNC_URL` and `VITE_POWERSYNC_TOKEN` to your PowerSync server URL and [development token](https://docs.powersync.com/usage/installation/authentication-setup/development-tokens) respectively.
#### Define your PowerSync schema
Define your PowerSync schema in the [`src/components/providers/AppSchema.ts`](src/components/providers/AppSchema.ts) file. The default schema there is an arbitrary Project schema for `projects` table. You can replace it with your own.
For more information, see [PowerSync documentation](https://docs.powersync.com/client-sdk-references/js-web#id-1.-define-the-schema).