tinyplex / vite-tinybase-ts-react-crsqlite

A TinyBase Vite template using TypeScript, React, and cr-sqlite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vite-tinybase-ts-react-crsqlite

This is a Vite template for a simple app, using TypeScript and React, that integrates TinyBase with Vulcan's cr-sqlite to provide persistence and synchronization across clients.

It is a fork of the awesome Vulcan vite-starter app, with small changes to introduce TinyBase into the view layer. All the credit for the magic goes to the cr-sqlite project!

When you're up and running, the app should look like this:

A four-way sync between browsers

Instructions

  1. Make a copy of this template into a new directory:
npx tiged tinyplex/vite-tinybase-ts-react-crsqlite my-tinybase-app
  1. Go into the directory:
cd my-tinybase-app
  1. Install the dependencies:
npm install
  1. Run the application:
npm run dev
  1. Go the URL shown and enjoy! Open up multiple windows to see the synchronization in all its glory.

Other templates

There are nine templates for TinyBase, of which this is one:

Template Language React Plus
vite-tinybase JavaScript No
vite-tinybase-ts TypeScript No
vite-tinybase-react JavaScript Yes
vite-tinybase-ts-react TypeScript Yes
vite-tinybase-ts-react-sync TypeScript Yes Synchronization
👉 vite-tinybase-ts-react-crsqlite TypeScript Yes CR-SQLite
tinybase-ts-react-partykit TypeScript Yes PartyKit
tinybase-ts-react-electricsql TypeScript Yes ElectricSQL
expo/examples/with-tinybase JavaScript Yes React Native & Expo

License

This template has no license, and so you can use it however you want! TinyBase, cr-sqlite, and Vite themselves are each MIT licensed.

About

A TinyBase Vite template using TypeScript, React, and cr-sqlite


Languages

Language:TypeScript 89.2%Language:CSS 6.5%Language:JavaScript 3.1%Language:HTML 1.2%