Awesome
tinybase-ts-react-electricsql
This is a template for a simple TinyBase app, using TypeScript, React, and ElectricSQL.
It is a fork of the ElectricSQL web example app, with small changes to introduce TinyBase into the view layer. All the credit for the magic goes to ElectricSQL!
Instructions
- Make a copy of this template into a new directory:
npx tiged tinyplex/tinybase-ts-react-electricsql my-tinybase-app
- Go into the directory:
cd my-tinybase-app
- Install the dependencies:
npm install
Note that you will also need to install Docker.
- Start Postgres and Electric using Docker:
npm run backend:up
- Setup the database schema:
npm run db:migrate
- Generate the type-safe client:
npm run client:generate
- Run the server:
npm run dev
- Go the URL shown and enjoy!
Other templates
There are ten 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-pglite | TypeScript | Yes | PGlite | |
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 is forked from an ElectricSQL example that has an Apache-2 license. TinyBase is MIT licensed.