Getting familiar with Triplit

This is a simple todo app that uses Triplit. You can add, complete, and delete todos.

Explore the project

This app is built with Triplit, SvelteKit and Vite. There are two Triplit specific files:

/triplit
    schema.ts
/src/lib
    triplit.ts

The schema.ts file defines the schema for the todos. The triplit.ts file initializes the Triplit client.

Run the sync server

In a separate terminal window, run the sync server:

npx triplit dev

Watch it sync

Open the app in a new tab. You should see the todos you added in the other window.

Go offline

Put your browser in offline mode and add, complete, and delete todos.

Go online

... and you should see everything sync up again. That's the magic of Triplit.

Read more

Read our docs to learn more about everything you can do with Triplit.

Todos

Connecting

Loading...